JackieTien97 commented on code in PR #11372:
URL: https://github.com/apache/iotdb/pull/11372#discussion_r1372628628
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncPlanNodeSender.java:
##########
@@ -135,26 +141,55 @@ public List<TSStatus> getFailureStatusList() {
return failureStatusList;
}
- public Future<FragInstanceDispatchResult> getResult() {
- for (Map.Entry<Integer, TSendSinglePlanNodeResp> entry :
instanceId2RespMap.entrySet()) {
- if (!entry.getValue().accepted) {
- logger.warn(
- "dispatch write failed. status: {}, code: {}, message: {}, node
{}",
- entry.getValue().status,
- TSStatusCode.representOf(entry.getValue().status.code),
- entry.getValue().message,
-
instances.get(entry.getKey()).getHostDataNode().getInternalEndPoint());
- if (entry.getValue().getStatus() == null) {
- return immediateFuture(
- new FragInstanceDispatchResult(
- RpcUtils.getStatus(
- TSStatusCode.WRITE_PROCESS_ERROR,
entry.getValue().getMessage())));
- } else {
- return immediateFuture(new
FragInstanceDispatchResult(entry.getValue().getStatus()));
- }
- }
+ public boolean needRetry() {
+ // retried FI list is not empty and data region replica number is greater
than 1
+ return !needRetryInstanceIndex.isEmpty()
Review Comment:
We surely can retry for one replica, but there is no guarantee of high
availability for one replica, so it's also ok not retrying.
--
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]