astyanax icon indicating copy to clipboard operation
astyanax copied to clipboard

Fixing weird Deadlock problem when 2 request arrive at the same time

Open fededonna opened this issue 12 years ago • 1 comments

As commented before, fixing an issue that happens when 2 request arrive at the exact same microsecond an we use a RetryPolicy other than RetryOnce, this causes a BusyLockException for both threads causing deadlock.

fededonna avatar Sep 11 '13 16:09 fededonna

What about if someone sets the lock id? In that case the lock id's aren't unique.

Also, in the scenario you outline when the 2 requests arrive at the same time and get a BusyLockException, wouldn't the next time verifyLock is called be with a different curTimeInMicros argument so the race condition would not occur?

peterox avatar Oct 09 '13 23:10 peterox