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

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

GitHub user iilyak opened a pull request:

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

    Use couch_db:dbname_suffix in is_replicator_db

    couch_db:dbname_suffix would take shard's suffix into account.
    
    This PR depends on https://github.com/apache/couchdb-couch/pull/160
    
    COUCHDB-2983

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

    $ git pull https://github.com/cloudant/couchdb-couch-replicator 
2983-use-dbname_suffix

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

    https://github.com/apache/couchdb-couch-replicator/pull/35.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 #35
    
----
commit b002daf6ffcaffa74d3618138cfe5c00e53371c2
Author: ILYA Khlopotov <[email protected]>
Date:   2016-04-08T18:17:14Z

    Use couch_db:dbname_suffix in is_replicator_db
    
    couch_db:dbname_suffix would take shard's suffix into account.
    
    COUCHDB-2983

----


> is_replicator_db do not take into account shard's suffix
> --------------------------------------------------------
>
>                 Key: COUCHDB-2983
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2983
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: ILYA
>            Assignee: ILYA
>
> We use number of ways to detect replicator db:
> 1. [<<"_replicator">> == 
> couch_db:normalize_dbname(Path)|https://github.com/apache/couchdb-fabric/blob/master/src/fabric_util.erl#L289]
>  in fabric.
> 2. hardcoded as 
> [<<"_replicator">>|https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator_manager.erl#L166:L167]
>  in replicator_manager
> 3. calculated as [lists:last(binary:split(mem3:dbname(DbName), <<"/">>, 
> ...))|https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator_manager.erl#L924]
>  in replicator_manager:is_replicator_db
> We need to unify the way we do it. We also would want to make sure we remove 
> shard's suffix from the last part of the path. 



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

Reply via email to