summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-01-11 19:23:30 +0300
committerMichael Klishin <michael@clojurewerkz.org>2020-01-11 19:23:30 +0300
commit8ff98742d0d8ed5b64233d1bb9cf63b5a0c0d0e4 (patch)
treec3dd2992533699b7261a5e96b232bfb4689a7c42 /src
parent791056b2d1f78cc0094f836ceb779fe6a2d00699 (diff)
downloadrabbitmq-server-git-8ff98742d0d8ed5b64233d1bb9cf63b5a0c0d0e4.tar.gz
Make autoheal state transition timeout configurable
In continuation to #2208.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_autoheal.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_autoheal.erl b/src/rabbit_autoheal.erl
index b43fd672d8..316c8c89cb 100644
--- a/src/rabbit_autoheal.erl
+++ b/src/rabbit_autoheal.erl
@@ -372,6 +372,7 @@ wait_for_supervisors(Monitors) ->
restart_loser(State, Winner) ->
rabbit_log:warning(
"Autoheal: we were selected to restart; winner is ~p~n", [Winner]),
+ NextStateTimeout = application:get_env(rabbit, autoheal_state_transition_timeout, 60000),
rabbit_node_monitor:run_outside_applications(
fun () ->
MRef = erlang:monitor(process, {?SERVER, Winner}),
@@ -381,10 +382,10 @@ restart_loser(State, Winner) ->
not_healing;
autoheal_safe_to_start ->
State
- after 60000 ->
+ after NextStateTimeout ->
rabbit_log:warning(
- "Autoheal: Timed out waiting for autoheal_safe_to_start,
- winner is ~p; Start and retry autoheal", [Winner]),
+ "Autoheal: timed out waiting for a safe-to-start message from the winner (~p); will retry",
+ [Winner]),
not_healing
end,
erlang:demonitor(MRef, [flush]),