diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-11-27 13:44:47 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-11-27 13:44:47 +0000 |
| commit | 86f859cb22f7181826779903120178883bbdf85e (patch) | |
| tree | 8a39940874941f0b8a27c1e476008e3ac48ff8c8 /include | |
| parent | 0d4dafc9d4f28eccc03bbdb4927697510fd294b4 (diff) | |
| download | rabbitmq-server-git-86f859cb22f7181826779903120178883bbdf85e.tar.gz | |
There was a bug. Now it has gone away. It arose when γ has a partial segment, and then memory is made available, and the next msg is persistent. It will go into the partial segment in qi, but will also be in q1 in vq. This lead to the msg being duplicated. Solution is to track the max seq id beyond the end of the γs, and thus drop anything being returned in the segment from qi with a seq_id above this max seq id.
Diffstat (limited to 'include')
| -rw-r--r-- | include/rabbit_queue.hrl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/rabbit_queue.hrl b/include/rabbit_queue.hrl index 165a7e7b99..69ad7588c3 100644 --- a/include/rabbit_queue.hrl +++ b/include/rabbit_queue.hrl @@ -46,13 +46,15 @@ }). -record(gamma, - { seq_id, - count + { start_seq_id, + count, + end_seq_id %% note the end_seq_id is always >, not >= }). -ifdef(use_specs). --type(gamma() :: #gamma { seq_id :: non_neg_integer(), - count :: non_neg_integer () }). +-type(gamma() :: #gamma { start_seq_id :: non_neg_integer(), + count :: non_neg_integer (), + end_seq_id :: non_neg_integer() }). -endif. |
