korlov42 commented on code in PR #7010:
URL: https://github.com/apache/ignite-3/pull/7010#discussion_r2541815859
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/fsm/CursorInitializationPhaseHandler.java:
##########
@@ -46,7 +47,13 @@ public Result handle(Query query) {
CompletableFuture<Void> awaitFuture =
query.executor.executePlan(context, plan)
.thenCompose(dataCursor -> {
- AsyncSqlCursor<InternalSqlRow> cursor =
query.executor.createAndSaveSqlCursor(query, dataCursor);
+ AsyncSqlCursor<InternalSqlRow> cursor;
+ try {
+ cursor = query.executor.createAndSaveSqlCursor(query,
dataCursor);
Review Comment:
I don't think we need an extra handling here. By the time we get
`QueryCancelledException` from `createAndSaveSqlCursor` inside
`QueryExecutor.executeChildBatch` the operation is completed and now we are
wrapping chain of stateless data cursors with SQL cursor decorators. So, if
exception is thrown, then an entire future returned from `executeChildBatch`
should complete exceptionally, and this exception is processed within
`MultiStatementHandler`:
```
fut.whenComplete((cursor, ex) -> {
if (ex != null) {
scriptTxContext.onError(ex);
cursorFuture.completeExceptionally(ex);
cancelAll(ex);
return;
}
```
Am I missing something?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]