diff options
| author | Diana Corbacho <diana.corbacho@erlang-solutions.com> | 2016-05-14 09:40:15 +0100 |
|---|---|---|
| committer | Diana Corbacho <diana.corbacho@erlang-solutions.com> | 2016-05-14 09:40:15 +0100 |
| commit | 77332e682250f4e6a315de81abadd9e3a682e416 (patch) | |
| tree | b61f9a903b2ce9dbd33377196034904162cf3afb /src | |
| parent | 8e9ec88fb5ad318cf636770e95bda7c70400a5fb (diff) | |
| download | rabbitmq-server-git-77332e682250f4e6a315de81abadd9e3a682e416.tar.gz | |
Use AckRequired in drop_one as priority queues return tuples {Priority, AckTag}
* Fetch and drop operations of priority queues' consumers with no_ack=true,
were changed internally to no_ack=false in the requests to the mirror slaves.
Those messages would never be acknowledge by the consumer, as it was not part
of the consumers configuration.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_mirror_queue_master.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl index e447e9de82..8246fcea7e 100644 --- a/src/rabbit_mirror_queue_master.erl +++ b/src/rabbit_mirror_queue_master.erl @@ -363,7 +363,7 @@ fetch(AckRequired, State = #state { backing_queue = BQ, State1 = State #state { backing_queue_state = BQS1 }, {Result, case Result of empty -> State1; - {_MsgId, _IsDelivered, AckTag} -> drop_one(AckTag, State1) + {_MsgId, _IsDelivered, _AckTag} -> drop_one(AckRequired, State1) end}. drop(AckRequired, State = #state { backing_queue = BQ, @@ -372,7 +372,7 @@ drop(AckRequired, State = #state { backing_queue = BQ, State1 = State #state { backing_queue_state = BQS1 }, {Result, case Result of empty -> State1; - {_MsgId, AckTag} -> drop_one(AckTag, State1) + {_MsgId, _AckTag} -> drop_one(AckRequired, State1) end}. ack(AckTags, State = #state { gm = GM, @@ -556,10 +556,10 @@ depth_fun() -> %% Helpers %% --------------------------------------------------------------------------- -drop_one(AckTag, State = #state { gm = GM, - backing_queue = BQ, - backing_queue_state = BQS }) -> - ok = gm:broadcast(GM, {drop, BQ:len(BQS), 1, AckTag =/= undefined}), +drop_one(AckRequired, State = #state { gm = GM, + backing_queue = BQ, + backing_queue_state = BQS }) -> + ok = gm:broadcast(GM, {drop, BQ:len(BQS), 1, AckRequired}), State. drop(PrevLen, AckRequired, State = #state { gm = GM, |
