diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-11-22 15:50:14 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-11-22 15:50:14 +0000 |
commit | a01cf9e7870250ccdd0129c5cbb9b881581f4fc8 (patch) | |
tree | a862af5f5efe60a09c1736bf22107e5dee047263 | |
parent | 946623b70b0022ef88c3e4ae87c71c319693c043 (diff) | |
download | rabbitmq-server-a01cf9e7870250ccdd0129c5cbb9b881581f4fc8.tar.gz |
Explainbug23625
-rw-r--r-- | src/rabbit_channel.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 6ccc2e65..b1ef3b6b 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1357,6 +1357,16 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{ queue_monitors = QMons}) -> Qs = rabbit_amqqueue:lookup(DelQNames), {RoutingRes, DeliveredQPids} = rabbit_amqqueue:deliver_flow(Qs, Delivery), + %% The pmon:monitor_all/2 monitors all queues to which we + %% delivered. But we want to monitor even queues we didn't deliver + %% to, since we need their 'DOWN' messages to clean + %% queue_names. So we also need to monitor each QPid from + %% queues. But that only gets the masters (which is fine for + %% cleaning queue_names), so we need the union of both. + %% + %% ...and we need to add even non-delivered queues to queue_names + %% since alternative algorithms to update queue_names less + %% frequently would in fact be more expensive in the common case. {QNames1, QMons1} = lists:foldl(fun (#amqqueue{pid = QPid, name = QName}, {QNames0, QMons0}) -> |