Repository navigation
[Protocol] Clarifying Metadata Cleanup to Preserve JSON Commits at Checkpoint Versions - #5355
Merged
zachschuermann merged 3 commits intoOct 22, 2025
Conversation
| `cutOffCheckpoint` checkpoint. Also delete all the [log compaction files](#log-compaction-files) having | ||
| `cutOffCheckpoint` checkpoint. The JSON commit file at the `cutOffCheckpoint` version must be preserved because checkpoints do not preserve [commit provenance information](#commit-provenance-information) (e.g., `commitInfo` actions), which may be required by table features such as [In-Commit Timestamps](#in-commit-timestamps). | ||
| Also delete all the [log compaction files](#log-compaction-files) having | ||
| startVersion <= `cutOffCheckpoint`'s version. |
Collaborator
There was a problem hiding this comment.
nit: move this line up to the one above it
scottsand-db
approved these changes
Oct 17, 2025
Contributor
|
@DrakeLin do you know if current Spark implementation follows the new spec? |
Collaborator
Author
Both Delta Spark and Kernel Java implicitly require this: |
Collaborator
|
... and AFAIK, both have always required it |
Collaborator
Author
|
@scovich Anything missing before we can merge? |
scovich
approved these changes
Oct 22, 2025
scovich
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Both delta-spark and delta-kernel have always required this, so it's really just clarifying a constraint that always existed.
Contributor
|
@DrakeLin, @scottsand-db @scovich Although Spark Delta preserve the JSON commit at checkpoint version, it doesn't validate it exists, like Kernel does: The Spark PR was never merged: #3080 |
01001101CK
pushed a commit
to 01001101CK/delta
that referenced
this pull request
Nov 17, 2025
…eckpoint Versions (delta-io#5355) ## Description <!-- - Describe what this PR changes. - Describe why we need the change. If this PR resolves an issue be sure to include "Resolves #XXX" to correctly link and close the issue upon merge. --> This PR updates the Delta Protocol specification to clarify that JSON commit files at checkpoint versions must be preserved during metadata cleanup. This ensures that commitInfo actions remain accessible for table features such as In-Commit Timestamps (ICT). The current Delta Protocol's metadata cleanup section could be interpreted to allow deletion of JSON commit files when a checkpoint exists at the same version. However, this creates a critical problem for ICT-enabled tables: 1. Checkpoints don't preserve commitInfo actions - The protocol explicitly states that checkpoints must not preserve commit provenance information 2. ICT writers need previous commit timestamps - ICT-enabled tables need to read the previous commit's inCommitTimestamp to ensure monotonicity Thus, if a checkpoint exists without its corresponding JSON commit file, the commitInfo is lost, causing writes to the table to fail. ## How was this patch tested? <!-- If tests were added, say they were added here. Please make sure to test the changes thoroughly including negative and positive cases if possible. If the changes were tested in any way other than unit tests, please clarify how you tested step by step (ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future). If the changes were not tested, please explain why. --> ## Does this PR introduce _any_ user-facing changes? <!-- If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible. If possible, please also clarify if this is a user-facing change compared to the released Delta Lake versions or within the unreleased branches such as master. If no, write 'No'. -->
1 of 5 tasks
huashi-st
pushed a commit
to huashi-st/delta
that referenced
this pull request
Apr 24, 2026
…eckpoint Versions (delta-io#5355) ## Description <!-- - Describe what this PR changes. - Describe why we need the change. If this PR resolves an issue be sure to include "Resolves #XXX" to correctly link and close the issue upon merge. --> This PR updates the Delta Protocol specification to clarify that JSON commit files at checkpoint versions must be preserved during metadata cleanup. This ensures that commitInfo actions remain accessible for table features such as In-Commit Timestamps (ICT). The current Delta Protocol's metadata cleanup section could be interpreted to allow deletion of JSON commit files when a checkpoint exists at the same version. However, this creates a critical problem for ICT-enabled tables: 1. Checkpoints don't preserve commitInfo actions - The protocol explicitly states that checkpoints must not preserve commit provenance information 2. ICT writers need previous commit timestamps - ICT-enabled tables need to read the previous commit's inCommitTimestamp to ensure monotonicity Thus, if a checkpoint exists without its corresponding JSON commit file, the commitInfo is lost, causing writes to the table to fail. ## How was this patch tested? <!-- If tests were added, say they were added here. Please make sure to test the changes thoroughly including negative and positive cases if possible. If the changes were tested in any way other than unit tests, please clarify how you tested step by step (ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future). If the changes were not tested, please explain why. --> ## Does this PR introduce _any_ user-facing changes? <!-- If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible. If possible, please also clarify if this is a user-facing change compared to the released Delta Lake versions or within the unreleased branches such as master. If no, write 'No'. -->
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.
Description
This PR updates the Delta Protocol specification to clarify that JSON commit files at checkpoint versions must be preserved during metadata cleanup. This ensures that commitInfo actions remain accessible for table features such as In-Commit Timestamps (ICT).
The current Delta Protocol's metadata cleanup section could be interpreted to allow deletion of JSON commit files when a checkpoint exists at the same version. However, this creates a critical problem for ICT-enabled tables:
Thus, if a checkpoint exists without its corresponding JSON commit file, the commitInfo is lost, causing writes to the table to fail.
How was this patch tested?
Does this PR introduce any user-facing changes?