errose28 commented on a change in pull request #2015:
URL: https://github.com/apache/ozone/pull/2015#discussion_r591818114



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java
##########
@@ -278,10 +292,21 @@ private void initializeStateMachines() {
    * @throws NodeAlreadyExistsException if the node is already present
    */
   public void addNode(DatanodeDetails datanodeDetails,
-                      LayoutVersionProto layoutInfo)
-      throws NodeAlreadyExistsException {
+      LayoutVersionProto layoutInfo) throws NodeAlreadyExistsException {
     NodeStatus newNodeStatus = newNodeStatus(datanodeDetails);
     nodeStateMap.addNode(datanodeDetails, newNodeStatus, layoutInfo);
+    UUID dnID = datanodeDetails.getUuid();
+    try {
+      updateLastKnownLayoutVersion(datanodeDetails, layoutInfo);

Review comment:
       `updateLastKnownLayoutVersion`  and `updateNodeLayoutVersionState` I 
believe will handle the state transitions without an extra check.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to