diff options
| author | kjnilsson <knilsson@pivotal.io> | 2019-09-25 08:45:03 +0100 |
|---|---|---|
| committer | kjnilsson <knilsson@pivotal.io> | 2019-09-25 09:11:17 +0100 |
| commit | 4123bfad42ba632a86909192641188fe36fc1904 (patch) | |
| tree | f4113c1907a1f11e97e0f92de8f41ae67179924d | |
| parent | 697e0061adb6f10ed254a8c0702d4dad105a1fc1 (diff) | |
| download | rabbitmq-server-git-4123bfad42ba632a86909192641188fe36fc1904.tar.gz | |
Fix regression where queue exchange rates were too high
Prior to 3.8 only the queue masters were tracked in the queue_names map
inside the channel and these were used to filter the increments of this
metric. Here we instead use the list of routed amqqueue records to
update which should be correct for all queue types.
[#168729890]
| -rw-r--r-- | src/rabbit_channel.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index b8869a23f3..8b5fe91cc9 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -2231,9 +2231,9 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{ case rabbit_event:stats_level(State, #ch.stats_timer) of fine -> ?INCR_STATS(exchange_stats, XName, 1, publish), - [?INCR_STATS(queue_exchange_stats, {QName, XName}, 1, publish) || - QRef <- AllDeliveredQRefs, - {ok, QName} <- [maps:find(QRef, QNames1)]]; + [?INCR_STATS(queue_exchange_stats, + {amqqueue:get_name(Q), XName}, 1, publish) || + Q <- Qs]; _ -> ok end, |
