Maksim Zhuravkov created IGNITE-23637:
-----------------------------------------

             Summary: Exception wrapping in SqlQueryProcessor executeQuery 
causes transaction errors
                 Key: IGNITE-23637
                 URL: https://issues.apache.org/jira/browse/IGNITE-23637
             Project: Ignite
          Issue Type: Bug
            Reporter: Maksim Zhuravkov


Adding the following handle block in SqlQueryProcessor executeQuery causes 
transaction errors in ItSqlMultiStatementTxTest (all test cases become 
unsuccessful):

{code:java}
return queryExecutor.executeQuery(
                    ...
            ).handle((r,t) -> {
                if (t != null) {
                    throw new 
CompletionException(SqlExceptionMapperUtil.mapToPublicSqlException(t));
                } else {
                    return r;
                }
            });
{code}

This code also causes issues:


{code:java}
return queryExecutor.executeQuery(
                  ...
            ).handle((r,t) -> {
                if (t != null) {
                    throw new 
CompletionException(SqlExceptionMapperUtil.mapToPublicSqlException(ExceptionUtils.getCause(t)));
                } else {
                    return r;
                }
            });
{code}

But the following code does not cause the problem:

{code:java}
return queryExecutor.executeQuery(
                    ...
            ).handle((r,t) -> {
                if (t != null) {
                    throw new CompletionException(t);
                } else {
                    return r;
                }
            });
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to