accumulo icon indicating copy to clipboard operation
accumulo copied to clipboard

Validate lock type in distributed lock recovery code

Open keith-turner opened this issue 2 years ago • 1 comments

Describe the bug

For FATE table and namespace locks, Utils.getLock() is called which calls DistributedReadWriteLock.recoverLock. In Utils.getLock() it knows if wants a read or write lock, however when it calls DistributedReadWriteLock.recoverLock() it may return a different lock type. Validation should be added that the recovered lock is of the expected type and throw an exception if it is not.

Expected behavior When the recovered lock does not match the desired type an exception is thrown with information about the lock types and lock ids.

keith-turner avatar Dec 13 '23 19:12 keith-turner

I will look at this.

rsingh433 avatar Dec 21 '23 15:12 rsingh433