diff options
| -rw-r--r-- | include/rabbit_backing_queue_spec.hrl | 2 | ||||
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_master.erl | 8 | ||||
| -rw-r--r-- | src/rabbit_variable_queue.erl | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl index 854011cd9d..bf93baba5d 100644 --- a/include/rabbit_backing_queue_spec.hrl +++ b/include/rabbit_backing_queue_spec.hrl @@ -51,7 +51,7 @@ -spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()}; (false, state()) -> {fetch_result(undefined), state()}). -spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). --spec(fold/3 :: ([ack()], msg_fun(), state()) -> state()). +-spec(fold/3 :: (msg_fun(), state(), [ack()]) -> state()). -spec(requeue/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). -spec(len/1 :: (state()) -> non_neg_integer()). diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 3843ed1a36..fd2d7214d2 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1279,7 +1279,7 @@ handle_cast({reject, AckTags, Requeue, ChPid}, State) -> case Requeue of true -> requeue_and_run(AckTags, State1); false -> Fun = dead_letter_fun(rejected, State), - BQS1 = BQ:fold(AckTags, Fun, BQS), + BQS1 = BQ:fold(Fun, BQS, AckTags), State1#q{backing_queue_state = BQS1} end end)); diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl index 4b298341de..bfdab487f3 100644 --- a/src/rabbit_mirror_queue_master.erl +++ b/src/rabbit_mirror_queue_master.erl @@ -249,10 +249,10 @@ ack(AckTags, State = #state { gm = GM, {MsgIds, State #state { backing_queue_state = BQS1, ack_msg_id = AM1 }}. -fold(AckTags, MsgFun, State = #state { gm = GM, - backing_queue = BQ, - backing_queue_state = BQS}) -> - BQS1 = BQ:fold(AckTags, MsgFun, BQS), +fold(MsgFun, State = #state { gm = GM, + backing_queue = BQ, + backing_queue_state = BQS}, AckTags) -> + BQS1 = BQ:fold(MsgFun, BQS, AckTags), ok = gm:broadcast(GM, {fold, MsgFun, AckTags}), State #state { backing_queue_state = BQS1 }. diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 0d1f06f8ee..1b32d21197 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -636,9 +636,9 @@ ack(AckTags, State) -> persistent_count = PCount1, ack_out_counter = AckOutCount + length(AckTags) })}. -fold(_AckTags, undefined, State) -> +fold(undefined, State, _AckTags) -> State; -fold(AckTags, MsgFun, State = #vqstate{pending_ack = PA}) -> +fold(MsgFun, State = #vqstate{pending_ack = PA}, AckTags) -> lists:foldl( fun(SeqId, State1) -> {MsgStatus, State2} = |
