Skip to content

Commit ed94e02

Browse files
committed
rabbit_khepri: Remove serial file during reset
1 parent dce5a08 commit ed94e02

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,10 @@ reset() ->
591591
%% Restart it.
592592
ok = setup(),
593593
ok = khepri_cluster:reset(?RA_CLUSTER_NAME),
594-
ok = khepri:stop(?RA_CLUSTER_NAME);
594+
ok = khepri:stop(?RA_CLUSTER_NAME),
595+
596+
_ = file:delete(rabbit_guid:filename()),
597+
ok;
595598
true ->
596599
throw({error, rabbitmq_unexpectedly_running})
597600
end.
@@ -605,7 +608,10 @@ force_reset() ->
605608
DataDir = maps:get(data_dir, ra_system:fetch(?RA_SYSTEM)),
606609
ok = rabbit_ra_systems:ensure_ra_system_stopped(?RA_SYSTEM),
607610
ok = rabbit_file:recursive_delete(
608-
filelib:wildcard(DataDir ++ "/*"));
611+
filelib:wildcard(DataDir ++ "/*")),
612+
613+
_ = file:delete(rabbit_guid:filename()),
614+
ok;
609615
true ->
610616
throw({error, rabbitmq_unexpectedly_running})
611617
end.

0 commit comments

Comments
 (0)