couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [33/50] [abbrv] couch-replicator commit: updated refs/heads/1963-eunit-bigcouch to 3cf0b13
Date Thu, 28 Aug 2014 17:30:33 GMT
Fix the owner check for local replicator dbs


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/9640ccf2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/9640ccf2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/9640ccf2

Branch: refs/heads/1963-eunit-bigcouch
Commit: 9640ccf2e9182bcc7119c4cbde01714fad71b24a
Parents: c6be20d
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Aug 12 12:40:14 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Aug 12 12:40:14 2014 -0500

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/9640ccf2/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 099b215..411e9e1 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -405,11 +405,13 @@ process_update(State, DbName, {Change}) ->
         end
     end.
 
-owner(DbName, DocId) ->
+owner(<<"shards/", _/binary>> = DbName, DocId) ->
     Live = [node()|nodes()],
     Nodes = lists:sort([N || #shard{node=N} <- mem3:shards(DbName, DocId),
 			     lists:member(N, Live)]),
-    node() =:= hd(mem3_util:rotate_list({DbName, DocId}, Nodes)).
+    node() =:= hd(mem3_util:rotate_list({DbName, DocId}, Nodes));
+owner(_DbName, _DocId) ->
+    true.
 
 rep_db_update_error(Error, DbName, DocId) ->
     case Error of


Mime
View raw message