kangkaisen commented on a change in pull request #4771:
URL: https://github.com/apache/incubator-doris/pull/4771#discussion_r514922870



##########
File path: fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java
##########
@@ -826,12 +832,25 @@ private boolean deleteReplicaNotInCluster(TabletSchedCtx 
tabletCtx, boolean forc
         return false;
     }
 
+    private boolean deleteReplicaChosenByRebalancer(TabletSchedCtx tabletCtx, 
boolean force) throws SchedException {
+        Long id = rebalancer.getSrcReplicaId(tabletCtx.getTabletId());
+        if (id == -1L) {
+            return false;
+        }
+        Replica chosenReplica = tabletCtx.getTablet().getReplicaById(id);
+        if (chosenReplica != null) {
+            deleteReplicaInternal(tabletCtx, chosenReplica, "src replica of 
rebalance", force);

Review comment:
       I don't understand why we need to delete the src replica of rebalance?




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to