Repository navigation
Backport Spark 3.5, 4.0, 4.1: Best-effort ExpireSnapshots when metadata reachable only from expired snapshots is missing - #19071
Open
mengna-lin wants to merge 2 commits into
Conversation
…ble only from expired snapshots is missing ExpireSnapshotsSparkAction fails if a manifest list or manifest reachable from an expired snapshot is already gone. The snapshots are already expired at that point, so retrying cannot make progress and orphans accumulate. Skip such missing metadata when it is reachable only from expired snapshots, log it, and return the result of the files that were deleted. Backport of apache#18477 from Spark 4.2. Generated-by: Claude Code
Adaptive execution may report several failed stages as one exception whose message does not include the missing manifest. Check the full stack trace, as the Spark 4.0 test does. Generated-by: Claude Code
This branch has not been deployed
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.
Backport of #18477 to Spark 3.5, 4.0 and 4.1. ExpireSnapshotsSparkAction fails when a manifest list or manifest reachable from an expired snapshot is already gone. The snapshots are already expired at that point, so retrying cannot make progress and orphans accumulate. Such missing metadata is now skipped and logged, and the action returns the result of the files it deleted. Missing metadata reachable from a retained snapshot still fails.
The code is identical to the Spark 4.2 change. In Spark 3.5 and 4.0, adaptive execution reports several failed stages as one exception without the failure details in its message, so the fail-fast test checks the full stack trace instead of the message.
Issue: #17715
Depends on #18477.
Test plan: TestExpireSnapshotsAction, TestDeleteReachableFilesAction and TestRemoveOrphanFilesAction pass on each version.
AI Disclosure