summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-05-20 12:46:57 +0100
committerMatthew Sackman <matthew@lshift.net>2009-05-20 12:46:57 +0100
commite720187f953f7b926bafd46dbae75f60c4251a9d (patch)
tree71999952fe4c316e0b4e2bf59bf6fac9e8f4f085 /include
parentd383423a040402a6c43ea7f0b092a0fdf6340447 (diff)
downloadrabbitmq-server-git-e720187f953f7b926bafd46dbae75f60c4251a9d.tar.gz
So the mnesia table now contains next_seq_id. This means we can cope with gaps appearing.
There are now two forms of publish, tx_commit and requeue. The first forms behave as before, with contiguous seq_ids. The second form (_with_seq(s)) take either a n extra seq arg or in the case of a list, a tuple in which the desired seq_id is mentioned. This can always just be the atom 'next'. The invariant on these lists is that the seq_ids are always ascending. Thus requeue now effectively takes a mapping: [{{msgId,oldSeqId} -> newSeqId}]. On startup, because the sequence Ids are still private at that point, shuffle_up is still called as before, although now gaps can appear anywhere, not just in the delivered section. We collapse everything up simply because we don't know where the previous NextReadSeqId marker was. If we did know that then we'd know that beyond that point we had a well formed linked list, and only had to patch up before that. This further requires that even though we have a linked list, the seq_ids must be ascending.
Diffstat (limited to 'include')
-rw-r--r--include/rabbit.hrl2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl
index 6212d4f327..0096ada1b8 100644
--- a/include/rabbit.hrl
+++ b/include/rabbit.hrl
@@ -64,7 +64,7 @@
-record(basic_message, {exchange_name, routing_key, content, guid, is_persistent}).
--record(dq_msg_loc, {queue_and_seq_id, is_delivered, msg_id}).
+-record(dq_msg_loc, {queue_and_seq_id, is_delivered, msg_id, next_seq_id}).
%%----------------------------------------------------------------------------