diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-09-16 16:39:54 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-09-16 16:39:54 +0100 |
commit | c7915f20bf0ef022d4fbb749de40cc7177481693 (patch) | |
tree | 9aa6575351430ac7a95bb0d450887139ae1f6195 | |
parent | 348be40e2718bbccb1ec98dfb1b9598ca34af784 (diff) | |
download | rabbitmq-server-c7915f20bf0ef022d4fbb749de40cc7177481693.tar.gz |
Don't restart the node, and add a comment explaining what's going on.
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index 953abcd2..c92bc1f2 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -80,7 +80,7 @@ set_maximum_since_use(QPid, Age) -> info(QPid) -> gen_server2:call(QPid, info, infinity). -init(Q = #amqqueue { name = QName, pid = MPid }) -> +init(Q = #amqqueue { name = QName }) -> %% We join the GM group before we add ourselves to the amqqueue %% record. As a result: %% 1. We can receive msgs from GM that correspond to messages we will @@ -138,10 +138,11 @@ init(Q = #amqqueue { name = QName, pid = MPid }) -> existing -> gm:leave(GM), ignore; - master_recovery_detected -> - rabbit_log:info("Restarting to prevent conflict with ~p on ~p~n", - [node(MPid), rabbit_misc:rs(QName)]), - init:restart(), + master_in_recovery -> + %% The queue record vanished - we must have a master starting + %% concurrently with us. In that case we can safely decide to do + %% nothing here, and the master will start us in + %% master:init_with_existing_bq/3 ignore end. @@ -171,7 +172,7 @@ init_it(Self, GM, Node, QName) -> end end; [] -> - master_recovery_detected + master_in_recovery end. %% Add to the end, so they are in descending order of age, see |