-
Committer:
Jordan West
-
Date:
2013-05-28 21:38:31 UTC
-
mto:
(301.1.3)
-
mto:
This revision was merged to the branch mainline in
revision
302.
-
Revision ID:
git-v1:0f4c8ca8f8e697e696aeaa94a3a0772d5f66e847
improve performance and fix several bugs in future index calculation
* make future index a constant time calculation (it was O(RingSize * FutureRingSize) before)
* for no possible reason the notsent acc was a linked list instead of a set
* during shrinking the n-value for a preflist could be, depending on ownership assignment and
order of transfers, implicitly grown (e.g. N=3 -> N=5) leaving behind unreachable data. This
is because primaries involved in shrinking may transfer data out after receiving data in. In
this case it is necessary to identify keys that are owned by the source partition in the *future*
ring. This is done by detecting two conditions, the first is when the position of the source in
the current preflist is greater than or equal to the size of the new ring (an impossible N value
in the new ring) and an optional N-value threshold which solves a specific case when halving the ring
where the first condition is not triggered until data has already been copied where it shouldn't be
add eqc test for riak_core_ring:future_index