activerecord-cockroachdb-adapter 7.2.3 → 7.2.4
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 +4 -0
- data/lib/active_record/connection_adapters/cockroachdb_adapter.rb +13 -13
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c264b125195bc158e58aa652d8ef439fbdc0143906e89b36f4dde335b0d01a62
|
|
4
|
+
data.tar.gz: 30edfe2dcfd8c22c9e85e90a4b473321537f3f2c7360aa532e0a4828e5c51697
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c16131d979e0786fe578d33f3f39e402c8dbe86c7b8c2d9a505ed6e54cdfc0de47b7a36913ae6fb5d626bd834083ce9f12a03c4656bf51e6e7088f63924944ec
|
|
7
|
+
data.tar.gz: ad0ebb869bd80919de447aab0ca459f7a40f87ca0a682f2939b4f17cbc98572fe2b542e214391acb2e592bcb1fe814cdd06e22678766d645a84585402072ae76
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.2.4 - 2026-08-19
|
|
4
|
+
|
|
5
|
+
- Detect cached plan failures by error message instead of source function, so recovery keeps working after CockroachDB moved where the error is raised ([#403](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/403))
|
|
6
|
+
|
|
3
7
|
## 7.2.3 - 2026-01-30
|
|
4
8
|
|
|
5
9
|
- Disallow usage of ROLLBACK AND CHAIN syntax, which is not yet supported in CockroachDB ([#397](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/397))
|
|
@@ -449,24 +449,24 @@ module ActiveRecord
|
|
|
449
449
|
end
|
|
450
450
|
|
|
451
451
|
# override
|
|
452
|
-
#
|
|
453
|
-
#
|
|
454
|
-
# be an ActiveRecord::PreparedStatementCacheExpired
|
|
455
|
-
# error.
|
|
452
|
+
# Classifies a FEATURE_NOT_SUPPORTED error from the PG gem as an
|
|
453
|
+
# ActiveRecord::PreparedStatementCacheExpired.
|
|
456
454
|
#
|
|
457
|
-
#
|
|
458
|
-
#
|
|
459
|
-
# is
|
|
460
|
-
#
|
|
461
|
-
#
|
|
462
|
-
#
|
|
463
|
-
#
|
|
464
|
-
#
|
|
455
|
+
# Upstream matches PG_DIAG_SOURCE_FUNCTION == "RevalidateCachedQuery",
|
|
456
|
+
# the one PostgreSQL C function that raises this error. CockroachDB's
|
|
457
|
+
# raising function is an internal detail that has already moved
|
|
458
|
+
# (runExecBuilder before cockroachdb/cockroach#164406, execBind after),
|
|
459
|
+
# so match the message instead. The message is not formally guaranteed,
|
|
460
|
+
# but it has been unchanged in PostgreSQL since 8.3 and drivers such as
|
|
461
|
+
# pgx assert the exact string. Upstream avoids message matching because
|
|
462
|
+
# PostgreSQL localizes messages via lc_messages (rails/rails@d507ae2a74);
|
|
463
|
+
# CockroachDB does not localize, so that concern does not apply.
|
|
464
|
+
CACHED_PLAN_HEURISTIC = "cached plan must not change result type"
|
|
465
465
|
def is_cached_plan_failure?(e)
|
|
466
466
|
pgerror = e.cause
|
|
467
467
|
|
|
468
468
|
pgerror.result.result_error_field(PG::PG_DIAG_SQLSTATE) == FEATURE_NOT_SUPPORTED &&
|
|
469
|
-
pgerror.result.result_error_field(PG::
|
|
469
|
+
pgerror.result.result_error_field(PG::PG_DIAG_MESSAGE_PRIMARY).include?(CACHED_PLAN_HEURISTIC)
|
|
470
470
|
rescue
|
|
471
471
|
false
|
|
472
472
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-cockroachdb-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.2.
|
|
4
|
+
version: 7.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cockroach Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|