[ 
https://issues.apache.org/jira/browse/HDDS-1618?focusedWorklogId=254588&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-254588
 ]

ASF GitHub Bot logged work on HDDS-1618:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jun/19 19:39
            Start Date: 05/Jun/19 19:39
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on 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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 254588)
    Time Spent: 2h  (was: 1h 50m)

> Merge code for HA and Non-HA OM requests for bucket
> ---------------------------------------------------
>
>                 Key: HDDS-1618
>                 URL: https://issues.apache.org/jira/browse/HDDS-1618
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> In this Jira, we shall use the new code added in HDDS-1551 for Non-HA flow.
>  
> This Jira modifies the bucket requests only, further requests will be handled 
> in further Jira's.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to