diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-10-20 20:59:42 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-10-20 20:59:42 +0100 |
commit | 5ad4e262115e0a5a7c85e040b3c8cc57aebc1f35 (patch) | |
tree | a1308f185c6ed0742630c8770b03f86fa6935bf6 | |
parent | 0a13c23b41f98362f08339c10d7e893637571d4b (diff) | |
download | rabbitmq-server-bug26422.tar.gz |
Also ignore sync messages if needed.bug26422
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index 58fbcbe0..92e1cc27 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -317,6 +317,15 @@ handle_info({bump_credit, Msg}, State) -> credit_flow:handle_bump_msg(Msg), noreply(State); +%% In the event of a short partition during sync we can detect the +%% master's 'death', drop out of sync, and then receive sync messages +%% which were still in flight. Ignore them. +handle_info({sync_msg, _Ref, _Msg, _Props, _Unacked}, State) -> + noreply(State); + +handle_info({sync_complete, _Ref}, State) -> + noreply(State); + handle_info(Msg, State) -> {stop, {unexpected_info, Msg}, State}. |