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
commitac94cb000726c30296fbe36ffd17d01861f9fac4 (patch)
treedac7b1e4f8890e7d3693741aab68a3a78ce9e83b
parentc3d7b796d946d357edb6717f5518e5ccc459c275 (diff)
downloadrabbitmq-server-ac94cb000726c30296fbe36ffd17d01861f9fac4.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 6ddfc3a3..3e45f026 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 }.