You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yury Gerzhedovich (Jira)" <ji...@apache.org> on 2023/10/09 11:30:00 UTC
[jira] [Created] (IGNITE-20598) incorrect error for query on closed transaction through Client API
Yury Gerzhedovich created IGNITE-20598:
------------------------------------------
Summary: incorrect error for query on closed transaction through Client API
Key: IGNITE-20598
URL: https://issues.apache.org/jira/browse/IGNITE-20598
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Yury Gerzhedovich
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.
{code:java}
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)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)