-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Blocks upload: Don't do cleanUp when meta.json fails to upload. #3626
Blocks upload: Don't do cleanUp when meta.json fails to upload. #3626
Conversation
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Failed |
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well. 👍
This is a very interesting case. Thank you for your work on this! AIUI pragmatically this means that the meta.json file would have to appear within 30 seconds because we do a |
Under certain conditions, when upload of
meta.json
file fails, it will actually appear on the bucket eventually. S3 has been observed to behave like this when it reports 503 "SlowDown" error. Currentlyblock.Upload
callscleanUp
to delete partially uploaded block, but ifmeta.json
can still appear in the bucket later, this actually creates invalid block – withmeta.json
file only, but no index or chunks.Changes
This PR removes call to
cleanUp
if onlymeta.json
upload fails. Ifmeta.json
has really failed, this will result into partial block (withoutmeta.json
) and be eventually removed by other components, or upload will be retried by Shipper. But at least it won't generate corrupted blocks.For more details, see discussion at https://cloud-native.slack.com/archives/CL25937SP/p1608021430416900.
Verification
Added unit test.