diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-06-10 20:06:04 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-06-10 20:06:04 +0100 |
| commit | cf5e1ae896b8aceca66c776b3b98806eb3bfefcf (patch) | |
| tree | 2aea29174b75ba9be9cc6d2dae00c7e67a5db547 /include | |
| parent | bff27f50060f08aed88e16c7473750b371eeee3b (diff) | |
| download | rabbitmq-server-git-cf5e1ae896b8aceca66c776b3b98806eb3bfefcf.tar.gz | |
Took advantage of the gen_server2 priorities.
Reversed order - i.e. now when swapping out, the first thing is to alter the disk_queue, and the 2nd thing is to alter the queues.
And vice versa.
The reasoning is as follows:
Changing the disk_queue is a BIG operation because it affects every message in there, from all queues. In order to minimise the impa
ct of this operation, we must do it first, not second, because if we do it first, only persistent messages from durable queues will
be in there, whereas if we do it second, then all messages from all queues will be in there.
Similarly, when swapping in, altering the individual queues is the first thing to do because it prevents the disk queue from growing
further (i.e. only persistent messages to durable queues then make it to the disk queue), and each queue pulls out from the disk qu
eue all the messages in there and so subsequent delivery from the mixed queue becomes very fast (actually, this is a total lie because of the call to rabbit_disk_queue:phantom_deliver in rabbit_mixed_queue:deliver - if I could get rid of this or at least make it async then that would greatly improve matters).
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
