This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 549185c3289b7abadaf571a19f025249e0ac98ee Author: Nick Vatamaniuc <[email protected]> AuthorDate: Mon Mar 9 16:52:22 2026 -0400 Don't use db handle after closing in dreyfus_index Make sure we call `maybe_create_local_purge_doc(Db, Pid, Index)` with the still opened `Db` not after we close it. --- src/dreyfus/src/dreyfus_index.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dreyfus/src/dreyfus_index.erl b/src/dreyfus/src/dreyfus_index.erl index 5295a0065..d75405001 100644 --- a/src/dreyfus/src/dreyfus_index.erl +++ b/src/dreyfus/src/dreyfus_index.erl @@ -119,11 +119,11 @@ init({DbName, Index}) -> case couch_db:open_int(DbName, []) of {ok, Db} -> try - couch_db:monitor(Db) + couch_db:monitor(Db), + dreyfus_util:maybe_create_local_purge_doc(Db, Pid, Index) after couch_db:close(Db) end, - dreyfus_util:maybe_create_local_purge_doc(Db, Pid, Index), proc_lib:init_ack({ok, self()}), gen_server:enter_loop(?MODULE, [], State); Error ->
