idempo 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3db7fbb3c612bae5675890f118986c3d026e49c73f3c74c24f15fea51e6a67c7
4
- data.tar.gz: 65a193261af6e424fe8f7e3437d28e02c20ddb4c9ae199c9556f39676474b8ac
3
+ metadata.gz: 93f7d90c5ffda4a513a27f7bc55ead7fd02ca35767135d726a4eaf42f9e71045
4
+ data.tar.gz: 9ac0f66203734a0744d553eec1760342f89ee8f436f84297edbea002298ef7db
5
5
  SHA512:
6
- metadata.gz: bd32562481a479070ed2806ef3201d370417fd9acfbbb8499d1aefb2f1000f278ee3dff47ccb0ac640f33001be8c41cccba7c498980d07c893dee519e53f539b
7
- data.tar.gz: df3b05f901ac7e49bb82bfde9a522e2a179b96953db10751b7814858597a5a0af0aa82ff0fd6824e3a11cae6bdf4ebc84004a35b09cfae7a39958114a307eef8
6
+ metadata.gz: f3f42ab5bc2c256ad672555fe0e1768421de19b8ee46af1d3d25548b467804227197e159cba8cfbb8397d6103b62aea49d5e187b856bd438603f85a9eeadc17c
7
+ data.tar.gz: 2e701bfd31e53607820bbaae2bef63633e9c903db7be25406a8a84d9565ebf49d2903dc7afcb6c27e614b5625444e9071f2e9f1be894ddfac0a59b2933ceeee5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.3.1
2
+
3
+ - Instead of retaining the ActiveRecord connection in Idempo operations, check it out temporarily from the AR pool.
4
+ This should improve interop with fibers/Async.
5
+
1
6
  ## 1.3.0
2
7
 
3
8
  - Streamline integration with both Rack 2 and 3, add tests for request fingerprinting.
@@ -82,13 +82,15 @@ class Idempo::ActiveRecordBackend
82
82
  # process) and then once we have that - the DB lock.
83
83
  @memory_lock.with(request_key) do
84
84
  db_safe_key = Digest::SHA1.base64digest(request_key)
85
- database_lock = lock_implementation_for_connection(model.connection)
86
- raise Idempo::ConcurrentRequest unless database_lock.acquire(model.connection, request_key)
85
+ ActiveRecord::Base.connection_pool.with_connection do |connection|
86
+ database_lock = lock_implementation_for_connection(connection)
87
+ raise Idempo::ConcurrentRequest unless database_lock.acquire(connection, request_key)
87
88
 
88
- begin
89
- yield(Store.new(db_safe_key, model))
90
- ensure
91
- database_lock.release(model.connection, request_key)
89
+ begin
90
+ yield(Store.new(db_safe_key, model))
91
+ ensure
92
+ database_lock.release(connection, request_key)
93
+ end
92
94
  end
93
95
  end
94
96
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Idempo
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idempo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-11-29 00:00:00.000000000 Z
12
+ date: 2025-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack