summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_queue_index.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl
index 2805584124..e4f31ab36f 100644
--- a/src/rabbit_queue_index.erl
+++ b/src/rabbit_queue_index.erl
@@ -349,11 +349,11 @@ pre_publish(MsgOrId, SeqId, MsgProps, IsPersistent, IsDelivered, JournalSizeHint
DC
end,
- add_to_journal(SeqId, {IsPersistent, Bin, MsgBin},
- maybe_flush_pre_publish_cache(
+ State2 = add_to_journal(SeqId, {IsPersistent, Bin, MsgBin}, State1),
+ maybe_flush_pre_publish_cache(
JournalSizeHint,
- State1#qistate{pre_publish_cache = PPC1,
- delivered_cache = DC1})).
+ State2#qistate{pre_publish_cache = PPC1,
+ delivered_cache = DC1}).
%% pre_publish_cache is the entry with most elements when compared to
%% delivered_cache so we only check the former in the guard.