smengcl commented on code in PR #6155:
URL: https://github.com/apache/ozone/pull/6155#discussion_r1486845607


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java:
##########
@@ -425,14 +424,15 @@ private DatanodeDetails initializeDatanodeDetails()
     Preconditions.checkNotNull(idFilePath);
     File idFile = new File(idFilePath);
     if (idFile.exists()) {
-      return ContainerUtils.readDatanodeDetailsFrom(idFile);
+      DatanodeDetails details = ContainerUtils.readDatanodeDetailsFrom(idFile);
+      details.setCurrentVersion(DatanodeVersion.CURRENT_VERSION);

Review Comment:
   Oh this just kept the current logic DN has, which intentionally overrides 
the current version already set in the datanode.id yaml file.
   
   I moved this line here because it was placed at a different spot during DN 
initialization and was confusing to me while I wasted 1/2 hour on debugging why 
it was already reset to the latest version. So in case anyone debugging this in 
the future won't waste that amount of time.



-- 
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: [email protected]

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