summaryrefslogtreecommitdiff
path: root/src/lqueue.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-02-12 22:34:33 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2013-02-12 22:34:33 +0000
commitd4ad5d0e15e6d5a885aac2539939469e6e7cb7e8 (patch)
treedb47df98c4565c9ed531c6d1a4f35ca440c2f26a /src/lqueue.erl
parentefba058a32c682fdb29012d987405c246cb9ed07 (diff)
downloadrabbitmq-server-git-d4ad5d0e15e6d5a885aac2539939469e6e7cb7e8.tar.gz
drop expired messages post basic_get
...so messages with an expiry that are at the head of the queue after a basic.get do not get stuck there in the absence of other queue activity. Rather than simply adding a call to drop_expired_messages/1 after the call to fetch/1 in the basic_get code, we insert the call into fetch/1, which allows us to remove it from the other call site. Thus fetch/1 preserves the invariant we are after, namely that whenever a queue has a message at the head with an expiry, there is a timer set to drop said message. Note that the message count returned by basic.get does not reflect the dropping of expired messages after the fetched message. That's ok since we make no guarantee that messages are expired straight away. And note that on 'default' (rather than 'stable') the behaviour is actually different; due to various other changes there we will in fact return the reduced count.
Diffstat (limited to 'src/lqueue.erl')
0 files changed, 0 insertions, 0 deletions