Skip to content

Conversation

vadmeste
Copy link
Member

@vadmeste vadmeste commented May 27, 2025

An S3 server can respond with 200 OK with an S3 Error response, for long standing calls,
such as S3 listing when a prefix contains a lot of entries.

This commit will support this use case. This can only be enabled with specific calls,
that returns XML as a success response, so this will not be confused with GetObject
returning a valid document that contains an S3 error response.

Supported calls: CompleteMultipartUpload and DeleteMultiObjects.

@vadmeste vadmeste force-pushed the add-error-tag branch 5 times, most recently from 5323b55 to 5a11e3a Compare May 27, 2025 14:10
@vadmeste vadmeste requested a review from harshavardhana May 28, 2025 12:32
Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that returns 200 OK via some mock handler? Otherwise we have currently no way to test this code.

I would also keep the peek reader to have its own tests, move it into pkg/ folder as a package

An S3 server can respond with 200 OK with an S3 Error response, for long
standing calls, such as S3 listing when a prefix contains a lot of
entries.

This commit will support this use case. This can only be enabled with
specific calls, that returns XML as a success response, so this will not
be confused with GetObject returning a valid document that contains an
S3 error response.

Supported calls: CompleteMultipartUpload and DeleteMultiObjects.
@vadmeste
Copy link
Member Author

@harshavardhana I wrote those tests.

I also added more fixes to the original code to make those tests passing. minio-go was not retrying SlowDownRead and SlowDownWrite, it is only recognizing SlowDown error code.

@harshavardhana
Copy link
Member

I also added more fixes to the original code to make those tests passing. minio-go was not retrying SlowDownRead and SlowDownWrite, it is only recognizing SlowDown error code.

ah we forgot to change support for differentiation here, even AWS SDKs might not retry, perhaps we should change it back and add another field to the error type?

@harshavardhana
Copy link
Member

I also added more fixes to the original code to make those tests passing. minio-go was not retrying SlowDownRead and SlowDownWrite, it is only recognizing SlowDown error code.

ah we forgot to change support for differentiation here, even AWS SDKs might not retry, perhaps we should change it back and add another field to the error type?

Talking about server side.

@harshavardhana
Copy link
Member

can you fix the build @vadmeste ?

Co-authored-by: Harshavardhana <harsha@minio.io>
@harshavardhana harshavardhana merged commit 7a9dff0 into minio:master Jun 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants