diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-06-27 12:49:10 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-06-27 12:49:10 +0100 |
commit | 0178750cc6018eaa1d8929016e8c5ff988eab541 (patch) | |
tree | 61e5887b8b31d0d3173f8cbf347d59ec2b5f9f5b | |
parent | de49b4f0f9d28f91b05e6f179cd7e63506936854 (diff) | |
download | rabbitmq-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.erl | 1 | ||||
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 1 |
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 })}; |