Evgeny Stanilovsky created IGNITE-17419:
-------------------------------------------
Summary: Uninformative exception raised if execution processed
with outdated transaction.
Key: IGNITE-17419
URL: https://issues.apache.org/jira/browse/IGNITE-17419
Project: Ignite
Issue Type: Improvement
Components: thin client
Affects Versions: 3.0.0-alpha5
Reporter: Evgeny Stanilovsky
Code like below throws uninformative exception:
{noformat}
java.util.concurrent.CompletionException:
org.apache.ignite.client.IgniteClientException: IGN-CMN-1 Trace
ID:642ffaf4-a907-4a0e-baf5-eb9d1ef70d47 IGN-CMN-1 Trace
ID:b35d2c8f-98df-4a0c-b43a-c4c94744294b Failed to find resource with id: 1
at
java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
at
java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
Caused by: org.apache.ignite.client.IgniteClientException: IGN-CMN-1 Trace
ID:642ffaf4-a907-4a0e-baf5-eb9d1ef70d47 IGN-CMN-1 Trace
ID:b35d2c8f-98df-4a0c-b43a-c4c94744294b Failed to find resource with id: 1
at
org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:313)
at
org.apache.ignite.internal.client.TcpClientChannel.onMessage(TcpClientChannel.java:152)
{noformat}
{code:java}
tx = client().transactions().begin();
ses.execute(tx, "INSERT INTO testExecuteDdlDml VALUES (?, ?)",
200, "hello " + Integer.MAX_VALUE);
tx.commit();
// Outdated tx.
Transaction tx0 = tx;
assertThrows(CompletionException.class, () -> {
ses.executeAsync(tx0, "INSERT INTO testExecuteDdlDml VALUES (?, ?)",
Integer.MAX_VALUE, "hello " + Integer.MAX_VALUE).join();
});
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)