pg_failover 1.2.0 → 1.2.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: 0efa830edf653f174a54566d5845b7e9676f9db509ed28bf7e61a64d009e18bf
4
- data.tar.gz: 9a377708bb581cd50a3b69dea27dcc488852a437e44dd6990f40f89256894fef
3
+ metadata.gz: 95660e195b0d0f1f47f85ca58fae5005a57ddfaff4abb631c4a57f76bd93ce79
4
+ data.tar.gz: 5246c01b432ea6f0ec55fb62e4b438a5e64d676968056042de8ebaa7ad8cb9ee
5
5
  SHA512:
6
- metadata.gz: e0eab6bb57628e7332f853ecced8a94a14960e01288ba95781fd6758b6faf3a56c45b369ab80c916bfbae149741290b944a092e9267b5b0b84a0f2a36b7946f4
7
- data.tar.gz: '083680b74eb3c59d33f91523b5ccedd014042d33c73855baf58a095c3273a99718bd7489444e1f561069d41656647769165e3af8b1c11adc412d96813fed38e0'
6
+ metadata.gz: 14f7ad9351d18ae63f33a8ae1bfae20e616f0dabdc7910e4dbd5032ce2f9ee342f1cbcc8b659beed8fce69c0d92badf05ccf875c4b4f36a166802f3992d82101
7
+ data.tar.gz: 2e895e66571275b7e32aab8a64a007bce017166cafc86e5b01c97b6f0846f70fc241295556c64080e92500e142ff18138af71824a73064552a2b8e11046a47fd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v1.2.1 Stop the ActiveRecord checkout hook disabling automatic reconnects
2
+
3
+ Since ActiveRecord 7.1, calling `#raw_connection` marks a connection dirty and
4
+ ActiveRecord stops reconnecting it after it drops. The hook now throttles by the
5
+ connection adapter instead.
6
+
1
7
  v1.2.0 Switch CI to GitHub Actions
2
8
 
3
9
  Supported:
@@ -8,8 +8,10 @@ module PgFailover
8
8
  # methods like #execute and #reconnect! are against that connection
9
9
  connection = self
10
10
 
11
+ # Throttle by the adapter, not #raw_connection: since ActiveRecord 7.1 calling #raw_connection
12
+ # marks the connection dirty, which stops ActiveRecord reconnecting it after it drops.
11
13
  PgFailover.connection_validator.call(
12
- throttle_by: connection.raw_connection,
14
+ throttle_by: connection,
13
15
  in_recovery: proc {
14
16
  result = connection.execute('select pg_is_in_recovery()').first
15
17
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgFailover
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksandar Ivanov