diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-08-16 13:23:07 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-08-16 13:23:07 +0300 |
| commit | 741e195437f1c958fefbc42768031394d5d53518 (patch) | |
| tree | 8d7e5bea50134c1a17d61d88db150de333d9ecf5 /src | |
| parent | 9d4f0aaa22653130aebc7408729b3164bbe63227 (diff) | |
| parent | 0e35bc61d33b39b2181b0df619274889e6a9b87d (diff) | |
| download | rabbitmq-server-git-741e195437f1c958fefbc42768031394d5d53518.tar.gz | |
Merge branch 'rabbitmq-server-health-check-node-monitor' of https://github.com/binarin/rabbitmq-server into binarin-rabbitmq-server-health-check-node-monitor
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_autoheal.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rabbit_autoheal.erl b/src/rabbit_autoheal.erl index 5865ba8227..db4d41221e 100644 --- a/src/rabbit_autoheal.erl +++ b/src/rabbit_autoheal.erl @@ -297,6 +297,17 @@ winner_finish(Notify) -> send(leader(), {autoheal_finished, node()}), not_healing. +%% XXX This can enter infinite loop, if mnesia was somehow restarted +%% outside of our control - i.e. somebody started app back by hand or +%% completely restarted node. One possible solution would be something +%% like this (but it needs some more pondering and is left for some +%% other patch): +%% - monitor top-level mnesia supervisors of all losers +%% - notify loosers about the fact that they are indeed loosers +%% - wait for all monitors to go 'DOWN' (+ maybe some timeout on the whole process) +%% - do one round of parallel rpc calls to check whether mnesia is still stoppend on all +%% loosers +%% - If everything is still stopped, continue autoheall process. Or cancel it otherwise. wait_for_mnesia_shutdown([Node | Rest] = AllNodes) -> case rpc:call(Node, mnesia, system_info, [is_running]) of no -> |
