Skip to content

Commit f815778

Browse files
Merge pull request #13720 from rabbitmq/mergify/bp/v4.1.x/pr-13718
Start coordination Ra system before quorum_queues (backport #13718)
2 parents 438ba18 + 126d03e commit f815778

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

deps/rabbit/src/rabbit_ra_systems.erl

+6-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ setup(_) ->
4343
-spec all_ra_systems() -> [ra_system_name()].
4444

4545
all_ra_systems() ->
46-
[quorum_queues,
47-
coordination].
46+
[coordination,
47+
quorum_queues].
4848

4949
-spec are_running() -> AreRunning when
5050
AreRunning :: boolean().
@@ -165,7 +165,10 @@ ensure_stopped() ->
165165
?LOG_DEBUG(
166166
"Stopping Ra systems",
167167
#{domain => ?RMQLOG_DOMAIN_GLOBAL}),
168-
lists:foreach(fun ensure_ra_system_stopped/1, all_ra_systems()),
168+
%% lists:reverse/1 is used to stop systems in the same order as would be
169+
%% done if the ra application was terminated.
170+
lists:foreach(fun ensure_ra_system_stopped/1,
171+
lists:reverse(all_ra_systems())),
169172
?LOG_DEBUG(
170173
"Ra systems stopped",
171174
#{domain => ?RMQLOG_DOMAIN_GLOBAL}),

0 commit comments

Comments
 (0)