JackieTien97 commented on code in PR #19033:
URL: https://github.com/apache/iotdb/pull/19033#discussion_r4396318437


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java:
##########
@@ -179,7 +179,21 @@ interface ISourceHandleSupplier<T> {
   public void start() {
     try {
       startInternal();
-    } catch (RuntimeException | Error e) {
+    } catch (RuntimeException e) {
+      finishAnalysisAttemptForCurrentState();
+      if (stateMachine.getState().isDone()) {
+        // The query has already reached a terminal state (e.g. killed by 
others), and the status
+        // recorded by the state machine is the authoritative result. An 
exception thrown here is
+        // usually caused by resources being released concurrently, so it must 
not override it.
+        LOGGER.warn(
+            DataNodeQueryMessages.IGNORE_EXCEPTION_AFTER_QUERY_DONE,
+            context.getQueryId(),
+            stateMachine.getState(),
+            e);

Review Comment:
   no need to print full stack of exception? just print e.getMessage();



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