bharatviswa504 commented on a change in pull request #877: HDDS-1618. Merge
code for HA and Non-HA OM write type requests for bucket
URL: https://github.com/apache/hadoop/pull/877#discussion_r290901928
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
##########
@@ -99,7 +106,36 @@ public OMResponse submitRequest(RpcController controller,
return submitRequestToRatis(request);
}
} else {
- return submitRequestDirectlyToOM(request);
+ try {
+ OMClientRequest omClientRequest =
+ OzoneManagerRatisUtils.createClientRequest(request);
+ if (omClientRequest != null) {
+ request = omClientRequest.preExecute(ozoneManager);
+ } else {
+ // Still work is ongoing, so for some of the requests still
+ // following older approach.
+ return submitRequestDirectlyToOM(request);
+ }
+ } catch (IOException ex) {
+ // As some of the preExecute returns error. So handle here.
+ return createErrorResponse(request, ex);
+ }
+ OMClientRequest omClientRequest = OzoneManagerRatisUtils
+ .createClientRequest(request);
+
Review comment:
This is because in preExecute, if the request is modified, we don't set it
back.
I am planning to change this behavior in Volume Jira implementation.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]