From c21fccde762944ba92cb33f47d7b65aeda3ca9b9 Mon Sep 17 00:00:00 2001 From: Denis Fakhrtdinov Date: Thu, 3 Oct 2024 14:50:01 +0300 Subject: [PATCH] Fix ar_kv tests --- apps/arweave/src/ar_kv.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/arweave/src/ar_kv.erl b/apps/arweave/src/ar_kv.erl index 2f6e194f5..51535d3bb 100644 --- a/apps/arweave/src/ar_kv.erl +++ b/apps/arweave/src/ar_kv.erl @@ -415,7 +415,7 @@ open(#db{} = DbRec0) -> -%% Attempt to close the database. +%% Attempt to close the database and remove the ETS entries related to it. %% This function WILL NOT perform any actions regarding persistence: it is up to %% the user to ensure that both flush/1 and sync_wal/1 functions are called prior %% calling this function. @@ -426,6 +426,7 @@ close(#db{db_handle = Db, name = Name}) -> try case rocksdb:close(Db) of ok -> + true = ets:match_delete(?MODULE, #db{db_handle = Db, _ = '_'}), ?LOG_INFO([{event, db_operation}, {op, close}, {name, io_lib:format("~p", [Name])}]); {error, CloseError} -> ?LOG_ERROR([