andres-mariano opened a new issue, #5612:
URL: https://github.com/apache/couchdb/issues/5612

   ## Description
   
   I’m seeing CouchDB’s internal mem3_sync process keep trying to push shards 
to a node that I’ve already replaced/removed from the cluster, and it logs this 
warning every sync cycle:
   This only happens in one of the three nodes in the cluster.
   ```
   [warning] 2025-08-01T00:37:24.341627Z [email protected] <0.323.0> 
-------- mem3_sync shards/80000000-ffffffff/conditions.1752004476 
[email protected] 
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,[115,114,99,47,109,101,109,51,95,114,112,99,46,101,114,108]},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,497}]},{maps,map_1,3,[{file,[109,97,112,115,46,101,114,108]},{line,441}]},{maps,map,2,[{file,[109,97,112,115,46,101,114,108]},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,483}]},{mem3_rep,repl,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,312}]},{mem3_rep,go,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,[115,114,99,47,109,101,109,51,95,115,121,110,99,46,101,114,108]},{line
 ,241}]}]}
   
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,"src/mem3_rpc.erl"},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,"src/mem3_rep.erl"},{line,497}]},{maps,map_1,3,[{file,"maps.erl"},{line,441}]},{maps,map,2,[{file,"maps.erl"},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,"src/mem3_rep.erl"},{line,483}]},{mem3_rep,repl,1,[{file,"src/mem3_rep.erl"},{line,312}]},{mem3_rep,go,1,[{file,"src/mem3_rep.erl"},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,"src/mem3_sync.erl"},{line,241}]}]}
   
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,"src/mem3_rpc.erl"},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,"src/mem3_rep.erl"},{line,497}]},{maps,map_1,3,[{file,"maps.erl"},{line,441}]},{maps,map,2,[{file,"maps.erl"},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,"src/mem3_rep.erl"},{line,483}]},{mem3_rep,repl,1,[{file,"src/mem3_rep.erl"},{line,312}]},{mem3_rep,go,1,[{file,"src/mem3_rep.erl"},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,"src/mem3_sync.erl"},{line,241}]}]}
   [warning] 2025-08-01T00:37:29.342756Z [email protected] <0.323.0> 
-------- mem3_sync shards/00000000-7fffffff/conditions.1752004476 
[email protected] 
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,[115,114,99,47,109,101,109,51,95,114,112,99,46,101,114,108]},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,497}]},{maps,map_1,3,[{file,[109,97,112,115,46,101,114,108]},{line,441}]},{maps,map,2,[{file,[109,97,112,115,46,101,114,108]},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,483}]},{mem3_rep,repl,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,312}]},{mem3_rep,go,1,[{file,[115,114,99,47,109,101,109,51,95,114,101,112,46,101,114,108]},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,[115,114,99,47,109,101,109,51,95,115,121,110,99,46,101,114,108]},{line
 ,241}]}]}
   
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,"src/mem3_rpc.erl"},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,"src/mem3_rep.erl"},{line,497}]},{maps,map_1,3,[{file,"maps.erl"},{line,441}]},{maps,map,2,[{file,"maps.erl"},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,"src/mem3_rep.erl"},{line,483}]},{mem3_rep,repl,1,[{file,"src/mem3_rep.erl"},{line,312}]},{mem3_rep,go,1,[{file,"src/mem3_rep.erl"},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,"src/mem3_sync.erl"},{line,241}]}]}
   
{{rexi_DOWN,{'[email protected]',noconnect}},[{mem3_rpc,rexi_call,3,[{file,"src/mem3_rpc.erl"},{line,387}]},{mem3_rep,calculate_start_seq,3,[{file,"src/mem3_rep.erl"},{line,497}]},{maps,map_1,3,[{file,"maps.erl"},{line,441}]},{maps,map,2,[{file,"maps.erl"},{line,426}]},{mem3_rep,calculate_start_seq_multi,1,[{file,"src/mem3_rep.erl"},{line,483}]},{mem3_rep,repl,1,[{file,"src/mem3_rep.erl"},{line,312}]},{mem3_rep,go,1,[{file,"src/mem3_rep.erl"},{line,122}]},{mem3_sync,'-start_push_replication/1-fun-0-',2,[{file,"src/mem3_sync.erl"},{line,241}]}]}
   ```
   
   I’ve verified:
        •       The node is gone (/_node/_local/_nodes/_all_docs no longer 
lists [email protected])
        •       The local /_dbs/conditions shard map on all three live nodes no 
longer contains that address in by_node or by_range
        •       Yet mem3_sync still resurrects a replication job to the dead IP 
on each cycle.
   
   **Dump of _dbs conditions document**
   As you can see the only references to the old node are 
`["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"]`.
 Could that be the issue? I couldn't find any other reference to `172.16.7.221`.
   ```
   
{"id":"conditions","key":"conditions","value":{"rev":"53-f44e2a99509849a25c788f3b3946cc57"},"doc":{"_id":"conditions","_rev":"53-f44e2a99509849a25c788f3b3946cc57","shard_suffix":[46,49,55,53,50,48,48,52,52,55,54],"changelog":[["add","00000000-7fffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]
 
.114"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","0
 
0000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","0000000
 
0-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff"
 
,"[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","couchdb@1
 
72.16.5.87"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff
 
","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"],["add","00000000-7fffffff","[email protected]"],["add","80000000-ffffffff","[email protected]"],["remove","00000000-7fffffff","[email protected]"],["remove","80000000-ffffffff","[email protected]"]],"by_node":{"[email protected]":["00000000-7fffffff","80000000-ffffffff"],"[email protected]":["00000000-7fffffff","80000000-ffffffff"],"[email protected]":["00000000-7fffffff","80000000-ffffffff"]},"by_range":{"00000000-7fffffff":["[email protected]","[email protected]","cou
 
[email protected]"],"80000000-ffffffff":["[email protected]","[email protected]","[email protected]"]},"props":{}}}
   
   ``` 
   
   ## Steps to Reproduce
   
   Not sure if it's easy to reproduce, but I created a cluster with three nodes 
and then replaced them with new nodes several times. I happened to find this 
issue after that.
   
   ## Expected Behaviour
   
   The node should not be trying to connect to the old node.
   
   ## Your Environment
   
   CouchDB version used: 3.5.0
   OS: Ubuntu 24.04 LTS
   
   Any thoughts? Thank you.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to