[ 
https://issues.apache.org/jira/browse/HDDS-7773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17677613#comment-17677613
 ] 

Ashish Kumar commented on HDDS-7773:
------------------------------------

Hi [~erose] , I checked for OMKeyCommitRequestWithFSO. Validation is actually 
been done for directory name conflict on key commit request. This check is 
inside OMFileRequest.getParentID which checks for the directory exist with same 
key name as below code snippet.

omDirectoryInfo = omMetadataManager.
getDirectoryTable().get(dbNodeName);
if (omDirectoryInfo != null) {
*if (reachedLastPathComponent) {*
 *throw new OMException("Can not create file: " + keyName +*
 *" as there is already directory in the given path",*
 *NOT_A_FILE);*
}



I verified this case and it actually throws this error which is similar for non 
FSO bucket.

Please confirm if this is OK?

 

 

> Check for directory name conflict on key commit request
> -------------------------------------------------------
>
>                 Key: HDDS-7773
>                 URL: https://issues.apache.org/jira/browse/HDDS-7773
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: OM
>    Affects Versions: 1.3.0
>            Reporter: Ethan Rose
>            Assignee: Ashish Kumar
>            Priority: Major
>              Labels: newbie
>
> When using an FSO bucket, key commit should fail if a directory with the same 
> name already exists at that path. Currently this check only happens on key 
> create, and key commit for non-FSO buckets. The check is missing from 
> {{OMKeyCommitRequestWithFSO#validateAndUpdateCache}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to