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

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

                Author: ASF GitHub Bot
            Created on: 26/Mar/19 21:55
            Start Date: 26/Mar/19 21:55
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #626: 
HDDS-1262. In OM HA OpenKey and initiateMultipartUpload call Should happen only 
leader OM.
URL: https://github.com/apache/hadoop/pull/626#discussion_r269330114
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -2474,6 +2524,28 @@ public String getOzoneBucketMapping(String s3BucketName)
     }
   }
 
+
+  @Override
+  public OmMultipartInfo applyInitiateMultipartUpload(OmKeyArgs keyArgs,
+      String multipartUploadID) throws IOException {
+    OmMultipartInfo multipartInfo;
+    metrics.incNumInitiateMultipartUploads();
+    try {
+      multipartInfo = keyManager.applyInitiateMultipartUpload(keyArgs,
+          multipartUploadID);
+      AUDIT.logWriteSuccess(buildAuditMessageForSuccess(
+          OMAction.INITIATE_MULTIPART_UPLOAD, (keyArgs == null) ? null :
+              keyArgs.toAuditMap()));
+    } catch (IOException ex) {
+      AUDIT.logWriteFailure(buildAuditMessageForFailure(
+          OMAction.INITIATE_MULTIPART_UPLOAD,
+          (keyArgs == null) ? null : keyArgs.toAuditMap(), ex));
+      metrics.incNumInitiateMultipartUploadFails();
 
 Review comment:
   IN HA case initiateMultipartUpload will not be called, so it will not be 
updated twice.
   In startTransaction, we are not calling initiateMultipartUpload. (It 
generates a random id as multipartuploadID). This is the reason for not having 
new type here.
 
----------------------------------------------------------------
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: 218958)
    Time Spent: 3.5h  (was: 3h 20m)

> In OM HA OpenKey call Should happen only leader OM
> --------------------------------------------------
>
>                 Key: HDDS-1262
>                 URL: https://issues.apache.org/jira/browse/HDDS-1262
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> In OM HA, currently, when openKey is called, in applyTransaction() on all OM 
> nodes, we make a call to SCM and write the allocateBlock information into OM 
> DB and also clientID will be generated by each OM node.
>  
> The proposed approach is:
> 1. In startTransaction, call openKey and the response returned should be used 
> to create a new OmRequest object and used in setting the transaction context. 
> And also modify the ozoneManager and KeymanagerImpl to handle the code with 
> and without ratis.
>  
> This Jira also implements HDDS-1319. 



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