Closed divya-inaza closed 1 year ago
Sorry, I am not sure I'm following. Are you using the latest version? We recently had a fix for timeout being reset https://github.com/bsm/redislock/blob/main/CHANGELOG.md#v091. Would you mind sharing some code?
I am using v0.9.1.
Added the code snippet & the o/p of print statements
Yes, if you change the value of the lock key, the lock is invalidated, hence you cannot release it anymore.
The lock timeout becomes 0 after the set operation. That's why the lock.Release(ctx) throwing LockNotHeld error.
Attached is the value of lock timeout at various places...