Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Restore stability of ushards
  • Loading branch information
Robert Newson committed Apr 18, 2012
1 parent 370d667 commit 056b0fe2ae96bfd5b5a108fd33f67b94046559c9
Showing 1 changed file with 2 additions and 1 deletion.
@@ -122,9 +122,10 @@ shards(DbName, DocId) ->
end.

ushards(DbName) ->
{L,S,D} = group_by_proximity(live_shards(DbName)),
lists:usort(fun(#shard{name=A}, #shard{name=B}) ->
A =< B
end, begin {L,S,D} = group_by_proximity(live_shards(DbName)), L ++ S ++ D end).
end, lists:sort(L ++ S) ++ lists:sort(D)).

live_shards(DbName) ->
Nodes = [node()|erlang:nodes()],

0 comments on commit 056b0fe

Please sign in to comment.