fanhualta commented on a change in pull request #3191:
URL: https://github.com/apache/iotdb/pull/3191#discussion_r644937843



##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/coordinator/Coordinator.java
##########
@@ -442,9 +445,11 @@ private TSStatus forwardToMultipleGroup(Map<PhysicalPlan, 
PartitionGroup> planGr
     }
     TSStatus status;
     if (errorCodePartitionGroups.isEmpty()) {
-      status = StatusUtils.OK;
       if (allRedirect) {
-        status = StatusUtils.getStatus(status, endPoint);
+        status = new TSStatus(TSStatusCode.NEED_REDIRECTION.getStatusCode());

Review comment:
       StatusUtils doesn't have a suitable static method. Although I can use 
`StatusUtils.getStatus(new 
TSStatus(TSStatusCode.NEED_REDIRECTION.getStatusCode()), endPoint)`, it will 
call one more deepClone(). I prefer not to do this only for save one line.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to