You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/08/12 19:40:30 UTC

[3/3] couch-replicator commit: updated refs/heads/windsor-merge to 9640ccf

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/windsor-merge
Commit: 9640ccf2e9182bcc7119c4cbde01714fad71b24a
Parents: c6be20d
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Aug 12 12:40:14 2014 -0500
Committer: Paul J. Davis <pa...@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