crate
crate copied to clipboard
Updating to org.postgresql:postgresql 42.7.0 trips: Missing entry `default_transaction_isolation` in `pg_catalog.pg_settings`
CrateDB version
Nightly
CrateDB setup information
Standard Docker "services" setup on CI/GHA.
Problem description
When upgrading org.postgresql:postgresql from 42.6.0 to 42.7.0 on behalf of a Dependabot patch, a QA-style test code yields an error.
Unable to determine a value for DefaultTransactionIsolation due to missing entry in pg_catalog.pg_settings WHERE name=default_transaction_isolation.
-- https://github.com/crate/cratedb-examples/actions/runs/7000332105/job/19040823665?pr=162#step:8:1829
References
- https://github.com/crate/crate-qa/pull/288
- https://github.com/crate/cratedb-examples/pull/162
- https://github.com/crate/cratedb-examples/pull/191
Steps to Reproduce
git clone https://github.com/crate/cratedb-examples --branch=dependabot/maven/by-language/java-qa/org.postgresql-postgresql-42.7.0
cd cratedb-examples/by-language/java-qa
mvn test
Actual Result
The test suite breaks.
Expected Result
The test suite succeeds.
Can you share a short java snippet that leads to the error?
Just updated the driver in the test suite here, and everything seems to work: https://github.com/crate/crate/pull/15116
Hi Mathias,
thank you for looking into this.
Can you share a short java snippet that leads to the error?
Sure. It seems to be this code snippet at crate-qa::stock_jdbc::JdbcMetaDataTest.java#L192-L197. Below, you will also find references where it trips on behalf of a corresponding crate-qa test run.
With kind regards, Andreas.
Code Snippet
@Test
public void test_getDefaultTransactionIsolation() throws Exception {
try (var conn = DriverManager.getConnection(URL)) {
assertThat(conn.getMetaData().getDefaultTransactionIsolation(), is(Connection.TRANSACTION_READ_COMMITTED));
}
}
References
- https://github.com/crate/crate-qa/pull/288
- https://jenkins.crate.io/blue/organizations/jenkins/CrateDB%2Fqa%2Fcrate_qa_on_pr/detail/crate_qa_on_pr/299/pipeline/41#step-286-log-178
Closing this for now. Given that CrateDB has no transactions none of the regular transaction isolation levels are a 100% match. Failing on the method is therefore not entirely wrong.
We can revisit this if a more concrete use case pops up