0 Replies Latest reply on Apr 18, 2012 5:59 AM by akula.reddy

    Data loss in cluster aware cache

    akula.reddy

      Hi,

        We are using JBosscache cluster aware feature, and we are persisting the data to DB.

      For persistancy we have set fetchPersistentState to true.

       

      When all the nodes in the cluster are up and running, there is no problem noticed.

      However, when one node restarts, sometimes the entire data in DB vanishes.

      When we debugged the issue, we found the below scenario.

       

      During restart of the node, the entire content in DB is flushed (removed) and persisted again by the new node joingin back the cluster

      In between. right after flushing, the other node in the cluster is inserting a row, with the same primary key.

      Because of this, the node joining the cluster is getting unique constraint violation

      and inside DefaultStateTransferIntegrator class, we saw the call is going to integratePersistentState and it's calling loader.StoreEntireState.

      When it's storing the state, Oracle is throwing Unique constraint violation, because of this transientSet would be false and in finally block it's deleting the entire data from DB.

       

      It looks it's a bug.

       

      And is there a way to avoid DB flusing during restart of a node in the cluster?

      Any hints would be of great help to us.