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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b46bd07dab8fc9ce3228eb7bb804569a99dfc8f7f65a1eaf085c3af9061ae09e
4
- data.tar.gz: 2c9470b5dd4b41a112c93bb891f33ff68f930dc47fd78a37516540249ded415d
3
+ metadata.gz: 83f1a77fc07b776195720c2f06a7117baa22ea7f68be06120d3fe7befe26db84
4
+ data.tar.gz: 4a06cb4f59afb485331513ab01172c2836f07702bd79fdc85c95efaa459a2597
5
5
  SHA512:
6
- metadata.gz: a7e0740247300cf79385c477a66bc823621888104887de33c3868cf4d06a2087ae6b2ea972e8844fd148e8e3b0da9468cfaf276f68f5d1be7e3b80f72e0c31fe
7
- data.tar.gz: d920cda1d4f89da24123df0cf95595c87c21e1e4ed18495765ae0f78c1714af325f94e8e88a7971e4bb10250dde4f392095e8d19f010e9a5f0341d3d3201dc0c
6
+ metadata.gz: ebae6ceee85253f767b0de53b70a69f00590e91bbcdb6c86860c35a00d736f59593f924eaccb13b593def1f9b504f338f786a2eeb59f9dcd4a596c9d70f2f348
7
+ data.tar.gz: 5e6e97c4645df750d618c778caccd80fa3eab1491e141b238e5e4c1ed15f59c72871c00f10d38269f33ada195b96ed5b407a62cc52d2543a169b150d2150c770
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.0] - 2024-04-01
4
+ - First Major Release;
5
+
3
6
  ## [0.0.40] - 2024-04-01
4
7
  ### Added
5
8
  - `RedisQueuedLocks::Client#clear_dead_requests` implementation;
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RedisQueuedLocks · [![Gem Version](https://badge.fury.io/rb/redis_queued_locks.svg)](https://badge.fury.io/rb/redis_queued_locks)
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
- - has a preconfigured value in `config[:logger]`;
635
+ - pre-configured value in `config[:logger]`;
636
636
  - `:instrumenter` - (optional) `[#notify]`
637
637
  - custom instrumenter object;
638
- - has a preconfigured value in `config[:isntrumenter]`;
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 :instrument key;
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 can happen when your processs
869
- that are enqueeud to the lock queue is failed unexpectedly (for some reason) before the lock acquire moment
870
- and when no any other process does not need this lock anymore. For this case your lock will be cleared only when any process
871
- will try to acquire this lock again (cuz lock acquirement triggers the removement of expired requests).
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 `dead_ttl` option, that is pre-configured by default via `config[:dead_request_ttl]`.
875
+ with corresponding `:dead_ttl` option, that is pre-configured by default via `config[:dead_request_ttl]`.
875
876
 
876
- An option is required because of it is no any **fast** way to understand which request
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 only makes sense for non-`timed` locks;
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;
@@ -5,6 +5,6 @@ module RedisQueuedLocks
5
5
  #
6
6
  # @api public
7
7
  # @since 0.0.1
8
- # @version 0.0.40
9
- VERSION = '0.0.40'
8
+ # @version 1.0.0
9
+ VERSION = '1.0.0'
10
10
  end
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.40
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-03-31 00:00:00.000000000 Z
11
+ date: 2024-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client