fapifta commented on pull request #3155:
URL: https://github.com/apache/ozone/pull/3155#issuecomment-1058222320


   Thank you @adoroszlai for the review.
   I have committed the suggestion for the final variables, thank you for that, 
I missed to make them final there.
   
   This change to enums are part of an effort to unify compatibility and 
version related code. We had a couple of discussions about what is needed to 
easily address compatibility problems that we can handle during communication 
between different versions components. After we decided how to address these 
issues, we formed a suggestion to unify how protocol messages will transfers 
version number, and after a longer debate we agreed that having a version 
defined for each component similarly to metadata layout is beneficial for us, 
and as that is there already for a while, it seems rational to unify all 
versions behind enums similarly as it is done with the metadata layout.
   
   This PR is the first step of a couple of other steps prerequisite for 
integrating compatibility related code for the recently merged features which 
will be the first users.
   
   The biggest advantage to use an enum encapsulating the version number and a 
description is that we have a chance to document the value in the same place 
where we define the constant, and we can use the description in logging along 
with the name of the enum constant easily. I admit it is not really about using 
enums' type safety or polymorphism.


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