Skip to content

S3FileSystem Cloudflare R2 workaround limits maximum filesize upload for default AWS S3 #41506

Description

@justinvyu

Describe the enhancement requested

This workaround for Cloudflare R2 storage sets the multipart upload size to a non-configurable 10MB, which results in a maximum filesize of 98GB for uploading. This is a limitation that should not spill over to the more common AWS S3 and Minio S3 options.

// Upload size per part. While AWS and Minio support different sizes for each
// part (only requiring a minimum of 5MB), Cloudflare R2 requires that every
// part be exactly equal (except for the last part). We set this to 10 MB, so
// that in combination with the maximum number of parts of 10,000, this gives a
// file limit of 100k MB (or about 98 GB).
// (see https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
// (for rational, see: https://github.com/apache/arrow/issues/34363)
static constexpr int64_t kPartUploadSize = 10 * 1024 * 1024;

One possible solution: Make this configurable via some environment variable or API, and require Cloudflare R2 users to set it.

Component(s)

C++

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions