|
The current logic of handling expiry lock looks like the following:
long ts = region.nextTimestamp() + region.getTimeout(); // create new lock that times out immediately Lock newLock = new Lock( ts, uuid, nextLockId.getAndIncrement(), null ); newLock.unlock( ts ); region.put( key, newLock );
The issue here is after we put the new lock, we're unable to load and put value item into the cache during next timeout interval. I think the correct logic could be:
long ts = region.nextTimestamp(); // create new lock that times out immediately Lock newLock = new Lock( ts, uuid, nextLockId.getAndIncrement(), null ); newLock.unlock( ts ); region.put( key, newLock );
Please correct me if I miss something.
|