Skip to content

Commit 2846fe7

Browse files
committed
Make 3.9 fifo_client forward-compatible with 3.10
Currently, when upgrading to 3.10, some errors may occur that are fairly innocent - the client should just reconnect to another node and everything should be back to normal. This PR will prevent errors for those who will upgrade to 3.10 from more recent 3.9 patch releases. Example error: ``` ** {{case_clause,2}, [{rabbit_fifo_client,enqueue,3, [{file,"rabbit_fifo_client.erl"},{line,150}]}, {rabbit_quorum_queue,'-deliver/2-fun-0-',4, [{file,"rabbit_quorum_queue.erl"},{line,851}]}, {lists,foldl,3,[{file,"lists.erl"},{line,1267}]}, {rabbit_queue_type,'-deliver0/3-fun-3-',4, [{file,"rabbit_queue_type.erl"},{line,480}]}, {maps,fold_1,3,[{file,"maps.erl"},{line,410}]}, {rabbit_queue_type,deliver0,3, [{file,"rabbit_queue_type.erl"},{line,479}]}, {rabbit_queue_type,deliver,3,[{file,"rabbit_queue_type.erl"},{line,454}]}, {rabbit_channel,deliver_to_queues,2, [{file,"rabbit_channel.erl"},{line,2190}]}]} ```
1 parent a0adda2 commit 2846fe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_fifo_client.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ enqueue(Correlation, Msg,
151151
0 ->
152152
%% the leader is running the old version
153153
enqueue(Correlation, Msg, State0#state{queue_status = go});
154-
1 ->
154+
N when is_integer(N) ->
155155
%% were running the new version on the leader do sync initialisation
156156
%% of enqueuer session
157157
Reg = rabbit_fifo:make_register_enqueuer(self()),

0 commit comments

Comments
 (0)