Igor created IGNITE-21894:
-----------------------------
Summary: Undescriptive error when restart cluster during open JDBC
transaction
Key: IGNITE-21894
URL: https://issues.apache.org/jira/browse/IGNITE-21894
Project: Ignite
Issue Type: Bug
Components: jdbc, sql
Affects Versions: 3.0.0-beta1
Environment: 2 nodes cluster
Reporter: Igor
*Steps to reproduce:*
1. Start 2 nodes cluster.
2. Open JDBC connection, start transaction (using `.setAutoCommit(false)`).
3. Restart server node where connection was established.
4. Close JDBC statement and connection.
*Expected:*
Connection is closed with understandable error or without any error.
*Actual:*
Unclear exception on server side:
{code:java}
2024-04-01 00:55:28:399 +0000
[WARNING][ClusterFailoverMultiNodeTest_cluster_0-srv-worker-3][ClientInboundMessageHandler]
Error processing client request [connectionId=1, id=1, op=55,
remoteAddress=/127.0.0.1:59430]:Failed to find resource with id: 1
org.apache.ignite.internal.lang.IgniteInternalException: IGN-CMN-65535
TraceId:fe67e0da-5839-48c7-a59e-ca3465491698 Failed to find resource with id: 1
at
org.apache.ignite.client.handler.ClientResourceRegistry.get(ClientResourceRegistry.java:82)
at
org.apache.ignite.client.handler.JdbcQueryEventHandlerImpl.finishTxAsync(JdbcQueryEventHandlerImpl.java:390)
at
org.apache.ignite.client.handler.requests.jdbc.ClientJdbcFinishTxRequest.process(ClientJdbcFinishTxRequest.java:42)
at
org.apache.ignite.client.handler.ClientInboundMessageHandler.processOperation(ClientInboundMessageHandler.java:785)
at
org.apache.ignite.client.handler.ClientInboundMessageHandler.processOperation(ClientInboundMessageHandler.java:581)
at
org.apache.ignite.client.handler.ClientInboundMessageHandler.lambda$channelRead$2(ClientInboundMessageHandler.java:328)
at
org.gridgain.internal.security.context.SecuredRunnable.run(SecuredRunnable.java:34)
at
org.apache.ignite.client.handler.ClientInboundMessageHandler.channelRead(ClientInboundMessageHandler.java:328)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834) {code}
The exception on client side:
{code:java}
java.sql.SQLException: The transaction rollback request failed.
at
org.apache.ignite.internal.jdbc.JdbcConnection.finishTx(JdbcConnection.java:425)
at
org.apache.ignite.internal.jdbc.JdbcConnection.close(JdbcConnection.java:441)
at
org.gridgain.ai3tests.tests.ThinClientRollbackTests.test(ThinClientRollbackTests.java:109)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.concurrent.ExecutionException:
org.apache.ignite.lang.IgniteException: IGN-CMN-65535
TraceId:750d1311-4766-4351-916a-8cecc4b7e031 Failed to find resource with id: 1
at
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at
org.apache.ignite.internal.jdbc.JdbcConnection.finishTx(JdbcConnection.java:417)
... 7 more {code}
*Comments:*
If do the same with transaction using `IgniteClient` there are no errors.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)