zpinto commented on code in PR #2772:
URL: https://github.com/apache/helix/pull/2772#discussion_r1552139195
##########
helix-core/src/main/java/org/apache/helix/controller/stages/MessageGenerationPhase.java:
##########
@@ -146,6 +148,16 @@ private void generateMessage(final Resource resource,
final BaseControllerDataPr
}
}
+ // Look through the current state map and add DROPPED message if the
instance is not in the
+ // resourceStateMap. This instance may not have had been dropped by the
rebalance strategy.
+ // This check is required to ensure that the instances removed from the
ideal state stateMap
+ // are properly dropped.
+ for (String instance : currentStateMap.keySet()) {
+ if (!instanceStateMap.containsKey(instance)) {
+ instanceStateMap.put(instance, HelixDefinedState.DROPPED.name());
Review Comment:
This map isn't persisted back, it is copied and temporarily used:
```
Map<String, String> instanceStateMap =
new HashMap<>(resourcesStateMap.getInstanceStateMap(resourceName,
partition));
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]