diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2012-04-03 20:15:36 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-04-03 20:15:36 +0100 |
| commit | 7bcc4d43ecf2161555363c358f4c45c438fbedb9 (patch) | |
| tree | c32ebe37a72293cedf361e2e1176ee576d12a576 /src | |
| parent | 8000d9885725e220ea006c332dbcea028cad96d9 (diff) | |
| download | rabbitmq-server-git-7bcc4d43ecf2161555363c358f4c45c438fbedb9.tar.gz | |
revise nack handling in queue (for dlx)
- with the changes introduced in bug 24750, the "lost" message count
logged was misleading since it would not include any messages still
pending confirmation from other queues. Fix that.
- normal queue terminations are not log worthy
- splitting log information across two entries loses context,
i.e. other log entries might appear inbetween. So now we collate all
the information into a single log entry.
- saying that messages were "lost" is misleading - we simply don't
know what happened to them. Make this clear(er).
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 19e1736a34..21e576a653 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -757,15 +757,14 @@ handle_queue_down(QPid, Reason, State = #q{queue_monitors = QMons, error -> noreply(State); {ok, _} -> - rabbit_log:info("DLQ ~p (for ~s) died~n", - [QPid, rabbit_misc:rs(qname(State))]), - {MsgSeqNoAckTags, UC1} = dtree:take(QPid, UC), - case (MsgSeqNoAckTags =/= [] andalso - rabbit_misc:is_abnormal_termination(Reason)) of - true -> rabbit_log:warning("Dead queue lost ~p messages~n", - [length(MsgSeqNoAckTags)]); + case rabbit_misc:is_abnormal_termination(Reason) of + true -> {Lost, _UC1} = dtree:take_all(QPid, UC), + rabbit_log:warning( + "DLQ ~p for ~s died with ~p unconfirmed messages~n", + [QPid, rabbit_misc:rs(qname(State)), length(Lost)]); false -> ok end, + {MsgSeqNoAckTags, UC1} = dtree:take(QPid, UC), cleanup_after_confirm( [AckTag || {_MsgSeqNo, AckTag} <- MsgSeqNoAckTags], State#q{queue_monitors = dict:erase(QPid, QMons), |
