[
https://issues.apache.org/jira/browse/COUCHDB-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248750#comment-15248750
]
ASF subversion and git services commented on COUCHDB-2983:
----------------------------------------------------------
Commit 14c15179296d0c1934497ca4e8db42c4822fdd8f in couchdb-fabric's branch
refs/heads/master from [~iilyak]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=14c1517 ]
Use couch_db:dbname_suffix in path_ends_with
Replace couch_db:normalize_dbname with couch_db:dbname_suffix since the
semantic of normalize_dbname has been changed. couch_db:normalize_dbname
would return all components of the path with shard info removed from it.
couch_db:dbname_suffix on the other hand would return the last component
of the path. It would also ensure that shard's suffix is removed from
the result.
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)