[teiid-issues] [JBoss JIRA] (TEIIDSB-144) Calling setTransactionIsolation on pg driver causes the connection to be closed
Steven Hawkins (Jira)
issues at jboss.org
Thu Dec 19 14:52:06 EST 2019
[ https://issues.redhat.com/browse/TEIIDSB-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938532#comment-13938532 ]
Steven Hawkins commented on TEIIDSB-144:
----------------------------------------
The problem line: https://github.com/brettwooldridge/HikariCP/blob/109b910fbfc2d95b920fde771794bc2ae1f96860/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java#L73
There is no a pr open to customize the pool behavior - https://github.com/brettwooldridge/HikariCP/pull/1509
No indication of when that will be picked up.
In the meantime our options are:
- use tomcat jdbc as the pooling mechanism. Similar to https://github.com/javamelody/javamelody/issues/801 The problems here are that teiid-syndesis includes pool initialization assuming hikari and that tomcat does no purging at all, so a test/validation method must be turned on.
- create a proxy layer to trap exceptions that could be a problem
- put a bunch of conditionals in teiid about when to is allowed to make calls that may not be implemented
- just wait for the fix...
Other than doing nothing, I'd vote for switching to tomcat jdbc. [~rareddy] do you have a vote?
> Calling setTransactionIsolation on pg driver causes the connection to be closed
> -------------------------------------------------------------------------------
>
> Key: TEIIDSB-144
> URL: https://issues.redhat.com/browse/TEIIDSB-144
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 1.3.1
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> An attempt to set the isolation level on pg 42.2.8 resulted in an exception SQLSTATE 0a000 - unsupported - which causes the connection pool to mark the connection as broken:
> {code}
> 2019-11-25 23:07:50.125 WARN 43993 --- [ProcessorQueue6] com.zaxxer.hikari.pool.ProxyConnection : HikariPool-1 - Connection org.postgresql.jdbc.PgConnection at 2ffebc7e marked as broken because of SQLSTATE(0A000), ErrorCode(0)
> org.postgresql.util.PSQLException:
> at org.postgresql.jdbc.PgConnection.setTransactionIsolation(PgConnection.java:851) ~[postgresql-42.2.8.jar:42.2.8]
> at com.zaxxer.hikari.pool.ProxyConnection.setTransactionIsolation(ProxyConnection.java:407) ~[HikariCP-3.2.0.jar:na]
> at com.zaxxer.hikari.pool.HikariProxyConnection.setTransactionIsolation(HikariProxyConnection.java) ~[HikariCP-3.2.0.jar:na]
> at org.teiid.translator.jdbc.JDBCBaseExecution.<init>(JDBCBaseExecution.java:72) ~[translator-jdbc-12.3.0.jar:12.3.0]
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list