RedisLock release() should not check if the lock has been acquired

The RedisDriver coordinator _stop() method removes the lock from the
_acquired_locks set before calling the release() method on the lock,
so the release() method should not check to see if the lock is in the
set, since it never will be.

This was preventing the coordinator's _stop() method from releasing
the locks, so they had to timeout before another group member could
take over as leader.

Change-Id: Ie23d88f1a05983d7465f18a329cabc23d789a628
Closes-Bug: 1815330
This commit is contained in:
Bob.Haddleton 2019-02-09 21:24:54 -06:00 committed by Stephen Finucane
parent 4c85e958a5
commit 842c7404b2
1 changed files with 0 additions and 2 deletions

View File

@ -94,8 +94,6 @@ class RedisLock(locking.Lock):
def release(self):
with self._exclusive_access:
if not self.acquired:
return False
with _translate_failures():
try:
self._lock.release()