[core] Preserve partial-update sequence-group deletion state - #10300
Open
qingwei727 wants to merge 1 commit into
Open
qingwei727 wants to merge 1 commit into
qingwei727 wants to merge 1 commit into
Conversation
Port apache#10296 at b43e36137f2b5b3f51aaf7290c6f96d67744675a. Keep the production fix and deletion/restoration documentation unchanged. Reduce regression coverage to six methods and ten parameterized invocations: remove five-group permutations and retain empty/reordered projections. Co-Authored-By: 仟弋 <yejunhao.yjh@alibaba-inc.com> Co-Authored-By: Codex <noreply@openai.com> AI-Model: unknown AI-Contributed/Feature: 11/11 AI-Contributed/UT: 223/223
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
Fix whole-row deletion state being lost while merging partial updates.
PartialUpdateMergeFunction.add()currently clearscurrentDeleteRowfor every input. After a configured sequence group deletes a row, a subsequent retractionor an update to another group can clear that state. If an earlier insert was seen, the merged result becomes
INSERTagain, and lookup compaction can emit anupdate changelog instead of a delete.
Preserve the deletion state across inputs and initialize it in
reset(). Clear it only for a normal non-sequence-group update or an acceptedINSERT/UPDATE_AFTERto a group configured inpartial-update.remove-record-on-sequence-group. The existing newer-or-equal group-version comparison still applies.Retractions, unrelated groups, and older or all-null ordering fields must not revive a deleted row.
Also preserve
partial-update.remove-record-on-deleteacross a followingUPDATE_BEFORE, while allowing a subsequent insert. Document the sequence-groupdeletion and restoration semantics. No on-disk format changes are introduced.
Tests
Followed a red/green TDD workflow with synthetic records:
INSERT, while the 55 existing cases passed.fast-build, so the normal lifecycle qualitychecks were enabled.
Regression coverage includes:
DELETE/UPDATE_BEFORE, unrelated updates, stale controlling-group updates, and valid reinsertion.DELETE, not an updatepair.
Focused red/green command: