You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/10/30 08:41:30 UTC

[GitHub] [incubator-doris] vagetablechicken commented on pull request #4771: [LoadBalance] make BeLoadRebalancer extends from base class Rebalancer

vagetablechicken commented on pull request #4771:
URL: https://github.com/apache/incubator-doris/pull/4771#issuecomment-719422851


   > How to choose the dest be is core for balance strategy, if the base class doesn't limit it, what's the meaning of balance base class.
   
   It's based on the specific strategies. Some strategies can delay choosing the dest be until create a clone task, but some 
   strategies can't . So we don't overemphasize this.
   The meaning of balance base class is to support delete the src replica, which the current class can't do.
   
   > In Apache Druid. https://github.com/apache/druid/blob/master/server/src/main/java/org/apache/druid/server/coordinator/BalancerStrategy.java
   > 
   > `pickSegmentToMove` will choose which tablet replica to balance, naturally, the BE for the tablet replica is the src backend.
   > 
   > `findNewSegmentHomeBalancer` will choose the dest backend.
   > 
   > I think the Apache Druid `BalancerStrategy` interface logic and naming is clear.
   
   We want to import the kudu's rebalance strategy, it'll calculate a concrete move{partition id, src be, dest be}, so it's no need to separate into `choose one tablet and src be` & `find dest be`.
   
   In Doris, rebalance has 2 steps:
   1. select tablet, and clone a replica on dest be, so the tablet is redundant
   2. delete redundant replica
   
   **The key point** is,  **step 2** will generate another TabletSchedCtx , we can't know which replica is the replica we want to delete. So we should try to get it from rebalancer.
   


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



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