risdenk commented on a change in pull request #205: KNOX-2134 - Add caching to 
ZookeeperRemoteAliasService
URL: https://github.com/apache/knox/pull/205#discussion_r349759292
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/ZookeeperRemoteAliasService.java
 ##########
 @@ -438,6 +457,9 @@ public void childEvent(final 
RemoteConfigurationRegistryClient client,
           client.removeEntryListener(path);
           if (paths.length > 1) {
             localAliasService.removeAliasForCluster(paths[0], paths[1]);
+            if (aliasCache.containsKey(paths[0])) {
+              aliasCache.get(paths[0]).remove(paths[1]);
+            }
 
 Review comment:
   This could be another helper method for alias cache. Remove from aliasCache. 
Not sure if there is a possible race condition here between the check and 
remove.

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

Reply via email to