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

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

                Author: ASF GitHub Bot
            Created on: 11/Jun/19 03:08
            Start Date: 11/Jun/19 03:08
    Worklog Time Spent: 10m 
      Work Description: hanishakoneru 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_r292230965
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
 ##########
 @@ -451,6 +456,21 @@ private boolean startsWith(byte[] firstArray, byte[] 
secondArray) {
   public boolean isVolumeEmpty(String volume) throws IOException {
     String volumePrefix = getVolumeKey(volume + OM_KEY_PREFIX);
 
+    if (bucketTable instanceof TypedTable) {
+      // First check in bucket table cache.
+      Iterator<Map.Entry<CacheKey<String>, CacheValue<OmBucketInfo>>> iterator 
=
+          ((TypedTable< String, OmBucketInfo>) bucketTable).cacheIterator();
+      while (iterator.hasNext()) {
+        Map.Entry< CacheKey< String >, CacheValue< OmBucketInfo > > entry =
+            iterator.next();
+        String key = entry.getKey().getKey();
+        OmBucketInfo omBucketInfo = entry.getValue().getValue();
+        if (key.startsWith(volumePrefix) && omBucketInfo != null) {
 
 Review comment:
   Can you please add a comment here as to why we require to check that 
omBucketInfo is not null (to make sure that the entry is not for a delete 
bucket request).
 
----------------------------------------------------------------
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: 257352)

> 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: 3h 10m
>  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