File tree Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,8 @@ mds_phase1_migration_post_enable(#{feature_name := FeatureName}) ->
196
196
rabbit_db :set_migration_flag (FeatureName ).
197
197
198
198
mds_migration_enable (FeatureName , TablesAndOwners ) ->
199
- case ensure_khepri_cluster_matches_mnesia (FeatureName ) of
200
- ok ->
201
- migrate_tables_to_khepri (FeatureName , TablesAndOwners );
202
- Error ->
203
- Error
204
- end .
199
+ ok = ensure_khepri_cluster_matches_mnesia (FeatureName ),
200
+ migrate_tables_to_khepri (FeatureName , TablesAndOwners ).
205
201
206
202
mds_migration_post_enable (FeatureName , TablesAndOwners ) ->
207
203
? assert (rabbit_khepri :is_enabled (non_blocking )),
@@ -222,16 +218,7 @@ ensure_khepri_cluster_matches_mnesia(FeatureName) ->
222
218
" Feature flag `~s `: updating the Khepri cluster to match "
223
219
" the Mnesia cluster" ,
224
220
[FeatureName ]),
225
- case expand_khepri_cluster (FeatureName , AllMnesiaNodes ) of
226
- ok ->
227
- ok ;
228
- Error ->
229
- ? LOG_ERROR (
230
- " Feature flag `~s `: failed to migrate from Mnesia "
231
- " to Khepri: failed to create Khepri cluster: ~p " ,
232
- [FeatureName , Error ]),
233
- Error
234
- end .
221
+ expand_khepri_cluster (FeatureName , AllMnesiaNodes ).
235
222
236
223
expand_khepri_cluster (FeatureName , AllMnesiaNodes ) ->
237
224
% % All Mnesia nodes are running (this is a requirement to enable this
Original file line number Diff line number Diff line change @@ -78,9 +78,7 @@ recover_mnesia_tables() ->
78
78
% % A failed migration can leave tables in read-only mode before enabling
79
79
% % the feature flag. See rabbit_core_ff:final_sync_from_mnesia_to_khepri/2
80
80
% % Unlock them here as mnesia is still fully functional.
81
- Tables = rabbit_channel_tracking :get_all_tracked_channel_table_names_for_node (node ())
82
- ++ rabbit_connection_tracking :get_all_tracked_connection_table_names_for_node (node ())
83
- ++ [Table || {Table , _ } <- rabbit_table :definitions ()],
81
+ Tables = [Table || {Table , _ } <- rabbit_table :definitions ()],
84
82
[mnesia :change_table_access_mode (Table , read_write ) || Table <- Tables ],
85
83
ok .
86
84
You can’t perform that action at this time.
0 commit comments