smengcl commented on code in PR #5244:
URL: https://github.com/apache/ozone/pull/5244#discussion_r1320370450
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -1626,14 +1635,18 @@ private void findKeyInDbWithIterator(boolean recursive,
String startKey,
.getImmediateChild(entryKeyName, keyName);
boolean isFile = OzoneFSUtils.isFile(immediateChild);
if (isFile) {
- if (!isKeyDeleted(entryInDb, keyTable)) {
+ // Since putIfAbsent doesn't work as expected in case of null
+ // value, so had to explicitly check using containsKey
Review Comment:
The comment doesn't apply here either
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -1611,9 +1619,10 @@ private void findKeyInDbWithIterator(boolean recursive,
String startKey,
String entryKeyName = omKeyInfo.getKeyName();
if (recursive) {
// for recursive list all the entries
-
- if (!isKeyDeleted(entryInDb, keyTable)) {
- cacheKeyMap.putIfAbsent(entryInDb, new OzoneFileStatus(omKeyInfo,
+ // Since putIfAbsent doesn't work as expected in case of null
value,
+ // so had to explicitly check using containsKey
Review Comment:
Same as https://github.com/apache/ozone/pull/5244/files#r1320367698
--
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]