arp7 commented on a change in pull request #1361: URL: https://github.com/apache/hadoop-ozone/pull/1361#discussion_r485021796
########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java ########## @@ -158,6 +159,23 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, validateBucketAndVolume(omMetadataManager, volumeName, bucketName); + // Check by the time we commit this file, is there any directory + // created if then fail it. This is being done for correctness. + + // For now we are taking this approach similar to local file creation. + // TODO: In future this can be revisited to come up with an advanced + // approach. + + + if (ozoneManager.getEnableFileSystemPaths()) { + if (checkDirectoryAlreadyExists(volumeName, bucketName, keyName, Review comment: Does the directory name have a trailing `/` in RocksDB? If so, do we need to append it to keyname before calling `checkDirectoryAlreadyExists`? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org