[ 
https://issues.apache.org/jira/browse/HADOOP-19350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chung En Lee resolved HADOOP-19350.
-----------------------------------
    Resolution: Not A Bug

> ITestS3AContractCreate#testOverwrite*EmptyDirectory fail on ozone when create 
> performance enabled
> -------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-19350
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19350
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/s3, test
>    Affects Versions: 3.4.1
>            Reporter: Chung En Lee
>            Priority: Minor
>
> See [https://github.com/apache/hadoop/pull/6168#issuecomment-1756082091] 
> They also fail with Apache Ozone. See 
> https://issues.apache.org/jira/browse/HDDS-11663
> Both of these tests expect to throw a FileAlreadyExistsException, while 
> creating a file that overwrites an existing directory.
> The following is a step-by-step description of the test.
>  # mkdir test/testOverwriteNonEmptyDirectory/         // existing directory
>  # get test/testOverwriteNonEmptyDirector                // start to create 
> file to overwrite directory
>  # check the file status of test/testOverwriteNonEmptyDirector
>  ** If it throws FileNotFound then goes to step 4
>  ** check if it is a directory then throw FileAlreadyExistsException          
>     // expect to throw 
> [here|https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java#L2196-L2199]
>  ** check if the overwrite is false then throw FileAlreadyExistsException    
>  # put test/testOverwriteNonEmptyDirector
> However, in step 3 it actually goes to the first check, and put a new object.
> Because S3a is expecting:
> Get test/testOverwriteNonEmptyDirector    // does not exist
> Get test/testOverwriteNonEmptyDirector/   // exists
> And it will still throw an exception but not FileAlreadyExistsException.
>  
> How to fix:
> Maybe we also get the path test test/testOverwriteNonEmptyDirector/ and check 
> if the directory exists.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to