You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Siyao Meng (Jira)" <ji...@apache.org> on 2026/10/08 00:21:00 UTC
[jira] [Created] (HDDS-16779) FSO rename of a file to itself should be a no-op
Siyao Meng created HDDS-16779:
---------------------------------
Summary: 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
{{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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org