Skip to content

Commit 66b5b37

Browse files
committed
Rename function for clarity
References #3753
1 parent 8385882 commit 66b5b37

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

deps/rabbit/src/rabbit_stream_sac_coordinator.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ apply({register_consumer,
199199
Owner,
200200
SubscriptionId},
201201
#?MODULE{groups = StreamGroups0} = State) ->
202-
%% FIXME monitor virtual hosts as well?
203202
rabbit_log:debug("New consumer ~p ~p in group ~p, partition index "
204203
"is ~p",
205204
[ConnectionPid,
@@ -444,7 +443,10 @@ handle_connection_down(Pid,
444443
undefined -> {S0, Eff0};
445444
#group{consumers = Consumers} ->
446445
%% iterate over the consumers of the group
447-
%% and unregister the ones from this PID
446+
%% and unregister the ones from this PID.
447+
%% It may not be optimal, computing the new active consumer
448+
%% from the purged group and notifying the remaining consumers
449+
%% appropriately should avoid unwanted notifications and even rebalancing.
448450
lists:foldl(fun (#consumer{pid = P,
449451
subscription_id =
450452
SubId},

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ open(info,
818818
log = Log1},
819819

820820
Conn1 =
821-
maybe_notify_consumer(Transport,
821+
maybe_send_consumer_update(Transport,
822822
Connection0,
823823
SubId,
824824
Active,
@@ -2774,9 +2774,9 @@ maybe_register_consumer(VirtualHost,
27742774
SubscriptionId),
27752775
Active.
27762776

2777-
maybe_notify_consumer(_, Connection, _, _, false = _Sac, _) ->
2777+
maybe_send_consumer_update(_, Connection, _, _, false = _Sac, _) ->
27782778
Connection;
2779-
maybe_notify_consumer(Transport,
2779+
maybe_send_consumer_update(Transport,
27802780
#stream_connection{socket = S,
27812781
correlation_id_sequence = CorrIdSeq,
27822782
outstanding_requests =

0 commit comments

Comments
 (0)