You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/11/12 10:51:11 UTC

[jira] [Commented] (COUCHDB-2878) Fix couch_replicator_manager rescans

    [ https://issues.apache.org/jira/browse/COUCHDB-2878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001912#comment-15001912 ] 

ASF GitHub Bot commented on COUCHDB-2878:
-----------------------------------------

GitHub user rnewson opened a pull request:

    https://github.com/apache/couchdb-couch-replicator/pull/23

    Fix couch_replicator_manager rescans

    When couch_replicator_manager starts it scans every _replicator database
    looking for replications to start. When it starts the replication it
    modifies a document in the _replicator database. This change ends up
    sending a message back to couch_replicator_manager to rescan the
    database. This message to rescan the database had no protection to be
    unique. This would result in many processes re-scanning the same
    database over and over.
    
    To fix this we track the DbName for every scanning process so that if we
    get a change to a database we can ignore the change because a scanner
    pid is already running. However we also have to track if we need to
    restart the scanning pid when it finishes so that we ensure that we
    process any changes that occurred during the scan.
    
    COUCHDB-2878

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch-replicator 2878-fix-rescan

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch-replicator/pull/23.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #23
    
----
commit daea81a617e99d452d09745830c905ed5e277cfe
Author: Paul J. Davis <pa...@gmail.com>
Date:   2015-11-05T00:48:07Z

    Fix couch_replicator_manager rescans
    
    When couch_replicator_manager starts it scans every _replicator database
    looking for replications to start. When it starts the replication it
    modifies a document in the _replicator database. This change ends up
    sending a message back to couch_replicator_manager to rescan the
    database. This message to rescan the database had no protection to be
    unique. This would result in many processes re-scanning the same
    database over and over.
    
    To fix this we track the DbName for every scanning process so that if we
    get a change to a database we can ignore the change because a scanner
    pid is already running. However we also have to track if we need to
    restart the scanning pid when it finishes so that we ensure that we
    process any changes that occurred during the scan.
    
    COUCHDB-2878

----


> Fix couch_replicator_manager rescans
> ------------------------------------
>
>                 Key: COUCHDB-2878
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2878
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Robert Newson
>
> When couch_replicator_manager starts it scans every _replicator database
> looking for replications to start. When it starts the replication it
> modifies a document in the _replicator database. This change ends up
> sending a message back to couch_replicator_manager to rescan the
> database. This message to rescan the database had no protection to be
> unique. This would result in many processes re-scanning the same
> database over and over.
> To fix this we track the DbName for every scanning process so that if we
> get a change to a database we can ignore the change because a scanner
> pid is already running. However we also have to track if we need to
> restart the scanning pid when it finishes so that we ensure that we
> process any changes that occurred during the scan.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)