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

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

                Author: ASF GitHub Bot
            Created on: 11/Jun/19 17:32
            Start Date: 11/Jun/19 17:32
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #884: 
HDDS-1620. Implement Volume Write Requests to use Cache and DoubleBuffer.
URL: https://github.com/apache/hadoop/pull/884#discussion_r292576303
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/volume/OMVolumeCreateResponse.java
 ##########
 @@ -47,15 +49,19 @@ public OMVolumeCreateResponse(OmVolumeArgs omVolumeArgs,
   public void addToDBBatch(OMMetadataManager omMetadataManager,
       BatchOperation batchOperation) throws IOException {
 
-    String dbVolumeKey =
-        omMetadataManager.getVolumeKey(omVolumeArgs.getVolume());
-    String dbUserKey =
-        omMetadataManager.getUserKey(omVolumeArgs.getOwnerName());
+    // For OmResponse with failure, this should do nothing. This method is
+    // not called in failure scenario in OM code.
+    if (getOMResponse().getStatus() == OzoneManagerProtocolProtos.Status.OK) {
+      String dbVolumeKey =
+          omMetadataManager.getVolumeKey(omVolumeArgs.getVolume());
+      String dbUserKey =
+          omMetadataManager.getUserKey(omVolumeArgs.getOwnerName());
 
-    omMetadataManager.getVolumeTable().putWithBatch(batchOperation, 
dbVolumeKey,
-        omVolumeArgs);
-    omMetadataManager.getUserTable().putWithBatch(batchOperation, dbUserKey,
-        volumeList);
+      omMetadataManager.getVolumeTable().putWithBatch(batchOperation,
+          dbVolumeKey, omVolumeArgs);
+      omMetadataManager.getUserTable().putWithBatch(batchOperation, dbUserKey,
+          volumeList);
+    }
   }
 
   public VolumeList getVolumeList() {
 
 Review comment:
   Removed.
 
----------------------------------------------------------------
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: 257946)
    Time Spent: 6h 40m  (was: 6.5h)

> Implement Volume Write Requests to use Cache and DoubleBuffer
> -------------------------------------------------------------
>
>                 Key: HDDS-1620
>                 URL: https://issues.apache.org/jira/browse/HDDS-1620
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: Ozone Manager
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> Implement Volume write requests to use OM Cache, double buffer. 
> In this Jira will add the changes to implement volume operations, and 
> HA/Non-HA will have a different code path, but once all requests are 
> implemented will have a single code path.



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