diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-06-21 17:16:37 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-06-21 17:16:37 +0100 |
| commit | c7af8e11b27a82187b8525fa441e9be42873469b (patch) | |
| tree | a3b73391b00be0e9ceee62a98e186d1778fe0701 | |
| parent | 571c002220ae2c0422f121088e4f16fc8f9ad280 (diff) | |
| download | rabbitmq-server-git-c7af8e11b27a82187b8525fa441e9be42873469b.tar.gz | |
remove redundant conditions and assertions
...already covered by state invariant
| -rw-r--r-- | src/rabbit_variable_queue.erl | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 0f0a14c627..fca0e80ac9 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -1123,16 +1123,9 @@ publish(neither, MsgStatus, State) -> end_seq_id = SeqId + 1 }, State1 #vqstate { delta = combine_deltas(Delta, Delta1) }. -store_alpha_entry(MsgStatus, State = #vqstate { - q1 = Q1, - q2 = Q2, - delta = #delta { count = DeltaCount }, - q3 = Q3, - q4 = Q4 }) -> - case bpqueue:is_empty(Q2) andalso 0 == DeltaCount andalso - bpqueue:is_empty(Q3) of - true -> true = queue:is_empty(Q1), %% ASSERTION - State #vqstate { q4 = queue:in(MsgStatus, Q4) }; +store_alpha_entry(MsgStatus, State = #vqstate {q1 = Q1, q3 = Q3, q4 = Q4 }) -> + case bpqueue:is_empty(Q3) of + true -> State #vqstate { q4 = queue:in(MsgStatus, Q4) }; false -> maybe_push_q1_to_betas( State #vqstate { q1 = queue:in(MsgStatus, Q1) }) end. |
