devmadhuu commented on code in PR #5204:
URL: https://github.com/apache/ozone/pull/5204#discussion_r1302855328


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneListStatusHelper.java:
##########
@@ -214,11 +215,12 @@ public Collection<OzoneFileStatus> 
listStatusFSO(OmKeyArgs args,
         HeapEntry entry = heapIterator.next();
         OzoneFileStatus status = entry.getStatus(prefixKey,
             scmBlockSize, volumeName, bucketName, replication);
-        map.put(entry.key, status);
+        map.putIfAbsent(entry.key, status);
       }
     }
 
-    return map.values();
+    return map.values().stream().filter(e -> e != null).collect(

Review Comment:
   @duongkame  thanks for review. Earlier the null value (means key deleted) 
from CacheIter was not added in map and was getting lost, so we should allow 
that and when keyInfo gets null and then getStatus , we'll return null. This 
was needed to allow deleted key in cache.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to