diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-05-15 21:06:00 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-05-15 21:06:00 +0100 |
| commit | a5e282ab97f58eedc7cb5af72d5cab565d31348e (patch) | |
| tree | 73cb233a8b4a6371a3880a0156404476af3ea4dc /src | |
| parent | ee8fca41ef33791d149338aa7f2fd1c6f1f06d48 (diff) | |
| download | rabbitmq-server-git-a5e282ab97f58eedc7cb5af72d5cab565d31348e.tar.gz | |
Correct an accounting bug in queue recovery. By incorrectly counting duplicated acks, we remove too few acks when constructing a segment's combined ackcount, leading to an ackcount that is too high. On (dirty) recovery, this will cause the qi to report it's length as being shorter than in really is, which will then cause the δ record in vq to be too short. Subsequent loading of segments (δ => β/γ in q3) will then crash as more publishes will be found than expected. Note that to trigger this bug, Rabbit must crash/be-killed in the first place, during flushing of the qi journal in a durable queue with persistent messages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_queue_index.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl index 1e58338449..41f25a8a3e 100644 --- a/src/rabbit_queue_index.erl +++ b/src/rabbit_queue_index.erl @@ -948,7 +948,7 @@ journal_minus_segment1({no_pub, del, no_ack}, {?PUB, del, no_ack}) -> journal_minus_segment1({no_pub, no_del, ack} = Obj, {?PUB, del, no_ack}) -> {Obj, 0, 0}; journal_minus_segment1({no_pub, no_del, ack}, {?PUB, del, ack}) -> - {undefined, 0, 0}; + {undefined, 0, 1}; %% Deliver and ack in journal journal_minus_segment1({no_pub, del, ack} = Obj, {?PUB, no_del, no_ack}) -> |
