[infinispan-dev] Relaxing clear semantics

Pedro Ruivo pedro at infinispan.org
Mon Apr 6 09:28:48 EDT 2015


Hi guys,

I'm going to start working on the new relaxed clear semantic (in the 
context of ISPN-4140). It affects, at least, the following JIRA:

ISPN-4073: clear() can create inconsistencies
ISPN-3656: Relax Cache.clear() semantics
ISPN-4778: PessimisticLockingInterceptor throws when handling remote 
clear command
ISPN-4140: Clear command doesn't acquire any remote locks in pessimistic 
mode
ISPN-2849: Don't keep threads blocked when waiting for locks to be released

In short, the semantic would be: "it clears the cache. If any concurrent 
operation is in progress, the result is undetermined".
So, if concurrent operation can put the cache in inconsistent state. But 
in other hand, I don't see any case in which a clear is needed during 
production...

In transactional cache, the clear will not affect the transaction. Also, 
it will not acquire any locks in LockManager. Why?
First, we assume that no other operation is in progress, second, if the 
first assumption is wrong, it can cause deadlocks with it, and third, it 
would avoid creating a global lock.

Any other concerns?

Cheers,
Pedro


More information about the infinispan-dev mailing list