From 29c5ecb66ba1a10b17fc470c78fc0cdf48e9c9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 4 Nov 2025 12:27:09 +0100 Subject: [PATCH] rabbit_feature_flags: Reset registry after copying feature states [Why] The copy is likely to install a different list of enabled feature flags compared to the possibly loaded registry. Therefore it needs to be reset. [How] This is already the case, but the reset is done from the clustering code and not right after the copy, leaving a time frame where the feature states are inconsistent between the loaded registry and the on-disk record. This should be the responsibility of the Feature flags subsystem anyway. (cherry picked from commit 932a971853246b558218c5f04f16c5e09c9e5ed9) --- deps/rabbit/src/rabbit_feature_flags.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/rabbit/src/rabbit_feature_flags.erl b/deps/rabbit/src/rabbit_feature_flags.erl index 1a9ebecc8480..db9bfe768cc7 100644 --- a/deps/rabbit/src/rabbit_feature_flags.erl +++ b/deps/rabbit/src/rabbit_feature_flags.erl @@ -1331,6 +1331,7 @@ copy_feature_states_after_reset(RemoteNode) -> #{domain => ?RMQLOG_DOMAIN_FEAT_FLAGS}), case do_write_enabled_feature_flags_list(EnabledFeatureNames) of ok -> + ok = reset_registry(), ok; {error, Reason} -> File = enabled_feature_flags_list_file(),