feat: enforce trusted Iceberg metadata pointers#4
Draft
hkwi wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TableMetadataAdmissiongateway, with a persistence guard against bare metadata locations.Motivation
This patch is stacked on apache#5060 and supersedes the narrower design in #3.
Unlike #3, this does not limit integrity protection to encrypted tables or lazily backfill trust during an ordinary read. Plaintext and encrypted metadata use the same trusted-pointer invariant, and every metadata-location mutation must atomically replace the complete pointer.
Design
TableMetadataAdmissionowns the trusted-pointer format and all metadata transition checks:noneorpresent)Normal commits and notifications reject legacy entities without a complete pointer. The existing explicit
registerTable(..., overwrite=true)operation is the only attestation ceremony for such tables, and it still requires any stored UUID to match. Loads and cleanup tasks never infer or repair trust from object storage.For purge, table operations retain the exact entity revision used for the successful metadata verification. The drop uses that revision as its compare-and-set precondition, so a concurrent metadata pointer change prevents both the drop and cleanup scheduling.
Compatibility notes
Tests
./gradlew format compileAll./gradlew :polaris-core:check./gradlew :polaris-runtime-service:check -x :polaris-runtime-service:intTestThe runtime
intTesttask was not run.AI assistance
AI assistance was used to analyze, implement, and test this change.