Skip to content

Commit 7041b08

Browse files
committed
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) ```
1 parent f224521 commit 7041b08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/couch/src/couch_bt_engine_compactor.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ copy_compact(#comp_st{} = CompSt) ->
381381

382382
% Copy general properties over
383383
Props = couch_bt_engine:get_props(St),
384-
{ok, NewSt5} = couch_bt_engine:set_props(NewSt4, Props),
384+
{ok, NewSt5} = couch_bt_engine:copy_props(NewSt4, Props),
385385

386386
FinalUpdateSeq = couch_bt_engine:get_update_seq(St),
387387
{ok, NewSt6} = couch_bt_engine:set_update_seq(NewSt5, FinalUpdateSeq),

0 commit comments

Comments
 (0)