bharatviswa504 commented on a change in pull request #1196:
URL: https://github.com/apache/hadoop-ozone/pull/1196#discussion_r455968767
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileRequest.java
##########
@@ -79,15 +79,11 @@ public static OMPathInfo verifyFilesInPath(
String dbDirKeyName = omMetadataManager.getOzoneDirKey(volumeName,
bucketName, pathName);
- if (omMetadataManager.getKeyTable().isExist(dbKeyName)) {
- // Found a file in the given path.
- // Check if this is actual file or a file in the given path
- if (dbKeyName.equals(fileNameFromDetails)) {
- result = OMDirectoryResult.FILE_EXISTS;
- } else {
- result = OMDirectoryResult.FILE_EXISTS_IN_GIVENPATH;
- }
- } else if (omMetadataManager.getKeyTable().isExist(dbDirKeyName)) {
+ // Check first for dir. This is to handle leading "/" in path, which
Review comment:
Yes. This change was required, when we are allowing leading / in
keyName. I will revert the change
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]