Skip to content

Commit

Permalink
Use local read to check node is in maintenance
Browse files Browse the repository at this point in the history
In stream reader. The consistent read may cause some timeout for the
metadata frame.
  • Loading branch information
acogoluegnes committed Jan 29, 2025
1 parent 6692fcb commit 176623a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions deps/rabbitmq_stream/src/rabbit_stream_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2417,12 +2417,10 @@ handle_frame_post_auth(Transport,
lists:sort(
maps:keys(NodesMap)),
%% filter out nodes in maintenance
Nodes =
lists:filter(fun(N) ->
rabbit_maintenance:is_being_drained_consistent_read(N)
=:= false
end,
Nodes0),
Nodes = lists:filter(fun(N) ->
rabbit_maintenance:is_being_drained_local_read(N) =:= false
end,
Nodes0),
NodeEndpoints =
lists:foldr(fun(Node, Acc) ->
PortFunction =
Expand Down

0 comments on commit 176623a

Please sign in to comment.