You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/09/14 00:18:56 UTC
[GitHub] [helix] jiajunwang commented on a change in pull request #1867: Fix error partition blocks load rebalance
jiajunwang commented on a change in pull request #1867:
URL: https://github.com/apache/helix/pull/1867#discussion_r707813374
##########
File path: helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
##########
@@ -520,8 +520,12 @@ private void loadRebalance(Resource resource, Partition partition,
ResourceControllerDataProvider cache,
boolean onlyDownwardLoadBalance, StateModelDefinition stateModelDefinition, Set<String> messagesThrottled,
Map<Partition, List<Message>> resourceMessageMap) {
- if (onlyDownwardLoadBalance && isLoadBalanceDownwardStateTransition(messageToThrottle, stateModelDefinition)) {
- // Remove the message already allowed for downward state transitions.
+ // If only downward allowed: 1) any non-downward ST messages will be throttled and removed.
+ // 2) any downward ST messages will respect the throttling.
+ // If not only downward allowed, all ST messages should respect the throttling.
+ if (onlyDownwardLoadBalance && !isLoadBalanceDownwardStateTransition(messageToThrottle, stateModelDefinition)) {
Review comment:
The change makes sense now. But ideally, I think we should let the throttling class handle extra logic like "onlyDownwardLoadBalance". I propose that we refactor this when deprecating the IntermediateStateCalcStage class. Please add a TODO here if you think it makes sense.
--
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: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org