You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2025/07/04 14:26:25 UTC
(couchdb) 13/25: extract startkey/endkey into macros
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 <rn...@apache.org>
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},