summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Mazzoli <francesco@rabbitmq.com>2012-09-06 16:45:36 +0100
committerFrancesco Mazzoli <francesco@rabbitmq.com>2012-09-06 16:45:36 +0100
commit89b18aad7a39abbe87cf76da0668435ccd299445 (patch)
treedac7b1e4f8890e7d3693741aab68a3a78ce9e83b
parent9b03ee1ac4acf2c81d1a258b191d41ac13e6badc (diff)
downloadrabbitmq-server-git-89b18aad7a39abbe87cf76da0668435ccd299445.tar.gz
two little fixes...
It turns out that the problems I had with the kill-multi test on default was because the messages were start publishing right after the queue was created. I thought that once queue.declare returned, it meant that the queue was present on all nodes, but it wasn't, and for this reason we had the mismatching messages and the purging. Once I discovered that, I went back two my code and immediately discovered two very silly mistakes. I feel silly as well now. I think that bug 25130 still has a reason to extist, but I wouldn't worry about it now.
-rw-r--r--src/rabbit_mirror_queue_slave.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index 6ddfc3a3ad..3e45f02638 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -826,7 +826,7 @@ process_instruction({fetch, AckRequired, MsgId, Remaining},
backing_queue_state = BQS }) ->
QLen = BQ:len(BQS),
{State1, Delta} =
- case {QLen - 1} of
+ case QLen - 1 of
Remaining ->
{{#basic_message{id = MsgId}, _IsDelivered,
AckTag, Remaining}, BQS1} = BQ:fetch(AckRequired, BQS),
@@ -936,7 +936,7 @@ set_synchronised(Delta, AddAnyway,
Q1#amqqueue{sync_slave_pids = [Self | SSPids1]})
end
end);
- _ when DepthDelta1 > 0 ->
+ _ when DepthDelta1 >= 0 ->
ok
end,
State #state { depth_delta = DepthDelta1 }.