summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-06-27 12:49:10 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-06-27 12:49:10 +0100
commit0178750cc6018eaa1d8929016e8c5ff988eab541 (patch)
tree61e5887b8b31d0d3173f8cbf347d59ec2b5f9f5b
parentde49b4f0f9d28f91b05e6f179cd7e63506936854 (diff)
downloadrabbitmq-server-0178750cc6018eaa1d8929016e8c5ff988eab541.tar.gz
Recreate that assertion up one level in the call stack, since the callers may still care about it even though VQ itself does not.
-rw-r--r--src/rabbit_amqqueue_process.erl1
-rw-r--r--src/rabbit_mirror_queue_slave.erl1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index c790a12d..f71e28e1 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -540,6 +540,7 @@ attempt_delivery(Delivery = #delivery{sender = SenderPid, message = Message},
{false, BQS1} ->
deliver_msgs_to_consumers(
fun (true, State1 = #q{backing_queue_state = BQS2}) ->
+ 0 = BQ:len(BQS2),
{AckTag, BQS3} = BQ:publish_delivered(
Message, Props, SenderPid, BQS2),
{{Message, Delivered, AckTag},
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index 964b0eb4..a2ea2c42 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -724,6 +724,7 @@ process_instruction({publish_delivered, ChPid, MsgProps,
Msg = #basic_message { id = MsgId }}, State) ->
State1 = #state { backing_queue = BQ, backing_queue_state = BQS } =
publish_or_discard(published, ChPid, MsgId, State),
+ 0 = BQ:len(BQS),
{AckTag, BQS1} = BQ:publish_delivered(Msg, MsgProps, ChPid, BQS),
{ok, maybe_store_ack(true, MsgId, AckTag,
State1 #state { backing_queue_state = BQS1 })};