[infinispan-dev] SingleJoinTest#testTransactional failure

Vladimir Blagojevic vblagoje at redhat.com
Tue Nov 30 12:18:24 EST 2010


On 10-11-30 1:51 PM, Mircea Markus wrote:
>> I would love to but I do not see a method wrapEntryforWritingIfYouCan :-) What do you do in these kinds of situations? Set timeout to 10 msec and catch TimeoutException?
> My point is you don't want to invalidate(invoke next) keys for which you don't have the locks. These would be invalidated(i.e. removed) at commit time.
>

Ok I get you! I think. So you would essentially simply do:

     if(!lockManager.isLocked(key)){
         invokeNextInterceptor(ctx, commandToInvalidateKey(key));
     }

But isn't this a race at least at some level between this thread which 
removes entries from a data container (without holding any locks) and 
another thread/tx which potentially locks the same keys only to find 
them removed from data container. Not sure, but this sounds a bit fishy!

What do you think?



More information about the infinispan-dev mailing list