-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(services/s3): Add rename support for s3 service #4136
Conversation
It seems like CI fail in main. I will re-open this PR after the CI passes. |
Thanks for the PR. The capacity in backends is used to hint features that storage services support natively. We don't need to implement rename in backend as we can do it at operator level. For example: send rename if it's natively supported, otherwise fallback to copy and delete. |
OK, I will close this PR. Do we need to update the documentation to indicate that we do not support the rename operation for S3? |
I feel like it's clear enough the s3 doesn't support rename.
Would you like to implement the simulate logic for rename in opendal/core/src/layers/complete.rs Lines 556 to 563 in 0f316b4
|
We mark this different via full_capability and native_capability |
I add rename support for the s3 service.
Because s3 doesn't have the native rename API, so we need to copy first and delete the old file.
I also added the rollback logic when we delete the old file failed.