redis_queued_locks 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -3
  3. data/README.md +262 -60
  4. data/lib/redis_queued_locks/acquier/acquire_lock/delay_execution.rb +2 -2
  5. data/lib/redis_queued_locks/acquier/acquire_lock/try_to_lock.rb +239 -12
  6. data/lib/redis_queued_locks/acquier/acquire_lock/with_acq_timeout.rb +2 -2
  7. data/lib/redis_queued_locks/acquier/acquire_lock/yield_expire.rb +115 -0
  8. data/lib/redis_queued_locks/acquier/acquire_lock.rb +200 -89
  9. data/lib/redis_queued_locks/acquier/clear_dead_requests.rb +3 -3
  10. data/lib/redis_queued_locks/acquier/extend_lock_ttl.rb +3 -3
  11. data/lib/redis_queued_locks/acquier/is_locked.rb +2 -2
  12. data/lib/redis_queued_locks/acquier/is_queued.rb +2 -2
  13. data/lib/redis_queued_locks/acquier/keys.rb +2 -2
  14. data/lib/redis_queued_locks/acquier/lock_info.rb +19 -3
  15. data/lib/redis_queued_locks/acquier/locks.rb +13 -4
  16. data/lib/redis_queued_locks/acquier/queue_info.rb +2 -2
  17. data/lib/redis_queued_locks/acquier/queues.rb +4 -4
  18. data/lib/redis_queued_locks/acquier/release_all_locks.rb +4 -4
  19. data/lib/redis_queued_locks/acquier/release_lock.rb +4 -4
  20. data/lib/redis_queued_locks/acquier.rb +1 -1
  21. data/lib/redis_queued_locks/client.rb +50 -22
  22. data/lib/redis_queued_locks/debugger/interface.rb +4 -4
  23. data/lib/redis_queued_locks/debugger.rb +8 -8
  24. data/lib/redis_queued_locks/errors.rb +10 -6
  25. data/lib/redis_queued_locks/instrument/active_support.rb +2 -2
  26. data/lib/redis_queued_locks/instrument/void_notifier.rb +2 -2
  27. data/lib/redis_queued_locks/instrument.rb +2 -2
  28. data/lib/redis_queued_locks/logging/void_logger.rb +10 -10
  29. data/lib/redis_queued_locks/logging.rb +10 -3
  30. data/lib/redis_queued_locks/resource.rb +22 -16
  31. data/lib/redis_queued_locks/utilities.rb +2 -2
  32. data/lib/redis_queued_locks/version.rb +2 -2
  33. data/lib/redis_queued_locks.rb +2 -2
  34. metadata +4 -4
  35. data/lib/redis_queued_locks/acquier/acquire_lock/yield_with_expire.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b175564df436902d56e07a376f0257118eced8d7c81dbb81837e63cdef74938
4
- data.tar.gz: f88d3e83045cb4dd4dcd10b12744399ce45d3b99a84f6ca492d801a678db55f0
3
+ metadata.gz: 06ddeeb8f9ef0bd0c24742e68e83d10b237f8233ca5183c7f9612e7aebadd874
4
+ data.tar.gz: df9a7ba009357fc3fa80efc9b5837cec56f10cb9004f54df19e5d08fd06f7f26
5
5
  SHA512:
6
- metadata.gz: ae486564a408bc9039d6b09f3fe08ba37e733bae902ec2c3f55eae84b22a05e6c6f31bc9ceafc5ee78a10ae34dfdc0b3e7dcbfb09a41f74795ed29dce823a6bc
7
- data.tar.gz: ba40ab572fb1863b0bcddee6536385d19e3b3c7c9df07b2e2d71d74ad740eccb05a18847222be70bf6796596ce2b93266dbf462dccab294c6200a4441ca1f1a7
6
+ metadata.gz: 722aff2cb859419913d8f47c6118acaab378db70e49034290043cb1f9c3b4df115d15020d37effe815399d389fb360b68f2692a50537165043eb8a659428b6ba
7
+ data.tar.gz: ef370212d73abc96b1fed6962e274b616bb9b1ed232576ebee0b1e2e2b98d62cbdbe7dbb113ac32b28e489d4142a3a2f91b7f96be1be6c11d285cb948711bfee
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.3.0] - 2024-05-08
4
+ ### Added
5
+ - **Major Feature**: support for **Reentrant Locks**;
6
+ - The result of lock obtaining now includes `:process` key that shows the type of logical process that obtains the lock
7
+ (`:lock_obtaining`, `:extendable_conflict_work_through`, `:conflict_work_through`, `:dead_locking`);
8
+ - Added reentrant lock details to `RedisQueuedLocks::Client#lock_info` and `RedisQueuedLocks::Client#locks` method results;
9
+ - Documentation updates;
10
+ ### Changed
11
+ - Logging: `redis_queued_locks.fail_fast_or_limits_reached__dequeue` log is renamed to `redis_queued_locks.fail_fast_or_limits_reached_or_deadlock__dequeue`
12
+ in order to reflect the lock conflict failures too;
13
+
14
+ ## [1.2.0] - 2024-04-27
15
+ ### Added
16
+ - Documentation updates;
17
+ - Logging: support for `semantic_logger` loggers (see: https://logger.rocketjob.io/) (https://github.com/reidmorrison/semantic_logger)
18
+
3
19
  ## [1.1.0] - 2024-04-01
4
20
  ### Added
5
21
  - Documentation updates:
@@ -7,8 +23,7 @@
7
23
  - added missing docs for `config.dead_request_ttl`;
8
24
  - some minor updates;
9
25
  ### Changed
10
- - `#clear_dead_requests`: `:scan_size` is equal to `config[:lock_release_batch_size]` now (instead of to `config[:key_extraction_batch_size]`);
11
- cuz `#clear_dead_requests` works with lock releasing;
26
+ - `#clear_dead_requests`: `:scan_size` is equal to `config[:lock_release_batch_size]` now (instead of to `config[:key_extraction_batch_size]`), cuz `#clear_dead_requests` works with lock releasing;
12
27
 
13
28
  ## [1.0.0] - 2024-04-01
14
29
  - First Major Release;
@@ -195,7 +210,7 @@
195
210
  ### Changed
196
211
  - The lock acquier identifier (`acq_id`) now includes the fiber id, the ractor id and an unique per-process
197
212
  10 byte string. It is added in order to prevent collisions between different processes/pods
198
- that will have the same procjet id / thread id identifiers (cuz it is an object_id integers) that can lead
213
+ that will have the same process id / thread id identifiers (cuz it is an object_id integers) that can lead
199
214
  to the same position with the same `acq_id` for different processes/pods in the lock request queue.
200
215
 
201
216
  ## [0.0.8] - 2024-02-27