[
https://issues.apache.org/jira/browse/IGNITE-28215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn updated IGNITE-28215:
------------------------------------
Priority: Critical (was: Major)
> Transaction context has been lost in DirectTxUtils
> --------------------------------------------------
>
> Key: IGNITE-28215
> URL: https://issues.apache.org/jira/browse/IGNITE-28215
> Project: Ignite
> Issue Type: Bug
> Components: thin clients ai3, transactions ai3
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Critical
> Labels: ignite-3
> Fix For: 3.2
>
>
> The following error is possible in certain cases even if there was no
> connection loss:
> {code}
> [WARNING][ForkJoinPool.commonPool-worker-24][TcpClientChannel] Failed to send
> request sync [id=3, op=50,
> remoteAddress=gridgain-use1.stg.aws.q2e.io/10.244.17.66:10800]: Transaction
> context has been lost due to connection errors.
> org.apache.ignite.lang.IgniteException: IGN-CLIENT-1 Transaction context has
> been lost due to connection errors. TraceId:44f02801
> at
> org.apache.ignite.internal.client.tx.DirectTxUtils.writeTx(DirectTxUtils.java:175)
> at
> org.apache.ignite.internal.client.sql.ClientSql.lambda$payloadWriter$7(ClientSql.java:467)
> at
> org.apache.ignite.internal.client.TcpClientChannel.send(TcpClientChannel.java:396)
> at
> org.apache.ignite.internal.client.TcpClientChannel.serviceAsync(TcpClientChannel.java:351)
> at
> org.apache.ignite.internal.client.ReliableChannel.serviceAsyncInternal(ReliableChannel.java:386)
> at
> org.apache.ignite.internal.client.ReliableChannel.lambda$serviceAsync$4(ReliableChannel.java:322)
> at
> java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown
> Source)
> at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown
> Source)
> at
> org.apache.ignite.internal.client.ReliableChannel.lambda$serviceAsync$5(ReliableChannel.java:322)
> at
> org.apache.ignite.internal.client.ClientFutureUtils.doWithRetryAsync(ClientFutureUtils.java:47)
> at
> org.apache.ignite.internal.client.ClientFutureUtils.doWithRetryAsync(ClientFutureUtils.java:37)
> at
> org.apache.ignite.internal.client.ReliableChannel.serviceAsync(ReliableChannel.java:320)
> at
> org.apache.ignite.internal.client.sql.ClientSql.lambda$executeAsyncInternal$3(ClientSql.java:359)
> {code}
> 1. More than one configured server address resolves to the same node (a
> misconfiguration on the user part)
> 2. We connect to the same node twice and overwrite the existing mapping in
> *ReliableChannel*: *nodeChannelsByName.put(newNode.name(), this)*
> 3. *DirectTxUtils.resolveChannel* looks up the channel by node name in
> *resolvePreferredNode*
> 4. *if (tx0.channel() != out.clientChannel())* check fails, because the new
> channel was resolved by name, even though the old one is still active
> The fix is to always use *tx.channel()*, especially because server-side
> resources are tied to the specific connection.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)