active_record_proxy_adapters 0.11.0 → 0.11.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: e9709c38149a112c5203c15ed59fe97903484dcc7842c82e070c57d29fea21ed
4
- data.tar.gz: f9054fc5ce575e3d0877a4aa3b3ba9cd59da532c4b30d85536e4f63318119aee
3
+ metadata.gz: 8af46e249283bd304b76cd6f92c4ebd8547078c29529e63a39c04c90ace297d2
4
+ data.tar.gz: c3753aaf59899dd7f97b288b4ead7f478a9341a32afba0e4603125e860956ad9
5
5
  SHA512:
6
- metadata.gz: 7fe2bf87693040205f3e1aa62cc48b783d830b618d65423a4a8c3bae1dc029aae526d00227f5ca7ed4542dba04832641a86b2344ab6036956d3b2d9d1fc90b6b
7
- data.tar.gz: 26c32105d9ed2c6f6d49016224284077207f780d0d3e56e62a59e81441808b1c00109f52c0baf867b09dba1a33a7aab2e12e4bc54b59789ddf288f0802e615cd
6
+ metadata.gz: 34eebec75d208cf8cc8226382dfe26b7e63e88e0e5c4ebbc802259875c0972b51346aabdf92c82ef912bcef92ba06933a54ccfa30060e31d69d2791e8bcb4fa6
7
+ data.tar.gz: e07490e7946807c07d626c43932ea1996349048ee953a1a407d7048c382446eb984530db358ff916d8c46f5548828a8325271399b92b4ac9a4db7ea563bae287
@@ -173,15 +173,6 @@ module ActiveRecordProxyAdapters
173
173
  update_primary_latest_write_timestamp if !replica_connection?(connection) && write_statement?(sql_string)
174
174
 
175
175
  result
176
- ensure
177
- # Check the connection back into its own pool, not whatever pool currently
178
- # answers to the :reading role. In Rails system tests,
179
- # ActiveRecord::TestFixtures#setup_shared_connection_pool reassigns the
180
- # :reading role's pool_config on every transactional-fixture test's
181
- # before_setup, so re-resolving `replica_pool` here can return a pool
182
- # different from the one the connection was checked out of — which would
183
- # check a replica adapter into the primary pool and poison it.
184
- connection.pool.checkin(connection) if replica_connection?(connection)
185
176
  end
186
177
 
187
178
  def connected_to(role:, &block)
@@ -195,7 +186,7 @@ module ActiveRecordProxyAdapters
195
186
  end
196
187
 
197
188
  def checkout_replica_connection
198
- replica_pool.checkout(proxy_checkout_timeout)
189
+ replica_pool.lease_connection
199
190
  # rescue NoDatabaseError to avoid crashing when running db:create rake task
200
191
  # rescue ConnectionNotEstablished to handle connectivity issues in the replica
201
192
  # (for example, replication delay)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordProxyAdapters
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_proxy_adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Cruz