square / mongo-lock

Distributed locking with MongoDB.
Apache License 2.0
80 stars 20 forks source link

getting shared lock with an expired exclusive lock #4

Closed quipri closed 4 years ago

quipri commented 4 years ago

Right now you are not allowed to get a shared lock if there was an exclusive lock which is now expired. Is this intended behavior?

michaelfinch commented 4 years ago

Does the exclusive lock still exist? If so, then yes. I just checked the README and it's not super obvious, but if you don't run a mongo-lock.Purger then expired locks will set around forever: https://github.com/square/mongo-lock#additional-features