Skip to content

Commit b4dcf0b

Browse files
acogoluegnesLoisSotoLopez
authored andcommitted
Support cross-version overview in stream SAC coordinator
When the state comes from V4 and the current module is V5. References rabbitmq#14106
1 parent bda30a6 commit b4dcf0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deps/rabbit/src/rabbit_stream_sac_coordinator.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,17 @@ group_consumers(VirtualHost, Stream, Reference, InfoKeys) ->
207207
-spec overview(state() | undefined) -> map() | undefined.
208208
overview(undefined) ->
209209
undefined;
210-
overview(#?MODULE{groups = Groups}) ->
210+
overview(#?MODULE{groups = Groups} = S) when ?IS_STATE_REC(S) ->
211211
GroupsOverview =
212212
maps:map(fun(_,
213213
#group{consumers = Consumers, partition_index = Idx}) ->
214214
#{num_consumers => length(Consumers),
215215
partition_index => Idx}
216216
end,
217217
Groups),
218-
#{num_groups => map_size(Groups), groups => GroupsOverview}.
218+
#{num_groups => map_size(Groups), groups => GroupsOverview};
219+
overview(S) ->
220+
rabbit_stream_sac_coordinator_v4:overview(S).
219221

220222
-spec init_state() -> state().
221223
init_state() ->

0 commit comments

Comments
 (0)