rich7420 opened a new pull request, #12200:
URL: https://github.com/apache/ozone/pull/12200

   ## What changes were proposed in this pull request?
   
   S3 RenameObject renames an object within a bucket atomically and without 
moving data. This adds the OM and client side of it for FILE_SYSTEM_OPTIMIZED 
buckets. The S3 Gateway handler follows in HDDS-17895.
   
   - `RenameKeyRequest` gets `objectRename` and `expectedToKeyGeneration`. OM 
dispatches a request with `objectRename` to the new 
`OMObjectRenameRequestWithFSO`, and rejects it for other bucket layouts.
   - It follows the rules of PutObject and DeleteObject rather than those of 
the file system rename: the source must be a file, an existing destination file 
is replaced (its blocks go to the deleted table and its quota is released), and 
missing parent directories of the destination are created. The source ETag and 
the generations of the source and the destination can be checked as part of the 
rename.
   - The file system rename behaves as before. `OMKeyRenameRequestWithFSO` only 
gains a hook for its two phases and a shared lookup of the source.
   - `ClientProtocol.renameObject` sends the request and requires the new 
`OzoneManagerVersion.S3_RENAME_OBJECT`.
   
   With S3 authentication, removing the source is authorized as `DeleteObject`, 
and creating the destination as the action of the request.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17896
   
   ## How was this patch tested?
   
   Added tests in TestOMObjectRenameRequestWithFSO, 
TestOMKeyRenameResponseWithFSO, TestOzoneManagerRatisRequest, TestRpcClient, 
TestObjectStoreWithFSO and TestOMObjectRenameUpgrade.
   Fork CI: https://github.com/rich7420/ozone/actions/runs/46401854096
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to