rabbit_core_ff: Remove no-op migration functions
There is no need to add a migration function which does nothing. Ignoring the third argument and always returning `ok` is incorrect anyway.
This commit is contained in:
parent
cefb6aaef5
commit
da807547f5
|
|
@ -7,21 +7,17 @@
|
|||
|
||||
-module(rabbit_core_ff).
|
||||
|
||||
-export([classic_mirrored_queue_version_migration/3,
|
||||
quorum_queue_migration/3,
|
||||
stream_queue_migration/3,
|
||||
-export([quorum_queue_migration/3,
|
||||
implicit_default_bindings_migration/3,
|
||||
virtual_host_metadata_migration/3,
|
||||
maintenance_mode_status_migration/3,
|
||||
user_limits_migration/3,
|
||||
stream_single_active_consumer_migration/3,
|
||||
direct_exchange_routing_v2_migration/3]).
|
||||
|
||||
-rabbit_feature_flag(
|
||||
{classic_mirrored_queue_version,
|
||||
#{desc => "Support setting version for classic mirrored queues",
|
||||
stability => stable,
|
||||
migration_fun => {?MODULE, classic_mirrored_queue_version_migration}
|
||||
stability => stable
|
||||
}}).
|
||||
|
||||
-rabbit_feature_flag(
|
||||
|
|
@ -37,8 +33,7 @@
|
|||
#{desc => "Support queues of type `stream`",
|
||||
doc_url => "https://www.rabbitmq.com/stream.html",
|
||||
stability => stable,
|
||||
depends_on => [quorum_queue],
|
||||
migration_fun => {?MODULE, stream_queue_migration}
|
||||
depends_on => [quorum_queue]
|
||||
}}).
|
||||
|
||||
-rabbit_feature_flag(
|
||||
|
|
@ -75,8 +70,7 @@
|
|||
#{desc => "Single active consumer for streams",
|
||||
doc_url => "https://www.rabbitmq.com/stream.html",
|
||||
stability => stable,
|
||||
depends_on => [stream_queue],
|
||||
migration_fun => {?MODULE, stream_single_active_consumer_migration}
|
||||
depends_on => [stream_queue]
|
||||
}}).
|
||||
|
||||
-rabbit_feature_flag(
|
||||
|
|
@ -93,9 +87,6 @@
|
|||
stability => stable
|
||||
}}).
|
||||
|
||||
classic_mirrored_queue_version_migration(_FeatureName, _FeatureProps, _Enable) ->
|
||||
ok.
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
%% Quorum queues.
|
||||
%% -------------------------------------------------------------------
|
||||
|
|
@ -115,9 +106,6 @@ quorum_queue_migration(_FeatureName, _FeatureProps, is_enabled) ->
|
|||
mnesia:table_info(rabbit_queue, attributes) =:= Fields andalso
|
||||
mnesia:table_info(rabbit_durable_queue, attributes) =:= Fields.
|
||||
|
||||
stream_queue_migration(_FeatureName, _FeatureProps, _Enable) ->
|
||||
ok.
|
||||
|
||||
migrate_to_amqqueue_with_type(FeatureName, [Table | Rest], Fields) ->
|
||||
rabbit_log_feature_flags:info(
|
||||
"Feature flag `~s`: migrating Mnesia table ~s...",
|
||||
|
|
@ -214,15 +202,6 @@ user_limits_migration(_FeatureName, _FeatureProps, enable) ->
|
|||
user_limits_migration(_FeatureName, _FeatureProps, is_enabled) ->
|
||||
mnesia:table_info(rabbit_user, attributes) =:= internal_user:fields(internal_user_v2).
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
%% Stream single active consumer.
|
||||
%% -------------------------------------------------------------------
|
||||
|
||||
stream_single_active_consumer_migration(_FeatureName, _FeatureProps, enable) ->
|
||||
ok;
|
||||
stream_single_active_consumer_migration(_FeatureName, _FeatureProps, is_enabled) ->
|
||||
undefined.
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
%% Direct exchange routing v2.
|
||||
%% -------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue