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

Attila Doroszlai updated HDDS-16779:
------------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> FSO rename of a file to itself should be a no-op
> ------------------------------------------------
>
>                 Key: HDDS-16779
>                 URL: https://issues.apache.org/jira/browse/HDDS-16779
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Manager
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> {{OMKeyRenameRequestWithFSO}} still carries a TODO for a rename whose source 
> and destination are the same existing file ("Discuss do we need to throw 
> exception for file as well"), so the behaviour for that case was never 
> settled.
> Proposal: the request succeeds and changes nothing. That is what the Hadoop 
> FileSystem specification requires for {{rename}} (a file renamed to itself is 
> a no-op and the result is true), what HDFS does for {{FileSystem.rename}}, 
> and what the {{o3fs}} and {{ofs}} clients already return when both paths are 
> equal. Renaming a directory to itself keeps failing with 
> {{KEY_ALREADY_EXISTS}}. The specification leaves that result open.
> Add unit tests for both cases.



--
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