Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/617#discussion_r110710330
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java ---
    @@ -467,6 +469,15 @@ protected void instantiateMementos() throws 
IOException {
             memento = persistenceStoreAccess.loadMemento(mementoRawData, 
rebindContext.lookup(), exceptionHandler);
         }
     
    +    protected void initPlaneId() {
    +        String persistedPlaneId = mementoRawData.getPlaneId();
    +        if (persistedPlaneId == null) {
    +            
((LocalManagementContext)managementContext).generateManagementPlaneId();
    --- End diff --
    
    On balance, I agree with this code. But it feels like we're relying on null 
too much. We don't distinguish between persisted state that has no entities 
etc, and an unpopulated persisted state directory - that makes it hard to write 
code that asserts/warns it's in the state we expect.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to