This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
forked from apache/couchdb-couch-replicator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure doc processor workers do not re-add deleted replication jobs
Previously, especially in case of filtered replications, doc processor workers could inadvertently re-add a replication job after it was deleted. Workers after finishing fetching filter code and computing the replication id, would try to add the replication job to the scheduler. They did that without checking if replication document was already deleted, or another worker was spawned. The fix is to create a unique worker reference, pass it to the worker, then worker confirms they are still current and document was not deleted before adding the job, otherwise they exit with an `ignore` result.
- Loading branch information
Showing
3 changed files
with
88 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters