This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch auto-delete-3-plus-shard-move in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit f97601771e451066213b521dc2badfb2d3b181ee Author: Robert Newson <[email protected]> AuthorDate: Thu Jun 19 15:00:45 2025 +0100 extract startkey/endkey into macros --- src/fabric/src/fabric_drop_seq.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fabric/src/fabric_drop_seq.erl b/src/fabric/src/fabric_drop_seq.erl index d2cb21edf..c7f14993f 100644 --- a/src/fabric/src/fabric_drop_seq.erl +++ b/src/fabric/src/fabric_drop_seq.erl @@ -35,6 +35,9 @@ {Range :: range(), SourceNode :: node(), TargetNode :: node()} => [history_item()] }. +-define(START_KEY(SubType), <<?LOCAL_DOC_PREFIX, "peer-checkpoint-", SubType/binary, "-">>). +-define(END_KEY(SubType), <<?LOCAL_DOC_PREFIX, "peer-checkpoint-", SubType/binary, ".">>). + go(DbName) -> Shards0 = mem3:shards(DbName), case gather_drop_seq_info(Shards0) of @@ -573,8 +576,8 @@ cleanup_peer_checkpoint_docs(DbName, SubType, KeepSigs) when MrArgs = #mrargs{ view_type = map, include_docs = true, - start_key = <<?LOCAL_DOC_PREFIX, "peer-checkpoint-", SubType/binary, "-">>, - end_key = <<?LOCAL_DOC_PREFIX, "peer-checkpoint-", SubType/binary, ".">>, + start_key = ?START_KEY(SubType), + end_key = ?END_KEY(SubType), inclusive_end = false, extra = [ {include_system, true},
