couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [22/50] mem3 commit: updated refs/heads/master to 64c0c74
Date Thu, 28 Aug 2014 12:22:42 GMT
Ensure that the owner of a doc is also a host

BugzID: 24395


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/19c3ee2c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/19c3ee2c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/19c3ee2c

Branch: refs/heads/master
Commit: 19c3ee2cd9ea4941505db7f54fbf257e740586ae
Parents: aef5866
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Tue Oct 22 15:29:00 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Jul 23 18:46:26 2014 +0100

----------------------------------------------------------------------
 src/mem3_util.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/19c3ee2c/src/mem3_util.erl
----------------------------------------------------------------------
diff --git a/src/mem3_util.erl b/src/mem3_util.erl
index 0927493..be7302d 100644
--- a/src/mem3_util.erl
+++ b/src/mem3_util.erl
@@ -224,7 +224,7 @@ ensure_exists(DbName) ->
 
 
 owner(DbName, DocId) ->
-    Nodes = lists:sort([node()|nodes()]),
+    Nodes = lists:sort([N || #shard{node=N} <- mem3:shards(DbName, DocId)]),
     node() =:= hd(rotate_list({DbName, DocId}, Nodes)).
 
 is_deleted(Change) ->


Mime
View raw message