summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-05-22 18:46:53 +0100
committerMatthew Sackman <matthew@lshift.net>2009-05-22 18:46:53 +0100
commit22ebfeefb80c1bd9584e420aa803ec0a72c45e1a (patch)
tree8fde7303fd15ad564a3e52fca2383b7b03959d0c
parent17cc6ac00585977c4e84fecd584fd89d024fc195 (diff)
downloadrabbitmq-server-git-22ebfeefb80c1bd9584e420aa803ec0a72c45e1a.tar.gz
duh!
-rw-r--r--src/rabbit_disk_queue.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_disk_queue.erl b/src/rabbit_disk_queue.erl
index 81617b8b6c..7710a0a226 100644
--- a/src/rabbit_disk_queue.erl
+++ b/src/rabbit_disk_queue.erl
@@ -705,7 +705,7 @@ internal_tx_commit(Q, PubMsgSeqIds, AckSeqIds,
[{Q, ReadSeqId2, WriteSeqId2, Length2}] ->
{ReadSeqId2, WriteSeqId2, Length2}
end,
- InitReadSeqId2 = if InitReadSeqId == InitWriteSeqId andalso FirstSeqIdTo > InitWriteSeqId ->
+ InitReadSeqId2 = if InitReadSeqId == InitWriteSeqId andalso FirstSeqIdTo > InitWriteSeqId andalso FirstSeqIdTo /= next ->
FirstSeqIdTo;
true -> InitReadSeqId
end,
@@ -812,7 +812,7 @@ internal_requeue(Q, MsgSeqIds = [{_, FirstSeqIdTo}|MsgSeqIdsTail],
%% the Q _must_ already exist
[{Q, ReadSeqId, WriteSeqId, Length}] = ets:lookup(Sequences, Q),
ReadSeqId2 =
- if ReadSeqId == WriteSeqId andalso FirstSeqIdTo > WriteSeqId -> FirstSeqIdTo;
+ if ReadSeqId == WriteSeqId andalso FirstSeqIdTo > WriteSeqId andalso FirstSeqIdTo /= next -> FirstSeqIdTo;
true -> ReadSeqId
end,
MsgSeqIdsZipped = lists:zip(MsgSeqIds, MsgSeqIdsTail ++ [{next, next}]),