mgao0 commented on a change in pull request #1187:
URL: https://github.com/apache/helix/pull/1187#discussion_r466648798



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/CustomizedViewAggregationStage.java
##########
@@ -107,8 +114,11 @@ public void execute(final ClusterEvent event) throws 
Exception {
           }
           // add/update customized-views from zk and cache
           if (updatedCustomizedViews.size() > 0) {
-            dataAccessor.setChildren(keys, updatedCustomizedViews);
+            boolean[] success = dataAccessor.setChildren(keys, 
updatedCustomizedViews);
             cache.updateCustomizedViews(stateType, updatedCustomizedViews);
+            asyncReportLatency(cache.getAsyncTasksThreadPool(), 
getOrCreateMonitor(event),
+                new ArrayList<>(updatedCustomizedViews), 
curCustomizedViewsCopy,

Review comment:
       Discussed offline, current curCustomizedViewCopy is a whole copy of the 
entire set of customized views. We do not need that, so I will only save the 
curCustomizedView of what's changed, so we won't need to be concerned about 
memory usage. So curCustomizedViewCopy will be initialized as an empty map, and 
when we compare the customized views, if it's changed, we put the old 
customized view into this map, for later use to find out which partition state 
changed.




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

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