Skip to content

Commit e0bdf70

Browse files
the-mikedavismergify[bot]
authored andcommitted
recent history exchange: Fix mnesia deletion return value
The caller expects this value to either be 'ok' or an error tuple but it was returning `{atomic,ok}` causing a crash when deactivating this plugin. (cherry picked from commit 016697b)
1 parent f50dea8 commit e0bdf70

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbitmq_recent_history_exchange/src/rabbit_db_rh_exchange.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ delete() ->
142142
}).
143143

144144
delete_in_mnesia() ->
145-
mnesia:delete_table(?RH_TABLE).
145+
case mnesia:delete_table(?RH_TABLE) of
146+
{atomic, ok} ->
147+
ok;
148+
{aborted, Reason} ->
149+
{error, Reason}
150+
end.
146151

147152
delete_in_khepri() ->
148153
rabbit_khepri:delete(khepri_recent_history_path()).

0 commit comments

Comments
 (0)