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

Clients should handle multipart completion request failure #209

Open
zachmullen opened this issue Mar 4, 2021 · 2 comments
Open

Clients should handle multipart completion request failure #209

zachmullen opened this issue Mar 4, 2021 · 2 comments

Comments

@zachmullen
Copy link
Contributor

https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html

Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. Because a request could fail after the initial 200 OK response has been sent, it is important that you check the response body to determine whether the request succeeded.

Our TS client (and possibly other clients, I haven't checked) do not handle this failure mode. Further down on the linked page, it shows an example of what a HTTP 200 failure response looks like:

HTTP/1.1 200 OK
x-amz-id-2: Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==
x-amz-request-id: 656c76696e6727732072657175657374
Date:  Mon, 1 Nov 2010 20:34:56 GMT
Connection: close
Server: AmazonS3

<?xml version="1.0" encoding="UTF-8"?>

<Error>
  <Code>InternalError</Code>
  <Message>We encountered an internal error. Please try again.</Message>
  <RequestId>656c76696e6727732072657175657374</RequestId>
  <HostId>Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==</HostId>
</Error>
@zachmullen
Copy link
Contributor Author

Also, I have no idea whether minio has identical behavior.

@brianhelba
Copy link
Contributor

We should also investigate the behavior when CompleteMultipartUpload is called repeatedly (which could mistakenly happen due to retries).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants