Per the initial PR, there is no guarantees that the instance refreshing the lock is the real owner: #2 (comment)
To solve this, we would need to keep state of the locks with UUIDs, etc. The problem is that we lose atomicity since redis/keydb does not have a check-and-set functionality. A lua script could be used, but that comes at a performance cost of stopping all other commands, so on something that's potentially refreshing a lot, this may be significant.
Per the initial PR, there is no guarantees that the instance refreshing the lock is the real owner: #2 (comment)
To solve this, we would need to keep state of the locks with UUIDs, etc. The problem is that we lose atomicity since redis/keydb does not have a
check-and-setfunctionality. Aluascript could be used, but that comes at a performance cost of stopping all other commands, so on something that's potentially refreshing a lot, this may be significant.