diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-09-25 19:08:27 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-09-25 19:08:27 +0100 |
commit | cbb21d811a3b503a32dbaa35fea69cbf7d33d57c (patch) | |
tree | b3588f8f8da2ea53969abd81020ecde444e4c783 | |
parent | f9fb42cee26f7f349d89342acc69795c5f9538df (diff) | |
download | rabbitmq-server-cbb21d811a3b503a32dbaa35fea69cbf7d33d57c.tar.gz |
put the assertion back. This time more explictly.
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index e52c570e..dcc7e5f6 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -894,10 +894,9 @@ update_delta_from_master(NewDelta, State = #state { depth_delta = Delta }) -> update_delta(_DeltaChange, State = #state { depth_delta = undefined }) -> State; update_delta(DeltaChange, State = #state { depth_delta = Delta }) -> - %% We intentionally leave out the head where a slave becomes - %% unsynchronised: we assert that can never happen. case {Delta, Delta + DeltaChange} of - {0, 0} -> State; + {0, N} -> 0 = N, %% assertion: we cannot become unsync'ed + State; {_, 0} -> ok = record_synchronised(State#state.q), State #state { depth_delta = 0 }; {_, N} when N > 0 -> State #state { depth_delta = N } |