You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/04/30 23:41:08 UTC

[GitHub] [couchdb] nickva opened a new pull request #2019: Handle database re-creation edge case in internal replicator

nickva opened a new pull request #2019: Handle database re-creation edge case in internal replicator
URL: https://github.com/apache/couchdb/pull/2019
 
 
   Previously, if a database was deleted and re-created while the internal
   replication request was pending, the job would have been retried continuously.
   
   mem3:targets_map/2 function would return an empty targets map and mem3_rep:go
   would raise a function clause exception if the database as present but it was
   an older "incarnation" of it (with shards living on different target nodes).
   
   Because it was an exception and not an {error, ...} result, the process would
   exit with an error. Subsequently, mem3_sync would try to handle process exit
   and check of the database was deleted, but it also didn't account for the case
   when the database was created, so it would resubmit the into queue again.
   
   To fix it, we introduce a function to check if the database shard is part of
   the current database shard map. Then perform the check both before building the
   targets map and also on job retries.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services