Skip to content
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

[Round 2] Handle copying object to the same location #84

Open
mniewrzal opened this issue Feb 15, 2022 · 2 comments
Open

[Round 2] Handle copying object to the same location #84

mniewrzal opened this issue Feb 15, 2022 · 2 comments

Comments

@mniewrzal
Copy link
Contributor

mniewrzal commented Feb 15, 2022

One way to update metadata with S3 is doing server-side copy to the same location with new metadata. We should also support this case in uplink but we don't need to do full server-side copy operation but we can use UpdateObjectMetadata on uplink side when we detect that the source location is equal to the destination location.

AC:

  • extend CopyObject method to handle coping to the same location
  • use UpdateObjectMetadata metainfo endpoint to set new metadata if source location and destination location are the same and new metadata was set
  • add test cases
@mniewrzal mniewrzal added this to the Server Side Copy milestone Feb 15, 2022
@mniewrzal
Copy link
Contributor Author

I just realized that we cannot use UpdateObjectMetadata directly as CopyObject needs to return object metadata. We have two solutions:

  • adjust satellite to handle coping to the same location and return object metadata correctly
  • just return error when user wants copy to the same location (we may do this initially and later go to first point)

@mniewrzal
Copy link
Contributor Author

We need to implement that on server side first storj/storj#4604
After that we need to revisit if we need to do something for uplink too.

@mniewrzal mniewrzal changed the title Handle coping object to the same location [Round 2] Handle coping object to the same location Mar 16, 2022
@onionjake onionjake changed the title [Round 2] Handle coping object to the same location [Round 2] Handle copying object to the same location Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant