[jboss-dev-forums] [Design of JBossCache] - Re: Optimistic locking doesn't scale well with large 'flat'
bstansberry@jboss.com
do-not-reply at jboss.com
Tue Jul 3 11:54:11 EDT 2007
"jason.greene at jboss.com" wrote : "manik.surtani at jboss.com" wrote : trying to get a child node will cache a null in the workspace if the child node doesn't exist - to maintain repeatable_read
| |
|
| Technically we don't have to do this, repeatable read allows phantoms, and they are still possible if the lazy loading occurs after a new child is created.
|
| anonymous wrote :
| | The drawback here is that it allows for s slight difference in semantics from pessimistic locking, due to the lazy locking (copying into workspace) of children .
| |
|
| I don't think there is a difference here. Pessimistic locking already allows phantoms by not forcing a write lock when nodes are added/remove.
By default, this is true, but there is a flag to acquire a write lock for node add/remove.
anonymous wrote : anonymous wrote :
| | Is this approach workable?
|
| Yes, another option is to just lazy copy the entire map the first time it is actually read.
|
In the entity caching use case, the map is 100% sure to be read, so a lazy copy doesn't gain anything.
In terms of entity caching, this should be workable since lockParentForChildInsertRemove=false for this use case.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060044#4060044
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060044
More information about the jboss-dev-forums
mailing list