Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
3.0.6
-
None
-
Ubuntu 20.04, Mariadb 10.6.9, Galera Cluster - 3 nodes, Apache Tomcat + Tomcat JDBC Connection Pool, OpenJDK 18.0.2
Description
I have following connection settings in tomcat's server.xml:
<Resource auth="Container" |
name="jdbc/necy-write" |
username="###" |
password="###" |
type="javax.sql.DataSource" |
driverClassName="org.mariadb.jdbc.Driver" |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" |
jdbcInterceptors="ConnectionState" |
defaultAutoCommit="false" |
defaultReadOnly="false" |
maxActive="50" |
maxIdle="20" |
maxWait="1000" |
initialSize="5" |
minIdle="2" |
removeAbandoned="true" |
rollbackOnReturn="true" |
testOnBorrow="true" |
maxAge="300000" |
useStatementFacade="false" |
url="jdbc:mariadb:sequential://localhost:###,###:###,###:###" |
defaultCatalog="necy" |
connectionProperties="
|
allowMultiQueries=true; |
rewriteBatchedStatements=true; |
useAffectedRows=true; |
useServerPrepStmts=false; |
useBulkStmts=false; |
"
|
validationQuery="SELECT 1" |
/>
|
There is default database / schema settings - defaultCatalog="necy". This is sometimes ignored by j/connector.
First I have error (this is as it should be):
java.lang.InterruptedException: Driver has reconnect connection after a communications link failure with address=(host=###)(port=###)(type=primary). In progress transaction was lost
It seems driver somehow reconnects but without setting default database because I have ful log of following errors:
java.util.concurrent.CompletionException: java.lang.InterruptedException: (conn=31) No database selected
I think it is j/connector bug because error message come from MultiPrimaryClient.java file.