jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <notificati...@github.com>
Subject Re: [jclouds/jclouds] [JCLOUDS-1306] Fix SG cache invalidation when deleting (#1110)
Date Fri, 09 Jun 2017 09:12:45 GMT
andreaturli commented on this pull request.



> @@ -191,14 +191,20 @@ public boolean removeSecurityGroup(String id) {
          return false;
       }
 
-      if (sgApi.get().get(groupId) == null) {
-         return false;
+      // Would be nice to delete the group and invalidate the cache atomically - i.e. use
a mutex.
+      // Will make sure that a create operation in parallel won't see inconsistent state.
+
+      boolean deleted = sgApi.get().delete(groupId);
+
+      for (SecurityGroupInRegion cachedSg : groupCreator.asMap().values()) {

ok thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1110#discussion_r121082234
Mime
View raw message