JackieTien97 commented on code in PR #11372:
URL: https://github.com/apache/iotdb/pull/11372#discussion_r1372632959
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncSendPlanNodeHandler.java:
##########
@@ -80,4 +94,15 @@ public void onError(Exception e) {
}
}
}
+
+ private boolean needRetry(Exception e) {
+ Throwable rootCause = ExceptionUtils.getRootCause(e);
+ // if the exception is SocketException and its error message is Broken
pipe, it means that the
+ // remote node may go offline
+ return isConnectionBroken(rootCause);
+ }
+
+ private boolean needRetry(TSendSinglePlanNodeResp resp) {
+ return !resp.accepted && DispatchLogHandler.needRetry(resp.status.code);
Review Comment:
I think common-module is to extract some common class used for both datanode
and confignode module, but it seems that `DispatchLogHandler.needRetry` will
only be used for DataNode, even if it is now in consensus module, it can never
be used by others because the status.code is only meaningful for DataRegion
StateMachine.
As above, DataNode will always depend on consensus module, so I think it's
still reasonable to keep it in consensus module.
--
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]