[core] Do not count inherited index entries in the strict-mode partition check - #10218
Merged
JingsongLi merged 6 commits intoOct 5, 2026
Merged
Conversation
hasOverlappedIndexPartition read the whole cumulative index manifest of the checked snapshot, so a DV-only OVERWRITE by another user that changed index files only in one partition was also flagged for every other partition whose index entries were merely inherited from earlier snapshots, aborting unrelated commits under strict mode. Mirror the data check, which only reads the snapshot's delta: diff the snapshot's index manifest against the previous snapshot's and consider only entries added or replaced by that commit. The manifest name fast exit is kept. Assisted-by: GLM-5.3
LuciferYang
marked this pull request as draft
October 2, 2026 04:03
LuciferYang
marked this pull request as ready for review
October 2, 2026 05:16
LuciferYang
marked this pull request as draft
October 2, 2026 07:04
LuciferYang
marked this pull request as ready for review
October 2, 2026 10:05
Contributor
Author
|
@JingsongLi Could you help review this one: with deletion vectors, a rescale fails strict mode whenever another partition's compaction lands, the same kind of false positive as #8996. Details and a test that fails on master are in the description. |
Contributor
|
+1 |
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.
Purpose
On a primary-key table with deletion vectors, a job that pins
commit.last-safe-snapshotwhen it starts, such as a rescale of pt=1, fails with "Giving up committing as commit.strict-mode.enabled is true" as soon as a streaming job writing pt=2 commits a compaction, provided pt=1 has any DV, even though no snapshot after the job start changed pt=1.Every snapshot's index manifest lists the DVs of all partitions.
StrictModeChecker.hasOverlappedIndexPartitionread the whole manifest, so DVs that pt=1 only inherited counted as a change to pt=1. This is the same kind of false positive as #8996.The check now compares the index manifest with the previous snapshot's, restricted to the partitions being committed, and a partition counts only if the snapshot added, replaced or removed an index entry in it. Removals count because the OVERWRITE that
rollbackToAsLatestcommits can drop a DV without any data-file change. A missing index manifest is read as empty.Tests
In
TableCommitTest:testStrictModeIgnoresDeletionVectorsInheritedByCompaction: on a primary-key table with deletion vectors, an update gives pt=1 a DV, the job start is recorded, and an update of pt=2 commits a COMPACT snapshot. A commit to pt=1 pinned to the job start now succeeds; on master it is rejected.testStrictModeDetectsIndexRemovalWithoutDataDelta(with and without an index manifest on the rollback target): a rollback that only removes pt=1's DV has no data-file delta, and a pinned commit to pt=1 is still rejected while one to pt=2 succeeds.API and Format
No.
Documentation
No.