Konstantin Orlov created IGNITE-24387:
-----------------------------------------
Summary: Sql. Revise exception remapping in
ExecutionServiceImpl#executeKill
Key: IGNITE-24387
URL: https://issues.apache.org/jira/browse/IGNITE-24387
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Konstantin Orlov
Currently, there is exception remapping in
{{{}ExecutionServiceImpl#executeKill{}}}:
{code}
CompletableFuture<Iterator<InternalSqlRow>> ret = killCommandHandler.handle(cmd)
.thenApply(cancelled -> (cancelled ? APPLIED_ANSWER :
NOT_APPLIED_ANSWER).iterator())
.exceptionally(th -> {
Throwable e = ExceptionUtils.unwrapCause(th);
if (e instanceof IgniteInternalCheckedException) {
throw new IgniteInternalException(INTERNAL_ERR, "Failed to execute KILL
statement"
+ " [command=" + cmd + ", err=" + e.getMessage() + ']', e);
}
throw (e instanceof RuntimeException) ? (RuntimeException) e : new
IgniteInternalException(INTERNAL_ERR, e);
});
{code}
First, it's not clear whether we need remapping at this level at all since
other handlers don't have it. Second, if turns out we do need remapping, it
must be done via utility method
{{SqlExceptionMapperUtil#mapToPublicSqlException}} to do it consistently with
other places.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)