smengcl commented on code in PR #5252:
URL: https://github.com/apache/ozone/pull/5252#discussion_r1333780931
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -1228,6 +1229,12 @@ private OmKeyInfo createFakeDirIfShould(String volume,
String bucket,
LOG.debug("Fake dir {} required for {}", targetKey, cacheKey);
return createDirectoryKey(cacheValue.getCacheValue(), dirKey);
}
+ // deletedKeys may contain deleted entry while iterating cache iterator
+ // To avoid race condition of flush of cache while iterating
+ // table iterator.
+ if (!exists) {
+ deletedKeys.add(cacheKey);
+ }
}
Review Comment:
Alright. Let's merge this PR now for a fix. We could improve this further in
#5093 .
--
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]