Skip to content

fix: route 5 GiB uploads through multipart upload#42

Merged
panagpapad merged 2 commits into
mainfrom
fix/mongo-exporter-multipart-at-5gb
Jun 24, 2026
Merged

fix: route 5 GiB uploads through multipart upload#42
panagpapad merged 2 commits into
mainfrom
fix/mongo-exporter-multipart-at-5gb

Conversation

@panagpapad

@panagpapad panagpapad commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
  • The size check used >, causing files exactly 5 GiB to be uploaded via PutObject, which exceeds S3's single-request upload limit.
  • Change the threshold check to >= so 5 GiB exports use multipart upload instead.
  • Extract GiB and S3_PUT_OBJECT_MAX_SIZE into named constants.

@panagpapad panagpapad requested a review from a team as a code owner June 23, 2026 16:11
@panagpapad panagpapad force-pushed the fix/mongo-exporter-multipart-at-5gb branch from a40cde9 to 213b621 Compare June 23, 2026 16:13
* The size check used `>`, causing files exactly 5 GiB to be uploaded via `PutObject`, which exceeds S3's single-request upload limit.
* Change the threshold check to `>=` so 5 GiB exports use multipart upload instead.
* Extract `GiB` and `S3_PUT_OBJECT_MAX_SIZE` into named constants.
@panagpapad panagpapad force-pushed the fix/mongo-exporter-multipart-at-5gb branch from 213b621 to 79e1dae Compare June 23, 2026 16:19
@panagpapad panagpapad force-pushed the fix/mongo-exporter-multipart-at-5gb branch from 443e7b7 to 61c316f Compare June 23, 2026 19:03
Single read() calls returned OS-sized chunks (~2 MiB) instead of filling
the 1 GiB part buffer, producing thousands of parts below S3's 5 MiB
minimum and causing EntityTooSmall on CompleteMultipartUpload.
@panagpapad panagpapad force-pushed the fix/mongo-exporter-multipart-at-5gb branch from 61c316f to 0d2e501 Compare June 23, 2026 19:10
@panagpapad panagpapad merged commit 537e585 into main Jun 24, 2026
6 checks passed
@panagpapad panagpapad deleted the fix/mongo-exporter-multipart-at-5gb branch June 24, 2026 08:16
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