redis_queued_locks 0.0.40 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +17 -16
- data/lib/redis_queued_locks/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83f1a77fc07b776195720c2f06a7117baa22ea7f68be06120d3fe7befe26db84
|
4
|
+
data.tar.gz: 4a06cb4f59afb485331513ab01172c2836f07702bd79fdc85c95efaa459a2597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebae6ceee85253f767b0de53b70a69f00590e91bbcdb6c86860c35a00d736f59593f924eaccb13b593def1f9b504f338f786a2eeb59f9dcd4a596c9d70f2f348
|
7
|
+
data.tar.gz: 5e6e97c4645df750d618c778caccd80fa3eab1491e141b238e5e4c1ed15f59c72871c00f10d38269f33ada195b96ed5b407a62cc52d2543a169b150d2150c770
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# RedisQueuedLocks ·
|
1
|
+
# RedisQueuedLocks · ![Gem Version](https://img.shields.io/gem/v/redis_queued_locks) ![build](https://github.com/0exp/redis_queued_locks/actions/workflows/build.yml/badge.svg??branch=master)
|
2
2
|
|
3
3
|
<a href="https://redis.io/docs/manual/patterns/distributed-locks/">Distributed locks</a> with "lock acquisition queue" capabilities based on the Redis Database.
|
4
4
|
|
@@ -632,12 +632,12 @@ rql.unlock("your_lock_name")
|
|
632
632
|
- pre-configured in `config[:lock_release_batch_size]`;
|
633
633
|
- `:logger` - (optional) `[::Logger,#debug]`
|
634
634
|
- custom logger object;
|
635
|
-
-
|
635
|
+
- pre-configured value in `config[:logger]`;
|
636
636
|
- `:instrumenter` - (optional) `[#notify]`
|
637
637
|
- custom instrumenter object;
|
638
|
-
-
|
638
|
+
- pre-configured value in `config[:isntrumenter]`;
|
639
639
|
- `:instrument` - (optional) `[NilClass,Any]`
|
640
|
-
- custom instrumentation data wich will be passed to the instrumenter's payload with
|
640
|
+
- custom instrumentation data wich will be passed to the instrumenter's payload with `:instrument` key;
|
641
641
|
|
642
642
|
- returns:
|
643
643
|
- `[Hash<Symbol,Numeric>]` - Format: `{ ok: true, result: Hash<Symbol,Numeric> }`;
|
@@ -865,15 +865,16 @@ rql.queues_info # or rql.qeuues_info(scan_size: 123)
|
|
865
865
|
|
866
866
|
<sup>\[[back to top](#usage)\]</sup>
|
867
867
|
|
868
|
-
In some cases your lock requests may become "dead". It
|
869
|
-
that are enqueeud to the lock queue is failed unexpectedly (for some reason)
|
870
|
-
and when no any other process does not need this lock anymore.
|
871
|
-
|
868
|
+
In some cases your lock requests may become "dead". It means that your lock request lives in lock queue in Redis without
|
869
|
+
any processing. It can happen when your processs that are enqueeud to the lock queue is failed unexpectedly (for some reason)
|
870
|
+
before the lock acquire moment occurs and when no any other process does not need this lock anymore.
|
871
|
+
For this case your lock reuquest will be cleared only when any process will try
|
872
|
+
to acquire this lock again (cuz lock acquirement triggers the removement of expired requests).
|
872
873
|
|
873
874
|
In order to help with these dead requests you may periodically call `#clear_dead_requests`
|
874
|
-
with corresponding
|
875
|
+
with corresponding `:dead_ttl` option, that is pre-configured by default via `config[:dead_request_ttl]`.
|
875
876
|
|
876
|
-
|
877
|
+
`:dead_ttl` option is required because of it is no any **fast** and **resource-free** way to understand which request
|
877
878
|
is dead now and is it really dead cuz each request queue can host their requests with
|
878
879
|
a custom queue ttl for each request differently.
|
879
880
|
|
@@ -1026,15 +1027,15 @@ Detalized event semantics and payload structure:
|
|
1026
1027
|
|
1027
1028
|
<sup>\[[back to top](#table-of-contents)\]</sup>
|
1028
1029
|
|
1030
|
+
- **strict redlock algorithm support** (support for many `RedisClient` instances);
|
1029
1031
|
- Semantic Error objects for unexpected Redis errors;
|
1030
|
-
- better specs with 100% test coverage;
|
1031
|
-
- per-block-holding-the-lock sidecar `Ractor` and `in progress queue` in RedisDB that will extend
|
1032
|
+
- better specs with 100% test coverage (total rework);
|
1033
|
+
- (non-`timed` locks): per-ruby-block-holding-the-lock sidecar `Ractor` and `in progress queue` in RedisDB that will extend
|
1032
1034
|
the acquired lock for long-running blocks of code (that invoked "under" the lock
|
1033
|
-
whose ttl may expire before the block execution completes). It
|
1034
|
-
- lock prioritization;
|
1035
|
+
whose ttl may expire before the block execution completes). It makes sense for non-`timed` locks *only*;
|
1036
|
+
- lock request prioritization;
|
1035
1037
|
- support for LIFO strategy;
|
1036
|
-
- structured logging (separated docs);
|
1037
|
-
- GitHub Actions CI;
|
1038
|
+
- more structured logging (separated docs);
|
1038
1039
|
- `RedisQueuedLocks::Acquier::Try.try_to_lock` - detailed successful result analization;
|
1039
1040
|
- better code stylization (+ some refactorings);
|
1040
1041
|
- statistics with UI;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_queued_locks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Ibragimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|