diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-07-28 14:00:39 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-07-28 14:00:39 +0100 |
commit | 95b7cce4bee12d5db53874c5fd54ce3ea4c19a3d (patch) | |
tree | b6f0724e8b8e58c5d131abe6371c79c9bda618ce | |
parent | 599c908c25221d82ee7812137e51a4265af6e951 (diff) | |
download | rabbitmq-server-95b7cce4bee12d5db53874c5fd54ce3ea4c19a3d.tar.gz |
The expectation is we will only return details for persistent messages here.
-rw-r--r-- | src/rabbit_queue_index.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl index 322c0f8a..08c81a94 100644 --- a/src/rabbit_queue_index.erl +++ b/src/rabbit_queue_index.erl @@ -471,11 +471,14 @@ recover_segment(ContainsCheckFun, CleanShutdown, {SegEntries1, UnackedCountDelta} = segment_plus_journal(SegEntries, JEntries), array:sparse_foldl( - fun (RelSeq, {{MsgId, MsgProps, _IsPersistent}, Del, no_ack}, + fun (RelSeq, {{MsgId, MsgProps, IsPersistent}, Del, no_ack}, {SegmentAndDirtyCount, Bytes}) -> {recover_message(ContainsCheckFun(MsgId), CleanShutdown, Del, RelSeq, SegmentAndDirtyCount), - Bytes + MsgProps#message_properties.size} + Bytes + case IsPersistent of + true -> MsgProps#message_properties.size; + false -> 0 + end} end, {{Segment #segment { unacked = UnackedCount + UnackedCountDelta }, 0}, 0}, SegEntries1). |