Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-21894

Sql. Undescriptive error when restart cluster node during open JDBC transaction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.0-beta1
    • None
    • jdbc, sql
    • 2 nodes cluster

    Description

      Steps to reproduce:
      1. Start 2 nodes cluster.

      2. Open JDBC connection, start transaction (using `.setAutoCommit(false)`).

      3. Execute some insert queries. Do not commit the transaction.

      4. Restart server node where connection was established.

      5. Close JDBC statement and connection.
      Expected:
      Connection is closed with understandable error or without any error.

      Actual:
      Unclear exception on server side while closing the connection:

      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) 

      The exception on client side:

      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 

      Comments:

      If do the same with transaction using `IgniteClient` there are no errors.

      Attachments

        Issue Links

          Activity

            People

              xtern Pavel Pereslegin
              lunigorn Igor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m