diff options
| author | kjnilsson <knilsson@pivotal.io> | 2019-02-08 11:44:18 +0000 |
|---|---|---|
| committer | kjnilsson <knilsson@pivotal.io> | 2019-02-08 11:46:07 +0000 |
| commit | e209745998c6e8da859bf4e42388f93dcdc564f6 (patch) | |
| tree | d0d5e57bdacdf270cd9fcb9f57fff7c47aec44df | |
| parent | fcac9ca6e9ae011158bf12ded8ec3671b4b5c3a1 (diff) | |
| download | rabbitmq-server-git-e209745998c6e8da859bf4e42388f93dcdc564f6.tar.gz | |
Remove rabbit_fifo_client priority toggle
This code is a remnant from when rabbit_fifo was inside ra and it tried
to maintain order of low and normal operations within a single process.
For rabbit this is not required as it is ok for acks to overtake
publishes.
| -rw-r--r-- | src/rabbit_fifo_client.erl | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/rabbit_fifo_client.erl b/src/rabbit_fifo_client.erl index 5cc73b5d63..ef0991f675 100644 --- a/src/rabbit_fifo_client.erl +++ b/src/rabbit_fifo_client.erl @@ -73,7 +73,6 @@ {maybe(term()), rabbit_fifo:command()}}, consumer_deliveries = #{} :: #{rabbit_fifo:consumer_tag() => #consumer{}}, - priority = normal :: normal | low, block_handler = fun() -> ok end :: fun(() -> ok), unblock_handler = fun() -> ok end :: fun(() -> ok), timeout :: non_neg_integer() @@ -710,7 +709,6 @@ consumer_id(ConsumerTag) -> send_command(Server, Correlation, Command, Priority, #state{pending = Pending, - priority = Priority, soft_limit = SftLmt} = State0) -> {Seq, State} = next_seq(State0), ok = ra:pipeline_command(Server, Command, Seq, Priority), @@ -719,20 +717,7 @@ send_command(Server, Correlation, Command, Priority, false -> ok end, {Tag, State#state{pending = Pending#{Seq => {Correlation, Command}}, - priority = Priority, - slow = Tag == slow}}; -%% once a low priority command has been sent it's not possible to then -%% send a normal priority command without risking that commands are -%% re-ordered. From an AMQP 0.9.1 point of view this should only affect -%% channels that _both_ publish and consume as the enqueue operation is the -%% only low priority one that is sent. -send_command(Node, Correlation, Command, normal, - #state{priority = low} = State) -> - send_command(Node, Correlation, Command, low, State); -send_command(Node, Correlation, Command, low, - #state{priority = normal} = State) -> - send_command(Node, Correlation, Command, low, - State#state{priority = low}). + slow = Tag == slow}}. resend_command(Node, Correlation, Command, #state{pending = Pending} = State0) -> |
