GitHub user narendly opened a pull request: https://github.com/apache/helix/pull/277
[HELIX-770] HELIX: Fix a possible NPE in loadBalance in IntermediateS⦠â¦tateCalcStage In isLoadBalanceDownwardForAllReplicas() in IntermediateStateCalcStage, statePriorityMap was throwing a NPE because the partition contained a replica in ERROR state, and the map did not have an entry for it. To amend the issue, Venice added the ERROR state in the state model with a priority, and Helix added checks to prevent NPEs. Changelist: 1. Add containsKey checks in isLoadBalanceDownwardForAllReplicas() 2. Make the Controller correctly log all partitions with ERROR state replicas 3. Add HelixDefinedStates in statePriorityList if not already added You can merge this pull request into a Git repository by running: $ git pull https://github.com/narendly/helix master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/helix/pull/277.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #277 ---- commit 7bc70e24abd89611580098670ed02b2736ccfac0 Author: Hunter Lee <hulee@...> Date: 2018-10-29T23:50:41Z [HELIX-770] HELIX: Fix a possible NPE in loadBalance in IntermediateStateCalcStage In isLoadBalanceDownwardForAllReplicas() in IntermediateStateCalcStage, statePriorityMap was throwing a NPE because the partition contained a replica in ERROR state, and the map did not have an entry for it. To amend the issue, Venice added the ERROR state in the state model with a priority, and Helix added checks to prevent NPEs. Changelist: 1. Add containsKey checks in isLoadBalanceDownwardForAllReplicas() 2. Make the Controller correctly log all partitions with ERROR state replicas 3. Add HelixDefinedStates in statePriorityList if not already added ---- ---