[
https://issues.apache.org/jira/browse/IGNITE-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15250676#comment-15250676
]
ASF GitHub Bot commented on IGNITE-3035:
----------------------------------------
GitHub user peter-griffiths opened a pull request:
https://github.com/apache/ignite/pull/660
IGNITE-3035 Postgres mssql JDBC discovery fix
Updated the TcpDiscoveryJdbcIpFinder class to work with Postgres and
Microsoft SQL Server while maintaining the fix for Oracle databases introduced
with IGNITE-1993.
The issue stemmed from the fact that the DatabaseMetaData.getTables(...)
table name value has to be upper case for Oracle, but ran case sensitively for
other databases such as Postgres. This meant the TcpDiscoveryJdbcIpFinder
always failed to correctly determine if the "TBL_ADDRS" table already existed
before trying and failing to create it again. The table creation failures
caused an aborted transaction and subsequent SQL queries to fail with "ERROR:
current transaction is aborted, commands ignored until end of transaction
block".
The fix is to create the and table in the database in upper case.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/peter-griffiths/ignite
ignite-3035-postgres-mssql
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/660.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #660
----
----
> Recent JDBC discovery changes cause errors for Postgres and Microsoft SQL
> Server databases
> ------------------------------------------------------------------------------------------
>
> Key: IGNITE-3035
> URL: https://issues.apache.org/jira/browse/IGNITE-3035
> Project: Ignite
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6
> Reporter: Peter Griffiths
>
> The changes introduced by IGNITE-1993 to the TcpDiscoveryJdbcIpFinder class
> to introduce Oracle compatibility cause errors when Postgres or Microsoft SQL
> Server are used as the database. No such issues were encountered using
> either database before.
> The first node to join a grid succeeds and creates the IP table in the
> database, but any further node attempting to join the grid throws the
> following error (for Postgres):
> {code}
> Failed to register local node address in IP finder on start (retrying every
> 2000 ms).: class org.apache.ignite.spi.IgniteSpiException: Failed to
> initialize DB schema.
> ...
> Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is
> aborted, commands ignored until end of transaction block
> {code}
> The same behaviour occurs when using Microsoft SQL Server, but it throws a
> different error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)