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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/pg_failover/active_record_adapter.rb +3 -1
- data/lib/pg_failover/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95660e195b0d0f1f47f85ca58fae5005a57ddfaff4abb631c4a57f76bd93ce79
|
|
4
|
+
data.tar.gz: 5246c01b432ea6f0ec55fb62e4b438a5e64d676968056042de8ebaa7ad8cb9ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
14
|
+
throttle_by: connection,
|
|
13
15
|
in_recovery: proc {
|
|
14
16
|
result = connection.execute('select pg_is_in_recovery()').first
|
|
15
17
|
|
data/lib/pg_failover/version.rb
CHANGED