Support cross-version overview in stream SAC coordinator
When the state comes from V4 and the current module is V5. References #14106
This commit is contained in:
parent
0ca128b80f
commit
4e7e0f0f1d
|
@ -207,7 +207,7 @@ group_consumers(VirtualHost, Stream, Reference, InfoKeys) ->
|
|||
-spec overview(state() | undefined) -> map() | undefined.
|
||||
overview(undefined) ->
|
||||
undefined;
|
||||
overview(#?MODULE{groups = Groups}) ->
|
||||
overview(#?MODULE{groups = Groups} = S) when ?IS_STATE_REC(S) ->
|
||||
GroupsOverview =
|
||||
maps:map(fun(_,
|
||||
#group{consumers = Consumers, partition_index = Idx}) ->
|
||||
|
@ -215,7 +215,9 @@ overview(#?MODULE{groups = Groups}) ->
|
|||
partition_index => Idx}
|
||||
end,
|
||||
Groups),
|
||||
#{num_groups => map_size(Groups), groups => GroupsOverview}.
|
||||
#{num_groups => map_size(Groups), groups => GroupsOverview};
|
||||
overview(S) ->
|
||||
rabbit_stream_sac_coordinator_v4:overview(S).
|
||||
|
||||
-spec init_state() -> state().
|
||||
init_state() ->
|
||||
|
|
Loading…
Reference in New Issue