You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2025/11/22 04:50:00 UTC

(couchdb) branch fix-purge-internal-replicator-client-verify created (now 073e337a3)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch fix-purge-internal-replicator-client-verify
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 073e337a3 Fix purge mem3_rep client verification

This branch includes the following new commits:

     new 073e337a3 Fix purge mem3_rep client verification

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(couchdb) 01/01: Fix purge mem3_rep client verification

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch fix-purge-internal-replicator-client-verify
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 073e337a3991b48f9e21b6e29308628ed6bb7eb7
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Fri Nov 21 23:37:51 2025 -0500

    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}]}
      ]
    ```
---
 src/mem3/src/mem3_rep.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl
index f01c12663..c5157f52c 100644
--- a/src/mem3/src/mem3_rep.erl
+++ b/src/mem3/src/mem3_rep.erl
@@ -191,7 +191,7 @@ verify_purge_checkpoint(DbName, Props) ->
                             end
                         end,
                         [],
-                        mem3:shards(DbName)
+                        mem3:shards(mem3:dbname(DbName))
                     ),
                     lists:member(Source, Nodes) andalso lists:member(Target, Nodes)
                 catch