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_r406603544
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/dataproviders/ResourceControllerDataProvider.java
##########
@@ -281,12 +300,24 @@ public void removeExternalViews(List<String>
resourceNames) {
* @param stateTypeNames
*/
- private void removeCustomizedViewTypes(Set<String> stateTypeNames) {
+ public void removeCustomizedViewTypes(Set<String> stateTypeNames) {
for (String stateType : stateTypeNames) {
_customizedViewCacheMap.remove(stateType);
}
}
+ /**
+ * Remove dead customized views for a certain state type from customized
view cache
+ * @param stateType a specific customized state type
+ * @param resourceNames the names of resources whose customized view is stale
+ */
+ public void removeCustomizedViews(String stateType, List<String>
resourceNames) {
+ for (String resourceName : resourceNames) {
+ _customizedViewCacheMap.get(stateType).getCustomizedViewCache()
Review comment:
Safer to check if the stateType exists or not.
----------------------------------------------------------------
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]