Releases: AmrSaber/simple-redis-mutex
Releases · AmrSaber/simple-redis-mutex
v2.1.0
v2.0.0
Breaking Changes
- Redis client is now redis and not ioredis
- options have been renamed:
timeoutMillis
->timeout
retryTimeMillis
->pollingInterval
-- and it is now only used for expired locks, other wise pub/sub is used with released locksfailAfterMillis
->failAfter
- FIFO option has been removed: existing implementation was wrong, it failed on lock-holder crash or failing to acquire the lock, and I could not come up with an implementation that would retain the functionality using redis only -- I sincerely apologize to anyone who have used it.
timeout
andpollingInterval
have defaults. Locks are not allowed to lock indefinitely.
Features
- Add
tryLock
that attempts to acquire lock in a non-blocking manner - Lock release Pub/Sub: When a lock is released, Redis Pub/Sub is used to signal waiting processes to attempt acquiring the lock. This gives huge performance gains making the locks more performant and waiting processes acquire locks faster.
onFail
: a feature request long time ago, finally made it to release.
See project's main README for details about all the points in this release.