Skip to content

Commit

Permalink
Khepri: force shrink member to current member
Browse files Browse the repository at this point in the history
Ra PR pending: rabbitmq/ra#306
  • Loading branch information
dcorbacho committed May 11, 2023
1 parent 30e0cf8 commit 5ec4ae1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deps/rabbit/src/rabbit_khepri.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
-export([if_has_data/1,
if_has_data_wildcard/0]).

-export([force_shrink_member_to_current_member/0]).

-ifdef(TEST).
-export([force_metadata_store/1,
clear_forced_metadata_store/0]).
Expand Down Expand Up @@ -372,6 +374,10 @@ force_reset() ->
DataDir = maps:get(data_dir, ra_system:fetch(coordination)),
ok = rabbit_file:recursive_delete(filelib:wildcard(DataDir ++ "/*")).

force_shrink_member_to_current_member() ->
ok = ra_server_proc:force_shrink_members_to_current_member(
{?RA_CLUSTER_NAME, node()}).

ensure_ra_system_started() ->
{ok, _} = application:ensure_all_started(khepri),
ok = rabbit_ra_systems:ensure_ra_system_started(?RA_SYSTEM).
Expand Down

0 comments on commit 5ec4ae1

Please sign in to comment.