Issue Details (XML | Word | Printable)

Key: HHH-1796
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Steve Ebersole
Reporter: Steve Ebersole
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

TreeCache based providers and Fqn

Created: 30/May/06 12:28 PM   Updated: 31/May/06 07:17 AM
Component/s: core
Affects Version/s: None
Fix Version/s: 3.2.0.cr3

Time Tracking:
Not Specified


 Description  « Hide
Apparently we have not been using tree cache in the most proper manner in regards to Fqn construction. The way in which we construct Fqns actually leads to a very flat tree structure. For example consider a region for "org.hibernate.test.hql.Animal"; this actually leads to a tree node structured like:
/org/hibernate/test/hql/Animal
        /id1
        /id2
        /...
Notice that the Hibernate region-name leads to a flat node which is a direct child of the root node...

The issue is twofold:
1) This may be one of the causes of the high level of contention in the older pessimistic TreeCache model
2) This is currently causing problems with the optimistic locking stuff because the "parent" node is version-incremented whenever its children is mutated (child added/removed)

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Steve Ebersole added a comment - 30/May/06 01:02 PM
The basic pattern discussed with Manik is:

Fqn regionFqn = Fqn.fromString( regionName.replace( '.', '/' ) );
cache.put( new Fqn( regionFqn, key ), ITEM, value, option );


Max Rydahl Andersen added a comment - 31/May/06 04:26 AM
just so i understand this the problem with our previous behavior is that the "parent" would be the root node which would basically mean it effectively a global lock ?

Steve Ebersole added a comment - 31/May/06 07:17 AM
From my understanding, yes that is the case. Although to clarify it is a "global lock" on the root node only when children (i.e. our regions) are added or removed. Manipulating data within one of our regions should not be an issue (any more than it is even with this change).