You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it's possible for a locker to unlock a lock it didn't actually create:
client1 grab lock lock
client2 try to grab lock and wait
client1 session expires (lock released)
client2 gets lock
client2 releases lock and deletes parent
client3 grabs lock and creates parent
client1 has reconnected and releases lock (it didn't create)
The solution we've come up with is to track the ctime of the parent and only delete the lock if the ctime of the parent matches what we thought it was.
The reason why this works is if the parent hasn't been deleted, the sequence numbers of the lock files will always be increasing.
The text was updated successfully, but these errors were encountered:
when lock path is created, we now cache the stat of the parent at that time,
allowing us to compare ctimes when we want to clean up. an unlock call on a
lock not owned by the current session will return false now.
Right now it's possible for a locker to unlock a lock it didn't actually create:
The solution we've come up with is to track the
ctime
of the parent and only delete the lock if thectime
of the parent matches what we thought it was.The reason why this works is if the parent hasn't been deleted, the sequence numbers of the lock files will always be increasing.
The text was updated successfully, but these errors were encountered: