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

    https://github.com/apache/brooklyn-server/pull/617#discussion_r110364101
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
 ---
    @@ -674,6 +685,22 @@ private void delete(String subPath, String id, 
PersistenceExceptionHandler excep
             }
         }
     
    +    private void updatePlaneId(String planeId, PersistenceExceptionHandler 
exceptionHandler) {
    +        try {
    +            if (planeId==null) {
    +                LOG.warn("Null content for planeId");
    +            }
    +
    +            String persistedPlaneId = read(PLANE_ID_FILE_NAME);
    +            if (persistedPlaneId != null && 
!persistedPlaneId.equals(planeId)) {
    +                throw new IllegalStateException("Persisted planeId found 
(" + persistedPlaneId + ") but instance planeId is different (" + planeId + "). 
Overwriting!");
    --- End diff --
    
    Good catch - it used to overwrite but then I changed my mind. The persisted 
state is considered the "ground truth" now, so won't overwrite the planeId if 
different.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to