Balance replication ownership across nodes
authorAdam Kocoloski <adam@cloudant.com>
Thu, 23 May 2013 14:32:58 +0000 (10:32 -0400)
committerRobert Newson <rnewson@apache.org>
Wed, 23 Jul 2014 17:46:25 +0000 (18:46 +0100)
commit68ca9cdfb3c1e9631d2469b5038cec9356e56659
treebed7838e6e1684d7c78e222b01efc3651d0b23a9
parent8f9f58f87678f589be884f42c7ec92762534583e
Balance replication ownership across nodes

The previous algorithm was biased towards low-numbered nodes, and in the
case of a 3 node cluster would declare db1 to be the owner of all
replications.  We can do better just by leveraging the existing
ushards code.

There's a possibility to refactor this as a new ushards/2 function if
that's perceived as useful.

BugzID: 19870
src/mem3_util.erl