zpinto commented on code in PR #2740:
URL: https://github.com/apache/helix/pull/2740#discussion_r1470375704


##########
helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java:
##########
@@ -127,7 +127,9 @@ public class BaseControllerDataProvider implements 
ControlContextProvider {
   private final Set<String> _enabledLiveSwapInInstanceNames = new HashSet<>();
   private final Map<String, MonitoredAbnormalResolver> 
_abnormalStateResolverMap = new HashMap<>();
   private final Set<String> _timedOutInstanceDuringMaintenance = new 
HashSet<>();
-  private Map<String, LiveInstance> _liveInstanceExcludeTimedOutForMaintenance 
= new HashMap<>();
+  private Map<String, LiveInstance> 
_allLiveInstanceExcludeTimedOutForMaintenance = new HashMap<>();
+  private Map<String, LiveInstance> 
_assignableLiveInstanceExcludeTimedOutForMaintenance =
+      new HashMap<>();

Review Comment:
   We maintain separate maps because assignable is a subset. We have many calls 
to getAssignableLiveInstances and would have to rebuild this subset Map each 
time if we don't maintain another and rebuild it only when dataRefresh happens.



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

Reply via email to