Repository navigation
[4.2-dev] fix(disttae): transfer tombstones only for deleted objects - #27880
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Completed a fresh-data 50M black-box validation on backport head |
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
Reviewed the exact PR head, diff, transfer lifecycle, and all existing PR/source reviews and comments; no code findings.
What type of PR is this?
Which issue(s) this PR fixes:
issue #27878
Backport of #27879 to
4.2-dev.What this PR does / why we need it:
CN tombstone transfer must move a RowID only when its source object belongs to the exact set deleted in the current
(start, end]window. Absence from the persisted-object index is not evidence of deletion because live appendable objects are intentionally absent. Violating this invariant can make large indexed DML fail commit-time RowID cardinality validation and roll back.This backport:
(start, end];from.Next();The three commits were cherry-picked cleanly from #27879. Their stable patch IDs match the source commits exactly; no 4.2-specific production-code adaptation was needed.
Validation
Deterministic tests and build
TestPartitionState_TransferObjectWindowBoundariesTestDeletedObjectFilterUsesExactTransferWindowTestTransferBatchLimitTestTransferFlowBatchesAcrossObjectBlocksTestTransferFlowStagesOnlyObjectsDeletedInWindow./pkg/vm/engine/disttae/logtailreplay./pkg/vm/engine/disttaemake build-with-prebuilt-nativepassed withlibmo.dylibbuilt from the4.2-devworktree's own source.Real 50M black-box QA on this backport head
Validated commit
235ad329ce37a4dbc3c3da1847ebe7a7855f0164with a newly builtmo-service, a fresh data directory, and an isolated SQL port. The database was populated from scratch; no prior data was reused.QA procedure:
col3, and a unique indexedcol4.UPDATE write_100m SET col3 = col3 + 1so the update rewrites every base row and its secondary-index entry while background merges can replace source objects.Observed results:
50,000,000idrange:1..50,000,000col3range:2..2sum(id) = sum(col4) = 1,250,000,025,000,000id = col4 AND col3 = 2:0col3 = 2:50,000,000col3 = 1:050,000,00050,000,000, key range1..50,000,0001,8192,8388608,33554432, and50000000returned the exact expected rows after restart.TRANSFER-ROWIDS-ERROR, panic, or fatal log was emitted.No BVT is added: the public failure requires large data plus background-merge timing, while the violated object-lifecycle and exact-window contracts are covered deterministically by the focused tests. The real 50M procedure above is the scale/regression acceptance evidence for this backport.