[jboss-user] [JBoss Cache] - Data loss in cluster aware cache

Ramu Akula do-not-reply at jboss.com
Wed Apr 18 05:59:24 EDT 2012


Ramu Akula [https://community.jboss.org/people/akula.reddy] created the discussion

"Data loss in cluster aware cache"

To view the discussion, visit: https://community.jboss.org/message/730776#730776

--------------------------------------------------------------
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.





--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/730776#730776]

Start a new discussion in JBoss Cache at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120418/4688ca59/attachment.html 


More information about the jboss-user mailing list