neykov 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()) {
Yes - the security group could've been deleted externally and the local cache
still holds a reference to the group. This tries to avoid the situation
described in https://issues.apache.org/jira/browse/JCLOUDS-1307.
--
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_r121081636