couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [13/48] mem3 commit: updated refs/heads/windsor-merge to ff02b9a
Date Fri, 01 Aug 2014 09:10:59 GMT
refactor choose_ushards


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

Branch: refs/heads/windsor-merge
Commit: f2edc4181127c44f1aa06cbdfdb775a3bc19bd38
Parents: 5aa38c6
Author: Robert Newson <robert.newson@cloudant.com>
Authored: Tue Jun 25 12:20:59 2013 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Jul 23 18:46:25 2014 +0100

----------------------------------------------------------------------
 src/mem3.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/f2edc418/src/mem3.erl
----------------------------------------------------------------------
diff --git a/src/mem3.erl b/src/mem3.erl
index 8f8808b..96e058e 100644
--- a/src/mem3.erl
+++ b/src/mem3.erl
@@ -261,8 +261,9 @@ group_by_proximity(Shards, ZoneMap) ->
     {Local, SameZone, DifferentZone}.
 
 choose_ushards(DbName, Shards) ->
-    [hd(G) || G <- [rotate_list(DbName, order_shards(G)) ||
-        G <- group_by_range(Shards)]].
+    Groups0 = group_by_range(Shards),
+    Groups1 = [rotate_list(DbName, order_shards(G)) || G <- Groups0],
+    [hd(G) || G <- Groups1].
 
 rotate_list(_DbName, []) ->
     [];


Mime
View raw message