Skip to content

Commit 2a48580

Browse files
committed
wip
1 parent 92c1bf4 commit 2a48580

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

deps/rabbit/src/rabbit_ff_registry_factory.erl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@ maybe_initialize_registry(NewSupportedFeatureFlags,
247247
%% return an error (and RabbitMQ start will abort). RabbitMQ won't be
248248
%% able to work, especially if the feature flag needed some
249249
%% migration, because the corresponding code was removed.
250-
NewNode =
251-
not rabbit_feature_flags:does_enabled_feature_flags_list_file_exist(),
252250
FeatureStates0 = case RegistryInitialized of
253251
true ->
254252
maps:merge(
@@ -261,20 +259,11 @@ maybe_initialize_registry(NewSupportedFeatureFlags,
261259
maps:map(
262260
fun
263261
(FeatureName, FeatureProps) when ?IS_FEATURE_FLAG(FeatureProps) ->
264-
Stability = rabbit_feature_flags:get_stability(FeatureProps),
265262
State = case FeatureStates0 of
266263
#{FeatureName := FeatureState} -> FeatureState;
267264
_ -> false
268265
end,
269-
case Stability of
270-
required when NewNode ->
271-
%% This is the very first time the node starts, we
272-
%% already mark the required feature flag as enabled.
273-
?assertNotEqual(state_changing, State),
274-
true;
275-
_ ->
276-
State
277-
end;
266+
State;
278267
(FeatureName, FeatureProps) when ?IS_DEPRECATION(FeatureProps) ->
279268
case FeatureStates0 of
280269
#{FeatureName := FeatureState} ->

deps/rabbit/test/feature_flags_v2_SUITE.erl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,15 +1480,8 @@ have_required_feature_flag_in_cluster_and_add_member_without_it(
14801480
ok = run_on_node(
14811481
NewNode,
14821482
fun() ->
1483-
?assertMatch(
1484-
{error,
1485-
{exception,
1486-
{assertNotEqual,
1487-
[{module, rabbit_ff_registry_factory},
1488-
{line, _},
1489-
{expression, "State"},
1490-
{value, state_changing}]},
1491-
_}},
1483+
?assertEqual(
1484+
ok,
14921485
rabbit_feature_flags:sync_feature_flags_with_cluster(
14931486
Nodes, false)),
14941487
ok
@@ -1500,7 +1493,7 @@ have_required_feature_flag_in_cluster_and_add_member_without_it(
15001493
Node,
15011494
fun() ->
15021495
?assertEqual(
1503-
Node =/= NewNode,
1496+
true,
15041497
rabbit_feature_flags:is_enabled(FeatureName)),
15051498
ok
15061499
end,

0 commit comments

Comments
 (0)