8 Replies Latest reply on Aug 21, 2012 6:19 AM by Dan Berindei

    Data integrity after cluster merge

    Matthew Wellard Newbie

      Hi,

       

      I'm looking at the issue of data integrity in Infinispan when clusters merge. I have 3 machines which are broken in to a cluster of 2 and a cluster of 1. When they remerge, I see a Merged Event and Data Update events for any changes. If there is an update, each cluster tells the other of the update and we end up with a single key point to two different values depending on which machine you are on (They effectively swap values). This means we have inconsistent data in the cache.

       

      I've search the web and the forums and seen this is an issue and there is no inbuilt solution expected until at least version 6. I have also seen suggestions to clear the local cache before the clusters merge.

       

      So far, I have listened for the @Merged event and cleared the cache at that point (on the smallest cluster only), the updates are made but only in one direction so we end up with a consistent cache. However, if there is any delay to the clearing, it will clear the entire cache accross the cluster resulting in data loss.

       

      So my question is, how do ensure I clear the local cache only (without affecting any others) before the data updates are shared between the rejoined clusters?

       

      Many thanks,

      Matt

       

      PS, this is using Infinispan 5.2.0 Alpha and JGroups 3.1 over TCP