junkaixue commented on code in PR #2974: URL: https://github.com/apache/helix/pull/2974#discussion_r1874575665
########## helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java: ########## @@ -865,7 +865,9 @@ private void computeIntermediateMap(PartitionStateMap intermediateStateMap, if (!value.getToState().equals(HelixDefinedState.DROPPED.name())) { intermediateStateMap.setState(entry.getKey(), value.getTgtName(), value.getToState()); } else { - intermediateStateMap.getStateMap().get(entry.getKey()).remove(value.getTgtName()); + if (intermediateStateMap.getStateMap().containsKey(entry.getKey())) { Review Comment: why not use else if instead of inner if statement. -- 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-unsubscr...@helix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org