JyotinderSingh commented on code in PR #3508:
URL: https://github.com/apache/ozone/pull/3508#discussion_r903315245
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java:
##########
@@ -135,7 +141,9 @@ public OMResponse submitRequest(RpcController controller,
OMRequest request) throws ServiceException {
OMRequest validatedRequest;
try {
- validatedRequest = requestValidations.validateRequest(request);
+ OMRequest requestWithBucketId = associateBucketIdWithRequest(request);
Review Comment:
We had considered adding the bucket ID in the pre-process validators, but
the issue is that we don't have validators for all kinds of requests. We'll end
up validating bucket IDs only for requests that have upgrade validations in
place.
But I am with you on the idea of reducing the switch-case-like code
`associateBucketIdWithRequest`. We're also debating on a way to make sure that
when new request classes are added that we raise some test errors if the person
forgets to add the related logic to validate the bucket ID.
--
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]