diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-07-15 18:03:21 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-07-15 18:03:21 +0100 |
| commit | 6467e9a1c93c5b88cee3b214f8e9fc89b83743cb (patch) | |
| tree | 58338ae20174e781390b5d49a345431aa9d90deb /packaging | |
| parent | 407314953d34d39f38178b99797adf45d31b2f53 (diff) | |
| download | rabbitmq-server-git-6467e9a1c93c5b88cee3b214f8e9fc89b83743cb.tar.gz | |
Substantial changes to mixed_queue.
Previously, persistent and non-persistent messages went into the same queue on disk. The advantage of this is that you don't need to track which queue you're currently reading from and for how many messages. However, the downside to this is that on queue recovery you need to iterate through the entire queue and delete all non-persistent messages. This takes a huge amount of time.
So now this is changed. Each amqqueue is now two on disk queues. One for persistent messages and one for non-persistent messages. Thus queue recovery is now trivial - just delete the non-persistent queue. However, we now _always_ use the erlang queue in mixed_queue to track (in disk mode) how many of each queue we need to read (i.e. run-length encoding). This, in the worst case (alternating persistent and non-persistent) is per-message cost. It's possible we need some sort of disk-based queue (AGH!). Not sure. Provided the queue only contains one sort of message, it degenerates to a simple single counter.
All tests pass. However, there is a bug, which is that on recovery, the size of the queue (RAM cost) is not known. As such, the reporting of the queue to the queue_mode manager on queue recovery is incorrect (it starts of 0, and can go -ve). I've not decided how to fix this yet, because I do not want to have to iterate through all the messages to get the queue size out!
Diffstat (limited to 'packaging')
0 files changed, 0 insertions, 0 deletions
