couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [1/2] couch-replicator commit: updated refs/heads/master to ab0afce
Date Tue, 19 Apr 2016 21:51:41 GMT
Repository: couchdb-couch-replicator
Updated Branches:
  refs/heads/master 986549984 -> ab0afce2d


Use couch_db:dbname_suffix in is_replicator_db

couch_db:dbname_suffix would take shard's suffix into account.

COUCHDB-2983


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/24fb718c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/24fb718c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/24fb718c

Branch: refs/heads/master
Commit: 24fb718c01c37ca40a51339c554fb66ae75c5e42
Parents: 9865499
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Apr 8 11:17:14 2016 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Apr 19 14:42:57 2016 -0700

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/24fb718c/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 1848153..0811796 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -922,12 +922,7 @@ scan_all_dbs(Server) when is_pid(Server) ->
 	end, ok).
 
 is_replicator_db(DbName) ->
-    case lists:last(binary:split(mem3:dbname(DbName), <<"/">>, [global])) of
-        <<"_replicator">> ->
-            true;
-        _ ->
-            false
-    end.
+    <<"_replicator">> =:= couch_db:dbname_suffix(DbName).
 
 get_json_value(Key, Props) ->
     get_json_value(Key, Props, undefined).


Mime
View raw message