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
The following commit(s) were added to refs/heads/main by this push:
new 7041b0875 Use copy_props in the compactor instead of set_props
7041b0875 is described below
commit 7041b087557db852db5977a3cfb2f0f7884c66ea
Author: Nick Vatamaniuc <[email protected]>
AuthorDate: Thu Aug 7 11:48:18 2025 -0400
Use copy_props in the compactor instead of set_props
Previously, compactor used set_props/2 insead of copy_props/2. The
difference
is set_props/2 also advances the update sequence, while copy_props/2
doesn't.
However, we should not do that when we copy security and props in the
compactor. In this case it turned to be a benign issue since immediately
after
the update sequence is reset anyway to the one from the old state the
following
snippet:
```
FinalUpdateSeq = couch_bt_engine:get_update_seq(St)
{ok, NewSt6} = couch_bt_engine:set_update_seq(NewSt5, FinalUpdateSeq)
```
---
src/couch/src/couch_bt_engine_compactor.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/couch/src/couch_bt_engine_compactor.erl
b/src/couch/src/couch_bt_engine_compactor.erl
index 8ed55b5c3..f16ae4184 100644
--- a/src/couch/src/couch_bt_engine_compactor.erl
+++ b/src/couch/src/couch_bt_engine_compactor.erl
@@ -381,7 +381,7 @@ copy_compact(#comp_st{} = CompSt) ->
% Copy general properties over
Props = couch_bt_engine:get_props(St),
- {ok, NewSt5} = couch_bt_engine:set_props(NewSt4, Props),
+ {ok, NewSt5} = couch_bt_engine:copy_props(NewSt4, Props),
FinalUpdateSeq = couch_bt_engine:get_update_seq(St),
{ok, NewSt6} = couch_bt_engine:set_update_seq(NewSt5, FinalUpdateSeq),