You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devmadhuu (via GitHub)" <gi...@apache.org> on 2023/09/08 05:50:05 UTC
[GitHub] [ozone] devmadhuu commented on a diff in pull request #5244: HDDS-9233. listStatus() API is not correctly iterating cache.
devmadhuu commented on code in PR #5244:
URL: https://github.com/apache/ozone/pull/5244#discussion_r1319393052
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -1426,7 +1426,9 @@ private void listStatusFindKeyInTableCache(
}
OzoneFileStatus fileStatus = new OzoneFileStatus(
cacheOmKeyInfo, scmBlockSize, !OzoneFSUtils.isFile(cacheKey));
- cacheKeyMap.put(cacheKey, fileStatus);
+ cacheKeyMap.putIfAbsent(cacheKey, fileStatus);
+ } else if (cacheOmKeyInfo == null) {
Review Comment:
@sadanand48 As discussed, I am keeping all deleted key entries in cacheKeyMap and not going to filter based on startKey due to unpredictable nature of cache flush race condition, and because of filtering deleted entries from cache based on startKey, `org.apache.hadoop.ozone.om.TestKeyManagerImpl#testListStatusWithTableCacheRecursive` were failing pagination test consistently.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org