Skip to content

Releases: AmrSaber/simple-redis-mutex

v2.1.0

07 Dec 20:35
Compare
Choose a tag to compare

Features

  • Add fencing tokens
  • Support refresh timeout
  • Cache release script

See readme for more details.

v2.0.0

27 Nov 02:41
Compare
Choose a tag to compare

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 locks
    • failAfterMillis -> 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 and pollingInterval 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.

v1.4.0

03 Sep 13:27
46f9cca
Compare
Choose a tag to compare
  • Add lock name in error when acquiring lock fails
  • Update related tests to expect lock name
  • Fix npm vulnerabilities (for dev dependencies)

V1.3.1

11 Dec 18:39
19ccd42
Compare
Choose a tag to compare

No new features or bug fixes for this release, it just updates the package's meta

V1.3.0

02 Dec 13:41
673b367
Compare
Choose a tag to compare

Support FIFO locking (first to wait first to acquire).

v1.2.0

06 Jul 20:29
794d68a
Compare
Choose a tag to compare

Support cluster type.

V1.1.0

10 Jun 22:20
bdd8eb9
Compare
Choose a tag to compare

Add typescript types for package interface.

V1.0.3

01 May 03:15
c28ceb5
Compare
Choose a tag to compare

Updates

  • Fix bug #6.
  • Update packages.
  • Update Github actions and add a new action to auto-release with merge on master.