zstan commented on code in PR #1754:
URL: https://github.com/apache/ignite-3/pull/1754#discussion_r1132722584


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##########
@@ -321,13 +320,22 @@ private AsyncCursor<List<Object>> 
executeExplain(ExplainPlan plan) {
     private void onMessage(String nodeName, QueryStartRequest msg) {
         assert nodeName != null && msg != null;
 
-        DistributedQueryManager queryManager = 
queryManagerMap.computeIfAbsent(msg.queryId(), key -> {
-            BaseQueryContext ctx = createQueryContext(key, msg.schema(), 
msg.parameters());
+        CompletableFuture<?> fut = 
sqlSchemaManager.waitActualSchema(msg.lastVersion());
 
-            return new DistributedQueryManager(ctx);
-        });
+        fut.whenComplete((mgr, e) -> {
+            if (e != null) {
+                LOG.error("Schema operation error", e);

Review Comment:
   ok let`s throw exception here.



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/message/QueryStartRequest.java:
##########
@@ -54,4 +54,9 @@ public interface QueryStartRequest extends 
ExecutionContextAwareMessage {
      */
     @Marshallable
     TxAttributes txAttributes();
+
+    /**
+     * Return last schema version, just a stub, need to be removed after 
IGNITE-18733.
+     */
+    long lastVersion();

Review Comment:
   done



-- 
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]

Reply via email to