diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-09-23 19:01:31 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-09-23 19:01:31 +0100 |
| commit | 3ac34b2a2765d359f946e37ec42c06c11411b106 (patch) | |
| tree | 710b0057415c52f5938e2443a130d2939d315351 /packaging | |
| parent | 71f7201c5958142b9bcfce82eb1857b31112810f (diff) | |
| download | rabbitmq-server-git-3ac34b2a2765d359f946e37ec42c06c11411b106.tar.gz | |
replace msg_store:attrs with contains
This is a step on the path to getting rid of message attributes in msg_store.
msg_store:attrs was only being used in disk_queue:prune, to detect
when the store contained a non-persistent message and remove that
message from the store and the rabbit_disk_queue table.
Now rabbit_disk_queue records contain an IsPersistent flag. By making
the msg count delta generator pay attention to that flag we trim
non-persistent messages from the store during its initialisation,
disk_queue:prune no longer needs to remove messages from the store, it
just needs to remove all messages from the rabbit_disk_queue table
which are no longer referenced by the store - hence the new
msg_store:contains function.
Keeping the IsPersistent flag in the rabbit_disk_queue table is
sub-optimal since it means we store it once per message reference
rather than just once per message. That's a small price to pay though
for the cleaner interaction between the disk_queue and msg_store, and
the opportunity to remove the notion of message attributes from
msg_store altogether.
Populating the new field in rabbit_disk_queue is straightforward in
most places except disk_queue:tx_commit. That used to just be given
{MsgId, IsDelivered} tuples, so I had to change the API to {MsgId,
IsDelivered, IsPersistent} tuples.
Diffstat (limited to 'packaging')
0 files changed, 0 insertions, 0 deletions
