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

Nick Vatamaniuc commented on COUCHDB-2954:
------------------------------------------

Javascript tests currently pass. But they pass because replicator tests have 
been skipped. 

The test which uses this behavior is replicator_db_swap_rep_db.js. This test, 
however, will not pass currently (even without the pr above). As the config 
option will just disable the built-in _replicator database, but the database 
which is supposed to replace it won't be noticed. The replicator manager 
already looks for databases ending with _replicator. These pr just removes the 
confusing code which makes it seems as if that old behavior would work.

In large it seems a lot of them would have to be re-written as they use "local" 
sources or targets. Those will not work as expected with a cluster. (There is  
hack to translate local to full urls when posting to _replicate endpoint but no 
such hack exists for docs posted to _replicator db). We'd have to discuss what 
the right approach there is. But that is another ticket perhaps.



> Deprecate configurable _replicator db name in 2.0
> -------------------------------------------------
>
>                 Key: COUCHDB-2954
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2954
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Nick Vatamaniuc
>
> CouchDB 1.x has a configurable replicator database name. 
> CouchDB 2.x uses another pattern for having custom replicator databases -- it 
> scans files in local database data directory for patterns matching {code} 
> "_replicator(\\.[0-9]{10,})?.couch$" {code}. So for example, can create a 
> database called {{"joe/_replicator"}} and it will be considered a replicator 
> database by the replication management code. This way can even have multiple 
> replicator databases ( {{"mike/_replicator"}}, or {{"joe/other/_replicator"}} 
> ), so configuration is even more flexible than it was in 1.x.
> Current code in couch_replicator_manager.erl is a mix of using the 1.x config 
> option and scanning recursively for db files with _replicator pattern. It 
> already also assumes a hard-coded "_replicator" name in a few places:
> https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator_manager.erl#L918
> The proposal it to deprecate _replicator db name configuration in order to 
> simplify and clean up the the code.



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

Reply via email to