Open
Conversation
When requesting a list of files using the S3 protocol, a valid response will always include a Contents key in the JSON-encoded body. If this is not present, allow an exception to bubble up, instead of pretending that the bucket/prefix is empty. It is preferable to raise an exception than to pretend to have a valid response.
In some situations, inconsistent responses have been observed while reading/iterating over files using the S3 protocol. Record the HTTP status codes received during this operations as stats.
If a file's metadata is being requested and it cannot be found, this is a real error. We should allow this exception to bubble up, rather than masking it. Some backends (e.g. minio) may provide a `KeyCount` value. If this is present and zero, assume no records are present, and do not look for the `Contents` list.
1cfe71b to
0e3639a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OVH can sometimes return unexpected responses. Instead of suppressing these errors, allow them to bubble up; it is better to retry these operations at the higher level than pretend the operation was successful.
Additionally, record some metrics relating to the HTTP response codes. It is suspected that OVH issues
408HTTP responses when scaling out, and these can interfere with legitimate response handling in some situations.