BUAAserein commented on code in PR #13001:
URL: https://github.com/apache/iotdb/pull/13001#discussion_r1687562195


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java:
##########
@@ -434,8 +452,13 @@ private void dispatchLocally(final FragmentInstance 
instance)
                 : readExecutor.execute(groupId, instance);
         if (!readResult.isAccepted()) {
           LOGGER.warn(readResult.getMessage());
-          throw new FragmentInstanceDispatchException(
-              RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, 
readResult.getMessage()));
+          if (readResult.isNeedRetry()) {
+            throw new FragmentInstanceDispatchException(
+                RpcUtils.getStatus(TSStatusCode.DISPATCH_ERROR, 
readResult.getMessage()));
+          } else {
+            throw new FragmentInstanceDispatchException(
+                RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, 
readResult.getMessage()));
+          }

Review Comment:
   Dispatch will determine whether to retry in the outer layer



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