[core] Preserve partial-update sequence-group deletion state - #10296
Closed
leaves12138 wants to merge 1 commit into
Closed
leaves12138 wants to merge 1 commit into
leaves12138 wants to merge 1 commit into
Conversation
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 retraction or an update to another group can clear that state. If an earlier insert was seen, the merged result becomesINSERTagain, and lookup compaction can emit an update 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-group deletion 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 quality checks were enabled.Regression coverage includes:
DELETE/UPDATE_BEFORE, unrelated updates, stale controlling-group updates, and valid reinsertion.DELETE, not an update pair.Focused red/green command:
Final verification command:
The full repository and Flink version matrix were not run locally.