Conversation
Introduce /COLUMN_DELETION_METADATA/<tableNameWithType> next to /SEGMENT_LINEAGE. No ledger reads or writes yet. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Introduce SchemaDiff plus a versioned table-scoped deletion ledger with CAS writes, active-name checks, and the dirty-segment predicate. Public schema update still rejects missing columns. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Cover SchemaDiff cases required by apache#18808, ledger codec and format-version refusal, CAS/restart recovery, and the dirty segment predicate including RefreshSegmentTask.time false positives. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Presence of a ledger-named column or an OPEN_STRUCT child overrides ctime and CRC markers. RefreshSegmentTask.time is still not clean. An empty live set is not COMPLETE. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Cover ctime override, OPEN_STRUCT children, CRC-marker override, and that an empty live set leaves the ledger RECLAIMING. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Keep primary-key equality exact-name like Schema.isBackwardCompatibleWith. Rename isNoOp to isStructurallyUnchanged. Create the ledger znode on first write and refuse to overwrite a newer stored format, including expectedVersion -1. Treat equal ctime as dirty. Reject a second active ledger row for the same column. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Cover exact-name primary-key case changes, a second active row for the same column, create-then-CAS writes, and refusal to clobber a newer-format znode with expectedVersion -1. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
expectedVersion -1 on an existing current-format znode now sets the Stat version from the preceding get, not Helix match-any. A concurrent newer format write loses the CAS instead of being clobbered. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Cover missing-znode version mismatch, a successful observed-version update, and a lost CAS when the znode version moves between get and set. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
An existing znode is not overwritten when expectedVersion is -1. A stale PREPARED retry therefore cannot restore a row that reconcile already aborted. Updates must pass the version from the last read. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Assert write(-1) leaves an existing PREPARED row unchanged, a version bump still loses an explicit CAS, and deleting a PK column while the PK list is unchanged is not treated as a PK-list edit. Co-authored-by: deepinsight coder <Vamsi-klu@users.noreply.github.com>
Contributor
Author
|
cc @sourabh-27 @xiangfu0 ledger-only, no public delete API |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19532 +/- ##
============================================
- Coverage 67.78% 67.73% -0.05%
Complexity 1450 1450
============================================
Files 3490 3498 +8
Lines 225009 225469 +460
Branches 35523 35614 +91
============================================
+ Hits 152515 152725 +210
- Misses 60449 60690 +241
- Partials 12045 12054 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Vamsi-klu
marked this pull request as ready for review
September 12, 2026 01:23
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.
PR flow
Flow of column deletion ledger: create entry, add, persist, reconcile, check dirty segments via CRC.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Diff evidence
Ledger-only foundation for first-class column deletion (#18808). This is not a public delete API and does not replace #18831.
What this adds
SchemaDiffinpinot-spi: dedicated helper for deleted / added / retained-incompatible columns. Not an overload ofSchema.isBackwardCompatibleWith. Primary-key equality stays exact-name.ignoreCaseusesLocale.ROOTfor column-name matching only./COLUMN_DELETION_METADATA/<tableNameWithType>.PREPARED→PENDING/RECLAIMING→COMPLETE/FAILED). Newer stored formats are refused.write(..., -1)is create-only; updates CAS the version from the last read.RefreshSegmentTask.timeis not a success marker. Equalctimeis dirty. An empty live set is notCOMPLETE. Callers may pass a physical-presence override. This PR does not read segment files.What this does not add
allowColumnDeletionreclaimDeletedColumnsOnReloadBaseDefaultColumnHandlerREMOVE expansionTests
Unit tests in
pinot-spi(SchemaDiffTest,SchemaTest) andpinot-common(ColumnDeletionMetadataTest,ColumnDeletionMetadataAccessHelperTest,ColumnDeletionDirtySegmentPredicateTest).Compatibility
Additive only. New ZK prefix is unused until a later writer exists. Mixed-version controllers that cannot parse a newer ledger format refuse to overwrite it.
Labels:
feature,release-notes(new publicSchemaDifftype inpinot-spi).