diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-03-08 15:44:58 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-03-08 15:44:58 +0000 |
| commit | 962ea81092a1ebbec6b1cbe26c5c326bab66f3ad (patch) | |
| tree | aea61d2ef370b3453adab13a1a7030e8587b01fc | |
| parent | f08e57cc08a16a3c31955981838970e4a3b10c74 (diff) | |
| download | rabbitmq-server-git-962ea81092a1ebbec6b1cbe26c5c326bab66f3ad.tar.gz | |
Just some more notes
| -rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index e17eef01ac..87ce31d8df 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -359,7 +359,18 @@ promote_me(From, #state { q = Q, %% publish stuff by sending it to ourself - we must pass it %% through to this init, otherwise we can violate ordering %% constraints. - GTC = dict:from_list( + + %% MTC should contain only entries for which we are still + %% expecting confirms to come back to use from the underlying BQ. + + %% TODO: what do we do with entries in MS that are 'confirmed' + %% already? Well they should end up in the master queue's state, + %% and the confirms should be issued either by the + %% amqqueue_process if 'immediately', or otherwise by the master + %% queue on validate_message?! That's disgusting. There's no way + %% validate_message should be side-effecting... though we could at + %% least ensure it's idempotent. Hmm. + MTC = dict:from_list( [{MsgId, {ChPid, MsgSeqNo}} || {MsgId, {published, ChPid, MsgSeqNo}} <- dict:to_list(MS)]), AckTags = [AckTag || {_MsgId, AckTag} <- dict:to_list(MA)], @@ -367,7 +378,7 @@ promote_me(From, #state { q = Q, || {_ChPid, PubQ} <- dict:to_list(SQ)]), QueueState = rabbit_amqqueue_process:init_with_backing_queue_state( Q, rabbit_mirror_queue_master, MasterState, RateTRef, - AckTags, Deliveries, GTC), + AckTags, Deliveries, MTC), {become, rabbit_amqqueue_process, QueueState, hibernate}. noreply(State) -> |
