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

Java Thin 3.0: incorrect error for query on closed transaction through Client API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-beta1
    • 3.0
    • sql, thin client

    Description

      During using already closed transaction for query execution we got SqlException with code Transactions.TX_FAILED_READ_WRITE_OPERATION_ERR. But the Exception we have just for embeded API, for client API we have Ignite Exception with INTERAL_ERROR code.
      Let's investigate and fix the issue.

      Test with reproducer are org.apache.ignite.internal.sql.api.ItSqlApiBaseTest#checkTransactionsWithDml, also please find tho mention of the ticket.

      Caused by: org.apache.ignite.lang.IgniteException: IGN-CMN-65535 TraceId:1615f3e8-e576-411e-b2ce-19ae7edd0f7f org.apache.ignite.internal.lang.IgniteInternalException: Failed to find resource with id: 1
      	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
      	at org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:772)
      	at org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:706)
      	at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:543)
      	at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCauseInternal(ExceptionUtils.java:641)
      	at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:494)
      	at org.apache.ignite.internal.sql.AbstractSession.execute(AbstractSession.java:63)
      	at org.apache.ignite.internal.sql.api.ItSqlSynchronousApiTest.checkDml(ItSqlSynchronousApiTest.java:78)
      	at org.apache.ignite.internal.sql.api.ItSqlApiBaseTest.lambda$checkTransactionsWithDml$1(ItSqlApiBaseTest.java:285)
      	at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:53)
      	... 75 more
      Caused by: java.util.concurrent.CompletionException: org.apache.ignite.lang.IgniteException: IGN-CMN-65535 TraceId:1615f3e8-e576-411e-b2ce-19ae7edd0f7f org.apache.ignite.internal.lang.IgniteInternalException: Failed to find resource with id: 1
      	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
      	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
      	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632)
      	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
      	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
      	at org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:426)
      	at org.apache.ignite.internal.client.TcpClientChannel.onMessage(TcpClientChannel.java:231)
      	at org.apache.ignite.internal.client.io.netty.NettyClientConnection.onMessage(NettyClientConnection.java:111)
      	at org.apache.ignite.internal.client.io.netty.NettyClientMessageHandler.channelRead(NettyClientMessageHandler.java:33)
      	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:829)
      Caused by: org.apache.ignite.lang.IgniteException: IGN-CMN-65535 TraceId:1615f3e8-e576-411e-b2ce-19ae7edd0f7f org.apache.ignite.internal.lang.IgniteInternalException: Failed to find resource with id: 1
      	at org.apache.ignite.internal.client.TcpClientChannel.readError(TcpClientChannel.java:480)
      	at org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:423)
      
      

      Attachments

        Issue Links

          Activity

            People

              ptupitsyn Pavel Tupitsyn
              jooger Iurii Gerzhedovich
              Iurii Gerzhedovich Iurii Gerzhedovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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