adoroszlai commented on a change in pull request #3053:
URL: https://github.com/apache/ozone/pull/3053#discussion_r802928323
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
##########
@@ -1414,23 +1421,20 @@ 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 (!recursive) {
- String remainingKey = StringUtils.stripEnd(cacheKey.substring(
- startCacheKey.length()), OZONE_URI_DELIMITER);
- // For non-recursive, the remaining part of key can't have '/'
- if (remainingKey.contains(OZONE_URI_DELIMITER)) {
- continue;
- }
+ if (cacheKey.startsWith(startCacheKey)
+ && cacheKey.compareTo(startCacheKey) >= 0
+ && cacheOmKeyInfo != null) {
Review comment:
I think @sodonnel's comment about the order of conditions was not
addressed:
```suggestion
if (cacheOmKeyInfo != null
&& cacheKey.startsWith(startCacheKey)
&& cacheKey.compareTo(startCacheKey) >= 0) {
```
--
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]