You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/02/08 10:55:07 UTC
[GitHub] [ozone] sodonnel commented on a change in pull request #3053: HDDS-6278 Improve memory profile for listStatus API call.
sodonnel commented on a change in pull request #3053:
URL: https://github.com/apache/ozone/pull/3053#discussion_r801504177
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
##########
@@ -1414,9 +1421,9 @@ private void listStatusFindKeyInTableCache(
}
OmKeyInfo cacheOmKeyInfo = entry.getValue().getCacheValue();
// cacheOmKeyInfo is null if an entry is deleted in cache
- if (cacheOmKeyInfo != null) {
- if (cacheKey.startsWith(startCacheKey) &&
- cacheKey.compareTo(startCacheKey) >= 0) {
+ if (cacheKey.startsWith(startCacheKey) &&
+ cacheKey.compareTo(startCacheKey) >= 0) {
+ if (cacheOmKeyInfo != null) {
Review comment:
Any reason to move this line (`if (cacheOmKeyInfo != null)`) below the prefix and compare check? This means we would be comparing keys with deleted keys and then throwing the deleted ones away. We could avoid the compare operations by discarding the deleted ones first.
--
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