Exceptions all over the place, must be my lucky day!    ;)     (today is the 
13th after all...)

Fortunately for one part it seems a simple beauty fixup, I replaced in your 
latest OptimisticTreeCache:


  |     public void writeLoad(Object key, Object value, Object currentVersion) {
  |             try {
  |                     Option option = new Option();
  |                     option.setFailSilently( true );
  |                     option.setDataVersion( NonLockingDataVersion.INSTANCE );
  |                     cache.remove( new Fqn( regionFqn, key ), "ITEM", option 
);

by


  |     public void writeLoad(Object key, Object value, Object currentVersion) {
  |             try {
  |                     this.remove(key);


for the same reasons you mention in remove().

The bad part: now I get once in a while get a CacheException thrown where it 
shouldn't. At some point, TreeCache seems to detect parent nodes with higher 
versions than in the transaction's workspace. I'm still debugging into these. 
Oddily enough, my quick 'n dirty fix I posted above didn't do that. I'll post 
as soon as I have a result.

As for your comments:
- The insert warning: it no longer occurs since writeLoad() no longer passes in 
a previousVersion=null, so now we have the behaviour of the warning which 
corresponds to the idea. I got confused by the combination of the bug and the 
text of the warning, never mind.
- The query-cache-0.6-second gap and the CMT edge case you suspect: could you 
tell where that happens in the code? I'm very interested in looking up these 
issues since my app is highly concurrent.
- Weird validated node in next transaction: now that is strange. Could you 
perhaps post a code snippet where it occurs? However, I refer to my earlier 
post, TreeCache does seem to validate all nodes your transaction has accessed - 
modified or not. To me this sounds perfectly okay since you effectively 
read/write lock this way using the benefit of version control. Perhaps you're 
seeing this?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957698#3957698

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957698
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to