[jboss-dev-forums] [Design of JBossCache] - Re: markNodeCurrentlyInUse() - race condition
manik.surtani@jboss.com
do-not-reply at jboss.com
Thu Jan 18 14:26:14 EST 2007
This is where placing markers (both "marked for eviction" as well as "mark as in use") on the node could help.
The eviction interceptor places events in the queue as well as marks the node for eviction; on subsequent gets (before the eviction happens) the eviction interceptor could *remove* the "marked for eviction" marker (according to policy) on the node.
When the eviction thread kicks in, it processes the eviction queue and before attempting to evict a node, tests the "marked for eviction" flag on the node as well as the "mark as in use" flag.
Since these flags reside in the node, dealing with concurrency and race conditions become much easier.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003487#4003487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003487
More information about the jboss-dev-forums
mailing list