summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-05-18 15:56:57 +0100
committerMatthias Radestock <matthias@lshift.net>2010-05-18 15:56:57 +0100
commitf62e5cb4e28529a180a4dfd00470285a6578ec46 (patch)
tree173f0ad8dfef9487c05a19a96109f26d1d5e52b4 /src
parentfd10acefa0e9ac776bdd13b2da191bb16864dc3a (diff)
downloadrabbitmq-server-git-f62e5cb4e28529a180a4dfd00470285a6578ec46.tar.gz
correct comment
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_queue_index.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl
index 93fd3759cc..39cbf1b36a 100644
--- a/src/rabbit_queue_index.erl
+++ b/src/rabbit_queue_index.erl
@@ -882,9 +882,7 @@ bool_to_int(false) -> 0.
%%----------------------------------------------------------------------------
%% Combine what we have just read from a segment file with what we're
-%% holding for that segment in memory. There must be no
-%% duplicates. Used when providing segment entries to the variable
-%% queue.
+%% holding for that segment in memory. There must be no duplicates.
journal_plus_segment(JEntries, SegEntries) ->
array:sparse_foldl(
fun (RelSeq, JObj, {SegEntriesOut, PubsAdded, AcksAdded}) ->
@@ -899,10 +897,13 @@ journal_plus_segment(JEntries, SegEntries) ->
AcksAdded + AcksAddedDelta}
end, {SegEntries, 0, 0}, JEntries).
-%% 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.
+%% Here, the result is a triple with the first element containing 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. The
+%% other two elements of the triple are the deltas for PubsAdded and
+%% AcksAdded - these get increased when a publish or ack is found in
+%% the journal.
journal_plus_segment1({?PUB, no_del, no_ack} = Obj, undefined) ->
{Obj, 1, 0};
journal_plus_segment1({?PUB, del, no_ack} = Obj, undefined) ->