diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-05-15 19:22:47 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-05-15 19:22:47 +0100 |
| commit | 2ea02e900f282ae61eadee19798fd562e88f8743 (patch) | |
| tree | 3aa1185be809aefff901c9d4e0c9d693092353b5 /src | |
| parent | 65bdccc49c12885f50b6db30425f4230513b0f6f (diff) | |
| download | rabbitmq-server-git-2ea02e900f282ae61eadee19798fd562e88f8743.tar.gz | |
fix up comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_queue_index.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl index 9f74004208..6788debe71 100644 --- a/src/rabbit_queue_index.erl +++ b/src/rabbit_queue_index.erl @@ -875,9 +875,10 @@ journal_plus_segment(JEntries, SegEntries) -> end end, SegEntries, JEntries). -%% Here, the Out is the Seg Array which we may be adding to (for -%% items only in the journal), modifying (bits in both), or erasing -%% from (ack in journal, not segment). +%% Here, the result is the item which we may be adding to (for items +%% only in the journal), modifying in (bits in both), or, when +%% returning 'undefined', erasing from (ack in journal, not segment) +%% the segment array. journal_plus_segment1({?PUB, no_del, no_ack} = Obj, not_found) -> Obj; journal_plus_segment1({?PUB, del, no_ack} = Obj, not_found) -> @@ -912,8 +913,11 @@ journal_minus_segment(JEntries, SegEntries) -> AcksRemoved + AcksRemovedDelta} end, {array_new(), 0, 0}, JEntries). -%% Here, the Out is a fresh journal that we're filling with valid -%% entries. PubsRemoved and AcksRemoved only get increased when a +%% Here, the result is a triple with the first element containing the +%% item we are adding to or modifying in the (initially fresh) journal +%% array. If the item is 'undefined' we leave the journal array +%% alone. The other two elements of the triple are the deltas for +%% PubsRemoved and AcksRemoved - these only get increased when a %% publish or ack is in both the journal and the segment. %% Both the same. Must be at least the publish |
