fapifta commented on code in PR #4369:
URL: https://github.com/apache/ozone/pull/4369#discussion_r1132539825


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java:
##########
@@ -802,7 +804,13 @@ public static final class Port {
      */
     public enum Name {
       STANDALONE, RATIS, REST, REPLICATION, RATIS_ADMIN, RATIS_SERVER,
-      RATIS_DATASTREAM;
+      RATIS_DATASTREAM,

Review Comment:
   Handling of ports is pretty interesting in the yaml file.
   The only call to persist the DN details object to the YAML is when the state 
machine runs the SetNodeOperationalStateCommandHandler code, as when the 
InitDatanodeState runs, the ports were not set so far.
   
   So In a datanode that was always in service since it was first added there 
are no ports in the datanode.id file.
   With that the RATIS_DATASTREAM port addition was not marked as a compat 
problem by our upgrade/downgrade tests. HTTP/HTTPS ports are added before the 
InitDatanodeState runs, hence they are saved. I believe we can not add them 
later as with the other ports.
   
   So for the RATIS_DATASTREAM this problem will appear if someone upgrades a 
cluster, changes a node's operational state (decomm/offline then recomm) and 
then downgrades.
   
   I think it is still a compatibility problem, but if we want to handle it, I 
strongly suggest to have a separate metadata layout version for that, than 
trying to come up with a better name, if we add more ports this will create an 
example and then whatever name we came up would become obsolete...
   Adding a new layoutversion is cheap, and as far as I can tell it does not 
affect performance too much either.
   
   @errose28 please chime in if adding more layotuversions have a perf impact 
and my knowledge is obsolete/wrong about this part. Also please chime in to 
review the changes if you have some 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