summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-26 13:22:26 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-26 13:22:26 +0000
commit62cb10b41e571ce6f7bf0abe4c10e43a4adc4683 (patch)
tree673300964f74df5f06b1144a141d25d224c3b2e7
parent58d6b570cb3b50b58b0ebe1b52504f16ea077368 (diff)
downloadrabbitmq-server-62cb10b41e571ce6f7bf0abe4c10e43a4adc4683.tar.gz
don't log stats for nacks (originating from queue deaths)bug23410
-rw-r--r--src/rabbit_channel.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index ec4ca89e..a4c6e14d 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -508,6 +508,8 @@ confirm(MsgSeqNos, QPid, State = #ch{unconfirmed = UC}) ->
remove_qmsg(MsgSeqNo, QPid, {XName, Qs}, {MXs, UC}, State) ->
Qs1 = sets:del_element(QPid, Qs),
+ %% these confirms will be emitted even when a queue dies, but that
+ %% should be fine, since the queue stats get erased immediately
maybe_incr_stats([{{QPid, XName}, 1}], confirm, State),
case sets:size(Qs1) of
0 -> {[{MsgSeqNo, XName} | MXs], gb_trees:delete(MsgSeqNo, UC)};
@@ -1252,10 +1254,10 @@ lock_message(true, MsgStruct, State = #ch{unacked_message_q = UAMQ}) ->
lock_message(false, _MsgStruct, State) ->
State.
+send_nacks([], State) ->
+ State;
send_nacks(MXs, State) ->
- MsgSeqNos = [ begin maybe_incr_stats([{ExchangeName, 1}], reject, State),
- MsgSeqNo
- end || {MsgSeqNo, ExchangeName} <- MXs ],
+ MsgSeqNos = [ MsgSeqNo || {MsgSeqNo, _} <- MXs ],
coalesce_and_send(MsgSeqNos,
fun(MsgSeqNo, Multiple) ->
#'basic.nack'{delivery_tag = MsgSeqNo,