You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/28 14:22:36 UTC
[16/50] mem3 commit: updated refs/heads/master to 64c0c74
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/master
Commit: f2edc4181127c44f1aa06cbdfdb775a3bc19bd38
Parents: 5aa38c6
Author: Robert Newson <ro...@cloudant.com>
Authored: Tue Jun 25 12:20:59 2013 +0100
Committer: Robert Newson <rn...@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, []) ->
[];