On 21 May 2013 11:14, Bela Ban <bban(a)redhat.com> wrote:
[Mircea]
Might be a problem in xsite replication when the keys that are updated
are not present. This happens all the time as xsite state transfer is
not yet implemented: a new site comes online, no state transfer, and an
xsite replication update will not be able to replace non-existing keys.
I suggest to use a straight put() for updates, or a new internal
replaceIfPresentOrPutIfNotPresent()...
That might not work if the hascode resolves to an uneven number, in
that case you obviously will wish to remove the next key as well, so
I'd rather suggest
replaceIfPresentOrPutIfNotPresentAndHashCodeIsEvenOtherwiseRemoveNextKey();
for clarity.