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

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

                Author: ASF GitHub Bot
            Created on: 07/Oct/19 21:51
            Start Date: 07/Oct/19 21:51
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1559: 
HDDS-1737. Add Volume check in KeyManager and File Operations.
URL: https://github.com/apache/hadoop/pull/1559#discussion_r332252751
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyDeleteRequest.java
 ##########
 @@ -117,12 +121,19 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
       acquiredLock = omMetadataManager.getLock().acquireLock(BUCKET_LOCK,
           volumeName, bucketName);
 
-      // Not doing bucket/volume checks here. In this way we can avoid db
-      // checks for them.
-      // TODO: Once we have volume/bucket full cache, we can add
-      // them back, as these checks will be inexpensive at that time.
-      OmKeyInfo omKeyInfo = omMetadataManager.getKeyTable().get(objectKey);
+      // Check volume exist.
+      if (omMetadataManager.getVolumeTable().isExist(volumeName)) {
 
 Review comment:
   Here it should be if 
(!omMetadataManager.getVolumeTable().isExist(volumeName)) right?
   
   And also we should pass omMetadataManagerImpl.getVolumeKey/getBucketKey, not 
direct volumeName/bucketName.
   
   As here if it does not exist, we should return error?
   
   ```
     /**
      * Check if a given key exists in Metadata store.
      * (Optimization to save on data deserialization)
      * A lock on the key / bucket needs to be acquired before invoking this 
API.
      * @param key metadata key
      * @return true if the metadata store contains a key.
      * @throws IOException on Failure
      */
     boolean isExist(KEY key) throws IOException;
   ```
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 324637)
    Time Spent: 1.5h  (was: 1h 20m)

> Add Volume check in KeyManager and File Operations
> --------------------------------------------------
>
>                 Key: HDDS-1737
>                 URL: https://issues.apache.org/jira/browse/HDDS-1737
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: YiSheng Lien
>            Priority: Major
>              Labels: newbie, pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> This is to address a TODO to check volume checks when performing Key/File 
> operations.
>  
> // TODO: Not checking volume exist here, once we have full cache we can
> // add volume exist check also.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to