Skip to content

docs: Document checksum env vars for S3-compatible stores - #4506

Merged
Fokko merged 1 commit into
apache:mainfrom
goanpeca:docs-s3-compatible
Nov 30, 2026
Merged

Fokko merged 1 commit into
apache:mainfrom
goanpeca:docs-s3-compatible

Conversation

@goanpeca

@goanpeca goanpeca commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

Users of S3-compatible object stores have reported writes failing with MissingContentLength (FsspecFileIO, after botocore 1.36, #1546) and XAmzContentSHA256Mismatch (PyArrowFileIO, after a PyArrow upgrade, #2877). In #1546 the working fix was setting AWS_REQUEST_CHECKSUM_CALCULATION=when_required, and in #2877 it was setting both AWS_REQUEST_CHECKSUM_CALCULATION=when_required and AWS_RESPONSE_CHECKSUM_VALIDATION=when_required. The S3 configuration page does not mention either setting. This adds a short note and the two variables below the S3 FileIO table. Docs only, no behavior change.

Are these changes tested?

mkdocs build --strict passes and the pre-commit hooks (markdownlint, codespell, whitespace) pass on the changed file. I also created a table, appended twice and scanned it through a SqlCatalog against a live S3-compatible bucket with both PyArrowFileIO and FsspecFileIO (pyiceberg 0.12.0, pyarrow 26.0.1, botocore 1.43.117), with and without the two variables set; all four runs succeeded, which shows the settings are safe to apply. I did not have access to a store that rejects the new checksums, so the failing case is taken from the linked issues.

Are there any user-facing changes?

Documentation only.

AI usage: this change was drafted with the help of Claude Opus 5.5. I reviewed the text and ran the checks above.

@goanpeca
goanpeca marked this pull request as ready for review November 28, 2026 02:38

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this up! This is a workaround, but it's useful to have in the docs, so let's approve and merge it until we have something better.

Environment variables apply to the whole process, so you can't give one catalog different settings from another (for example AWS S3 and MinIO in the same process). Also, as far as I know, when_required still sends a CRC32 checksum on DeleteObjects, which older stores reject because they expect Content-MD5. FsspecFileIO uses DeleteObjects for deletes, so those can still fail.

The proper fix should follow the Java implementation, which exposes this as FileIO properties:

  • client.legacy-md5-plugin-enabled adds the AWS SDK's LegacyMd5Plugin, which only sends checksums when an operation requires them and uses Content-MD5 for those (apache/iceberg#12264)
  • s3.chunked-encoding-enabled turns off aws-chunked encoding, which is relevant for #2877

Would you be up for opening a follow-up issue to add these properties to PyIceberg?

@Fokko
Fokko added this pull request to the merge queue Nov 30, 2026
Merged via the queue into apache:main with commit 070695f Nov 30, 2026
20 checks passed
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