errose28 commented on PR #6919:
URL: https://github.com/apache/ozone/pull/6919#issuecomment-2220939149

   @swamirishi and I had a quick call to go over the changes. We agreed that 
overall the proper way to do these validations would be something like this:
   ```
     @RequestFeatureValidator(
         minClientVersion = ClientVersion.BUCKET_LAYOUT_SUPPORT,
         processingPhase = RequestProcessingPhase.PRE_PROCESS,
         requestType = Type.CreateBucket
     )
   ```
   The current PR implementation is not good because for each client version 
added, you also need to add a new condition. For this PR however, we should 
avoid refactoring and just restore correct functionality. This means making all 
the methods work the same way. So methods like 
[disallowLookupKeyWithBucketLayout](https://github.com/apache/ozone/blob/27c1513fd92346a3e91d3705d057a07b10d7abad/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java#L663)
 in this change would just add a condition like the other methods are using:
   ```
       if (ClientVersion.fromProtoValue(req.getVersion())
           .compareTo(ClientVersion.BUCKET_LAYOUT_SUPPORT) < 0) {
   ```
   
   I'm in favor of the refactor to prevent future errors, but I think it should 
be its own change.


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