feat(transaction): add OverwriteAction with CoW delete support#2185
Open
glitchy wants to merge 1 commit intoapache:mainfrom
Open
feat(transaction): add OverwriteAction with CoW delete support#2185glitchy wants to merge 1 commit intoapache:mainfrom
glitchy wants to merge 1 commit intoapache:mainfrom
Conversation
e8860f6 to
0b3158b
Compare
7 tasks
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.
Which issue does this PR close?
Part of #2186
This is the first in a series of PRs working toward full Copy-on-Write (CoW) and Merge-on-Read (MoR) support. CoW comes first because it provides the foundation that MoR eventually depends on. This PR delivers complete CoW overwrite semantics. Subsequent PRs will add
RowDeltaActionfor writing position/equality delete files (MoR write path), scan-side delete file reconciliation (MoR read path), and compaction.Adds
OverwriteAction, a newTransactionActionthat produces snapshots withOperation::Overwritesemantics. It adds new data files and optionally removes existing data files by rewriting affected manifests with entries marked asManifestStatus::Deleted.Supporting changes:
ManifestWriter::add_deleted_entry()--the existingadd_entry()unconditionally sets status toAdded; there was no way to write deleted entriesSnapshotProducer::snapshot_id()getter--needed to stamp the snapshot ID on deleted manifest entriesFastAppendAction::existing_manifest()now preserves delete-only manifests so that deleted entries produced byOverwriteActionsurvive subsequent appendsAre these changes tested?
5 new unit tests in
transaction::overwrite::tests:test_empty_data_overwrite_action--error on empty file listtest_overwrite_snapshot_properties--custom properties flow to snapshot summarytest_overwrite_incompatible_partition_value--rejects mismatched partition typestest_overwrite_basic--verifies updates, requirements, operation type, manifest structure, sequence numberstest_overwrite_with_deleted_files--end-to-end: append via catalog, overwrite with deletes via catalog, verify original file isDeletedand replacement isAdded