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

fix trailing checksum #3186

Merged
merged 1 commit into from
Nov 12, 2024
Merged

fix trailing checksum #3186

merged 1 commit into from
Nov 12, 2024

Conversation

sbiscigl
Copy link
Contributor

Issue #, if available:
issues/3132

Description of changes:
There was a nasty bit of undefined behavior in the aws-chunked logic for curl. The original implementation assumed that curl would always provide us with a chunk larger than 8kb to per ReadFunc callback. That is simply not true, and it will cause requests where curl calls readfunc with less than 8kb to fail consistently.This buffers the input stream and outputs to curl valid sized chunks, specifically 64kb chunks as S3 specifies as their preference

The chunk size must be at least 8 KB. We recommend a chunk size of a least 64 KB for better performance. This chunk size applies to all chunks except the last one. The last chunk you send can be smaller than 8 KB. If your payload is small and can fit into one chunk, then it can be smaller than the 8 KB.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch 2 times, most recently from 9922c19 to 4f32699 Compare November 11, 2024 16:56
@sbiscigl sbiscigl changed the title wip - fix trainling checksum fix trailing checksum Nov 11, 2024
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch 2 times, most recently from c6d5639 to 826b3a9 Compare November 11, 2024 17:00
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch 2 times, most recently from c82a6af to d712b17 Compare November 11, 2024 19:06
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch from e267b78 to c0f0337 Compare November 11, 2024 20:41
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch 2 times, most recently from e4b72f0 to b18e244 Compare November 11, 2024 21:35
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch 2 times, most recently from c2e65f3 to e18fdbe Compare November 11, 2024 22:31
@sbiscigl sbiscigl force-pushed the fix-trailing-checksum branch from e18fdbe to e6320e0 Compare November 11, 2024 23:11
@sbiscigl sbiscigl marked this pull request as ready for review November 12, 2024 14:25
@sbiscigl sbiscigl merged commit 061f67b into main Nov 12, 2024
5 checks passed
@sbiscigl sbiscigl deleted the fix-trailing-checksum branch November 12, 2024 14:25
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.

Upload fails with InvalidChunkSizeError for large objects
3 participants