diff options
author | Emile Joubert <emile@rabbitmq.com> | 2013-06-28 13:49:24 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2013-06-28 13:49:24 +0100 |
commit | 813c11da55338040e549e146496001937de2dd82 (patch) | |
tree | 7f56b4ab1533635291afe629891c9a9952d7f98d | |
parent | 5cfa22a7dae1d251c6dd995a195a10c6ed5965eb (diff) | |
parent | 8466b2569451adbcde22c34e7a71f5a5f174026c (diff) | |
download | rabbitmq-server-813c11da55338040e549e146496001937de2dd82.tar.gz |
Merged stable into default
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 1 | ||||
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 1 | ||||
-rw-r--r-- | src/rabbit_variable_queue.erl | 3 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 3e3de10b..f08f8292 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}) -> + true = BQ:is_empty(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 49ba94ee..c52f8dd9 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -720,6 +720,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), + true = BQ:is_empty(BQS), {AckTag, BQS1} = BQ:publish_delivered(Msg, MsgProps, ChPid, BQS), {ok, maybe_store_ack(true, MsgId, AckTag, State1 #state { backing_queue_state = BQS1 })}; diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 5b39c2c6..73ab64bf 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -546,8 +546,7 @@ publish_delivered(Msg = #basic_message { is_persistent = IsPersistent, id = MsgId }, MsgProps = #message_properties { needs_confirming = NeedsConfirming }, - _ChPid, State = #vqstate { len = 0, - next_seq_id = SeqId, + _ChPid, State = #vqstate { next_seq_id = SeqId, out_counter = OutCount, in_counter = InCount, persistent_count = PCount, |