On 6 May 2009, at 10:09, Manik Surtani wrote:
Let me have a think, this may well still be workable.
Here is why I had issues with this approach - it still lacks some
consistency when you have concurrent writes. Pretty much what we saw
with state transfer.
E.g.:
V0: {A, B, C}
V1: {A, B, C, D}
K -> {A, B} (V0)
K -> {B, C} (V1)
The problem lies when you have the rehash in progress. For example,
if we assume it is A's job to push K to C. While this is happening, B
updates the value of K from V1 to V2. Even if B uses a union of the
sets and invokes the put(K, V2) on {A, C}, we still are exposed to a
race between this put, and A pushing (K, V1) to C.
This is why with state transfer we either (a) stop the cluster
(FLUSH), or (b) use NBST, which records transactions in-fly during the
period of the transfer, and replay the transactions again on the
joiner in order.
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org