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 | 69f4e744bddad7fed8ea67f84f0ed1e343dd02f4 (patch) | |
| tree | a1308f185c6ed0742630c8770b03f86fa6935bf6 | |
| parent | 50c3620242aba4aafd19ce16edbdc1faefb745a5 (diff) | |
| download | rabbitmq-server-git-69f4e744bddad7fed8ea67f84f0ed1e343dd02f4.tar.gz | |
Also ignore sync messages if needed.
| -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 58fbcbe074..92e1cc2736 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}. |
