Skip to content

Commit 64f5c5a

Browse files
committed
Fix purge mem3_rep client verification
Previously `verify_purge_checkpoint/2` was returning `false` for valid purge internal replicator clients becuase `mem3:shards(DbName)` threw a `database_does_not_exist` error, since `mem3:shards(DbName)` works with cluster db names not shard names. This error leads to a valid internal replication client not being recognized and so the purge infos cleanup could stall with invalid_purge_seq errors thrown. The symptoms would be log error lines that look like the following: ``` Missing or stale purge doc '_local/purge-mem3-1c8980f090d010a0570f69c22b216a2a-ef6642a7a3a78239f33b46ffdc600a81' on <<"shards/50000000-5fffffff/.../bench_db_1762663269.1762663269">> with purge_seq '2796726' mfa: mem3_rpc:load_purge_infos_rpc/3 error:{invalid_start_purge_seq,2900788,3030215} [ {couch_bt_engine,fold_purge_infos,5,[{file,"src/couch_bt_engine.erl"},{line,619}]}, {mem3_rpc,load_purge_infos_rpc,3,[{file,"src/mem3_rpc.erl"},{line,214}]}, {rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,141}]} ] ```
1 parent a510355 commit 64f5c5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mem3/src/mem3_rep.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ verify_purge_checkpoint(DbName, Props) ->
191191
end
192192
end,
193193
[],
194-
mem3:shards(DbName)
194+
mem3:shards(mem3:dbname(DbName))
195195
),
196196
lists:member(Source, Nodes) andalso lists:member(Target, Nodes)
197197
catch

0 commit comments

Comments
 (0)