i3wangyi opened a new issue #368: Set instance_weight = 0 in config doesn't 
mean no partition assigned to the instance
URL: https://github.com/apache/helix/issues/368
 
 
   **Problem**
   The issue is raised by our internal client who sets the instance_weight = 0 
in instance/config. Instead of expecting zero partitions assigned to it, based 
on our Helix controller algorithm, there's still a good chance some partitions 
assigned to the instance.
   
   **Code of issue**
   After investigation, the issue was due to the current CardDealingAlgorithm. 
It treats instance weight as a comparator factor or preference, rather than 
respecting the weight = 0. 
   > 
https://github.com/apache/helix/blob/d5bf3ad410e0a54b1e79d9570d3e7897c0e2c947/helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/crushMapping/CardDealingAdjustmentAlgorithmV2.java
   
   **Solution** 
   There's no way to strictly follow all the weight setting of instances now. 
Because the algorithm is not designed for the purpose. But for the extreme case 
of instance weight = 0, the current workaround solution is add a simple check 
to skip the assignment of the instance.

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


With regards,
Apache Git Services

Reply via email to