You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2022/06/27 14:35:39 UTC
[GitHub] [brooklyn-server] ahgittin commented on a diff in pull request #1325: Fix persistence deletion race
ahgittin commented on code in PR #1325:
URL: https://github.com/apache/brooklyn-server/pull/1325#discussion_r907462662
##########
core/src/main/java/org/apache/brooklyn/core/entity/Entities.java:
##########
@@ -948,10 +955,22 @@ public static ManagementContext startManagement(Application app, ManagementConte
}
}
+ premanageRecursively((ManagementContextInternal)mgmt, app);
+
mgmt.getEntityManager().manage(app);
return mgmt;
}
+ private static void premanageRecursively(ManagementContextInternal mgmt, Entity e) {
+ if (Entities.isUnmanagingOrNoLongerManaged(e) || Entities.isManagedActive(e)) {
+ log.warn("Skipping premanagement for "+e+", as it has some form of known management");
+ // skip for active and unmanaged entities
+ return;
+ }
+ mgmt.prePreManage(e);
Review Comment:
this method is called `premanageRecursively` so i think the answer is yes. this is only needed for legacy code (tests), which does want the recursive behaviour.
--
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.
To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org