This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch reset-docs-size-in-scanner-plugin in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit b7d7541525665c7088671cd8c87e0dcb452a19d4 Author: Nick Vatamaniuc <[email protected]> AuthorDate: Thu Nov 13 14:20:46 2025 -0500 Reset docs_size in quickjs scanner When we switch dbsmake sure to always reset db specific stuff. It's probably overkill to do in both places, but it doesn't hurt either. --- src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl b/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl index 91385010c..3e4a545a7 100644 --- a/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl +++ b/src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl @@ -150,7 +150,7 @@ db_opened(#st{} = St, Db) -> #st{max_docs = MaxDocs, max_step = MaxStep} = St, {ok, DocTotal} = couch_db:get_doc_count(Db), Step = min(MaxStep, max(1, DocTotal div MaxDocs)), - {0, [], St#st{doc_cnt = 0, doc_step = Step, docs = []}}. + {0, [], St#st{doc_cnt = 0, docs_size = 0, doc_step = Step, docs = []}}. doc_id(#st{} = St, <<?DESIGN_DOC_PREFIX, _/binary>>, _Db) -> {skip, St}; @@ -436,6 +436,7 @@ reset_per_db_state(#st{qjs_proc = QjsProc, sm_proc = SmProc} = St) -> St#st{ ddocs = #{}, docs = [], + docs_size = 0, qjs_proc = undefined, sm_proc = undefined, ddoc_cnt = 0
