jiajunwang commented on a change in pull request #934: Add cache update/delete 
in customized view aggregation stage
URL: https://github.com/apache/helix/pull/934#discussion_r406603326
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/dataproviders/ResourceControllerDataProvider.java
 ##########
 @@ -257,6 +258,24 @@ public void updateExternalViews(List<ExternalView> 
externalViews) {
     }
   }
 
+  /**
+   * Update the cached customized view map
+   * @param customizedViews
+   */
+  public void updateCustomizedViews(String customizedStateType,
+      List<CustomizedView> customizedViews) {
+    for (CustomizedView cv : customizedViews) {
+      if (_customizedViewCacheMap.containsKey(customizedStateType)) {
 
 Review comment:
   nit, You can move this condition out of the loop by checking and adding key 
if not exists.
   Then in the loop, you only need to set property.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to