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 2021/01/19 11:54:05 UTC
[GitHub] [ozone] rakeshadr commented on a change in pull request #1811: HDDS-4683. ListKeys: do lookup in dir and file tables
rakeshadr commented on a change in pull request #1811:
URL: https://github.com/apache/ozone/pull/1811#discussion_r560122680
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
##########
@@ -942,17 +944,159 @@ private boolean isKeyEmpty(OmKeyInfo keyInfo) {
// snapshot of the data, so we don't need these locks at a higher level
// when we iterate.
+ boolean preserveTrailingSlash = enableFileSystemPaths &&
+ !OzoneManagerRatisUtils.isOmLayoutVersionV1();
if (enableFileSystemPaths) {
- startKey = OmUtils.normalizeKey(startKey, true);
- keyPrefix = OmUtils.normalizeKey(keyPrefix, true);
+ startKey = OmUtils.normalizeKey(startKey, preserveTrailingSlash);
+ keyPrefix = OmUtils.normalizeKey(keyPrefix, preserveTrailingSlash);
Review comment:
Thanks @linyiqun for the comments.
Yes, this logic is not required. I will remove this unnecessary `isOmLayoutVersionV1` check in the PR.
I was having a thinking that, in V1 there won't be any trailing slash in the "keyName". As we know, in existing code a trailing slash in the keyName represents a directory path in KeyTable.
----------------------------------------------------------------
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.
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