[jboss-dev-forums] [Design of JBossCache] - Re: Custom data versions
manik.surtani@jboss.com
do-not-reply at jboss.com
Thu Jul 10 12:17:25 EDT 2008
BTW, the reason why custom data versions are important in Hibernate's use case is detailed below.
* Node in DB has v1
* Server1 writes v2 to the cache and the db.
* This results in an invalidation message clearing the state of the node in neighbouring Servers.
* Server2 does a read from the db before Thread1 completes. Gets v1.
* Server2 attempts to put v1 in the cache, but there is a race condition and this happens after Server1's invalidation message comes in.
* Server2's put succeeds and Server1's state is invalidated.
Caches now have v1 while the db has v2!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163658#4163658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163658
More information about the jboss-dev-forums
mailing list