diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-02-13 21:25:44 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-02-13 21:25:44 +0000 |
| commit | ce0244cb0ca2338e92884f54cae5af0a984e7e1e (patch) | |
| tree | dd637043e7032140609db3aea44a7f1cf948a8f3 /scripts | |
| parent | 9df36f314073d5e174b18d637399fd49587dbeec (diff) | |
| download | rabbitmq-server-git-ce0244cb0ca2338e92884f54cae5af0a984e7e1e.tar.gz | |
drop_expired_msgs only when the queue head changes
And on recover. And when the timer goes off. That's all we need.
new call sites:
- in deliver_or_enqueue/3, when enqueuing a message (that we couldn't
deliver to a consumer straight away) with an expiry to the head.
the queue. NB: Previously we were always (re)setting a timer when
enqueuing a message with an expiry, which is wasteful when the new
message isn't at the head (i.e. the queue was non-empty) or when it
needs expiring immediately.
- requeue_and_run/2, since a message may get requeued to the
head. This call site arises due to removal of the
run_message_queue/1 call site (see below).
unchanged call sites:
- init_ttl/2 - this is the recovery case
- fetch/2, after fetching - this is the basic "queue head changes"
case
- handle_info/drop_expired - this is the message expiry timer
removed call sites:
- run_message_queue/1 - this internally calls fetch/2 (see above) but
also invoking drop_expired_msgs at the beginning. This now happens
at the call sites, where it is necessary. Which actually only is in
requeue_and_run, and not the others, none of which change the queue
content prior to calling run_message_queue/1
- possibly_unblock/3 - unblocking of consumers
- handle_call/basic_consumer - adding a consumer
- handle_call/basic_get, prior to the call to fetch/2.
- handle_call/stat
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
