Evgeny Stanilovsky created IGNITE-19895:
-------------------------------------------
Summary: Sql. QueryCancel#cancel cheat checking exception hierarchy
Key: IGNITE-19895
URL: https://issues.apache.org/jira/browse/IGNITE-19895
Project: Ignite
Issue Type: Improvement
Components: sql
Affects Versions: 3.0.0-beta1
Reporter: Evgeny Stanilovsky
Check code below, casts checked exception into unchecked one thus there are
exist some places without catching such exception which can lead to
tx\resources leakage.
{code:java}
public synchronized void cancel() {
if (canceled) {
return;
}
canceled = true;
IgniteException ex = null;
// Run actions in the reverse order.
for (int i = cancelActions.size() - 1; i >= 0; i--) {
try {
Cancellable act = cancelActions.get(i);
act.cancel();
} catch (Exception e) {
if (ex == null) {
ex = new SqlException(CANCEL_OPERATION_ERR, e);
} else {
ex.addSuppressed(e);
}
}
}
if (ex != null) {
throw ex;
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)