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 | f6435ff72188456378082408da4bfa32c1445082 (patch) | |
| tree | b3588f8f8da2ea53969abd81020ecde444e4c783 | |
| parent | c1f2e81ec9029fcd289d48c600cf71bf2d0713df (diff) | |
| download | rabbitmq-server-git-f6435ff72188456378082408da4bfa32c1445082.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 e52c570e09..dcc7e5f62c 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 } |
