You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2024/07/30 13:58:00 UTC
[jira] [Created] (IGNITE-22865) NPE is swallowed in entrails of mapToPublicException
Evgeny Stanilovsky created IGNITE-22865:
-------------------------------------------
Summary: NPE is swallowed in entrails of mapToPublicException
Key: IGNITE-22865
URL: https://issues.apache.org/jira/browse/IGNITE-22865
Project: Ignite
Issue Type: Improvement
Components: general
Affects Versions: 3.0.0-beta1
Reporter: Evgeny Stanilovsky
NPE raised in internal implementation is not visible in final upper exception, internal stack trace from log (probably it`s client side problem):
{noformat}
java.util.concurrent.CompletionException: org.apache.ignite.tx.TransactionException: IGN-TX-6 TraceId:350d6455-4b5a-4ff2-860e-707b574ac72a
at org.apache.ignite.internal.tx.impl.TransactionsExceptionMapperUtil.lambda$convertToPublicFuture$0(TransactionsExceptionMapperUtil.java:51) ~[main/:?]
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) [?:?]
...
Caused by: org.apache.ignite.tx.TransactionException
at org.apache.ignite.internal.tx.impl.TransactionsExceptionMapperUtil.lambda$mapToPublicTransactionException$1(TransactionsExceptionMapperUtil.java:71) ~[main/:?]
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapCheckingResultIsPublic(IgniteExceptionMapperUtil.java:141) ~[main/:?]
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException(IgniteExceptionMapperUtil.java:137) ~[main/:?]
at org.apache.ignite.internal.tx.impl.TransactionsExceptionMapperUtil.mapToPublicTransactionException(TransactionsExceptionMapperUtil.java:71) ~[main/:?]
... 31 more
Caused by: java.lang.NullPointerException
at org.apache.ignite.internal.tx.impl.TxManagerImpl.lambda$prepareFinish$10(TxManagerImpl.java:597) ~[main/:?]
{noformat}
final (test raised, client side) exception looks like:
{noformat}
org.apache.ignite.tx.TransactionException: IGN-TX-6 TraceId:350d6455-4b5a-4ff2-860e-707b574ac72a
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
at org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
at org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
at org.apache.ignite.internal.util.ViewUtils.copyExceptionWithCauseIfPossible(ViewUtils.java:91)
at org.apache.ignite.internal.util.ViewUtils.ensurePublicException(ViewUtils.java:71)
at org.apache.ignite.internal.util.ViewUtils.sync(ViewUtils.java:54)
at org.apache.ignite.internal.client.tx.ClientTransaction.commit(ClientTransaction.java:95)
at org.apache.ignite.internal.client.tx.ClientLazyTransaction.commit(ClientLazyTransaction.java:53)
at org.apache.ignite.internal.runner.app.ItIgniteNodeRestartTest.test0(ItIgniteNodeRestartTest.java:1168)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
Caused by: org.apache.ignite.tx.TransactionException: IGN-TX-6 TraceId:350d6455-4b5a-4ff2-860e-707b574ac72a
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
at org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
at org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
{noformat}
thus no NPE mention is found here.
fast reproducer :
{noformat}
@Test
public void test01() {
startNodes(1);
IgniteClient igniteClient = IgniteClient.builder().addresses("127.0.0.1:10800").build();
igniteClient.sql().execute(null, "create table t0(id int primary key, val int)");
Transaction tx = igniteClient.transactions().begin();
ResultSet<SqlRow> res = igniteClient.sql().execute(tx, "select * from t0");
res.hasNext();
tx.commit();
}
{noformat}
and change DistributedQueryManager#enlistPartitions change enlist implementation on IgniteRelShuttle anonymous class like :
{noformat}
tx.enlist(tablePartId,
new IgniteBiTuple<>(
/*topSrvc.getByConsistentId(assignment.name())*/null,
assignment.enlistmentConsistencyToken())
);
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)