From 7c8ccdecd5c2f0eb188a8aab8a3228ba81f2b0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= <514737+acogoluegnes@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:28:36 +0200 Subject: [PATCH] Support cross-version overview in stream SAC coordinator When the state comes from V4 and the current module is V5. References #14106 (cherry picked from commit 4e7e0f0f1d7ec4136ad4882943adf3ebd0d8face) --- deps/rabbit/src/rabbit_stream_sac_coordinator.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/rabbit/src/rabbit_stream_sac_coordinator.erl b/deps/rabbit/src/rabbit_stream_sac_coordinator.erl index 5f9ceec144..6888327528 100644 --- a/deps/rabbit/src/rabbit_stream_sac_coordinator.erl +++ b/deps/rabbit/src/rabbit_stream_sac_coordinator.erl @@ -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() ->