algairim commented on a change in pull request #1184: URL: https://github.com/apache/brooklyn-server/pull/1184#discussion_r669527429
########## File path: core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java ########## @@ -1072,6 +1081,26 @@ private ManagementPlaneSyncRecord loadManagementPlaneSyncRecordInternal(boolean throw new IllegalStateException(message, lastException); } + private ManagementPlaneSyncRecord updateManagementPlaneSyncRecordWithLocalKnowledge(ManagementPlaneSyncRecord result) { + // Report this node's most recent state, and detect AWOL nodes + ManagementNodeSyncRecord me = BasicManagementNodeSyncRecord.builder() + .from(result.getManagementNodes().get(ownNodeId), true) + .from(createManagementNodeSyncRecord(false), true) + .build(); + Iterable<ManagementNodeSyncRecord> allNodes = result.getManagementNodes().values(); + if (me.getRemoteTimestamp()!=null) + allNodes = Iterables.transform(allNodes, new MarkAwolNodes(me)); + Builder builder = ManagementPlaneSyncRecordImpl.builder() + .masterNodeId(result.getMasterNodeId()) + .nodes(allNodes); + builder.node(me); + if (getTransitionTargetNodeState() == ManagementNodeState.MASTER) { + builder.masterNodeId(ownNodeId); + } + result = builder.build(); + return result; Review comment: Remove the `return` condition from the method signature. It is not required. -- 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-unsubscr...@brooklyn.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org