Repository navigation
fix: prune tombstones using merge snapshot - #27173
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep self-review at 9641014: no blocking code-level issue found.
The production invariant is closed. Tombstone merge still reads the latest catalog entry, but now only prunes a committed target drop when dropTS <= mergeStartTS. This matches TAE delete-version visibility (a committed delete is visible when End <= txn start); uncommitted, rolled-back, and post-snapshot drops are retained. A later merge can reclaim the deferred tombstone. Missing catalog targets keep the existing conservative-GC behavior.
Concurrency/lifecycle review found no new ownership, wait, goroutine, or accumulation risk. The hot path keeps the existing catalog lookup and HasDropCommitted check; the only added work is one TS comparison for committed drops plus one immutable GetStartTS read per block.
Local evidence:
- focused regression: pass, count=10;
- focused race regression: pass, count=100;
- restoring the old HasDropCommitted-only predicate makes the regression fail at CreatedObjs (expected 1, got 0);
- full pkg/vm/engine/tae/db/test: pass in 94.128s;
- focused go vet: pass;
- diff/whitespace checks: clean.
Non-blocking coverage suggestion: add an explicit dropTS == mergeStartTS case. The current integration test covers > and <; I verified that mutating LE to LT still passes it. LE is correct, but the equality boundary is common because a new local txn starts from MaxCommittedTS and deserves a direct regression.
GitHub does not allow this account to approve its own PR, so this is recorded as a COMMENT review. Remote CI was still running and was not used as a substitute for the code review.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Follow-up for current head 8ebea28: the head change during review is a pure merge of origin/main (parents 9641014 and 09ecd8e). The two PR-owned files are byte-for-byte unchanged from the reviewed parent, and the three merged main commits do not touch the TAE merge path. I re-ran the focused regression with -race -count=10 on 8ebea28; it passes. The prior no-blocker conclusion and equality-boundary test suggestion therefore remain unchanged.
## Summary Fixes matrixorigin#26804. Tombstone merge now prunes a target row only when the target object was committed as dropped at the merge transaction snapshot. A later object drop is retained for a subsequent merge, preventing concurrent data-object generations from losing tombstones. Adds a deterministic regression covering both snapshot cases. ## Validation - Focused test and full `pkg/vm/engine/tae/db/test` pass. - Focused race stress (`-race -count=100`) passes. - Full owning-package race test passes. - Build and vet pass. - On machine 55, the pre-fix baseline regression fails and the fixed version passes. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary Fixes matrixorigin#26804. Tombstone merge now prunes a target row only when the target object was committed as dropped at the merge transaction snapshot. A later object drop is retained for a subsequent merge, preventing concurrent data-object generations from losing tombstones. Adds a deterministic regression covering both snapshot cases. ## Validation - Focused test and full `pkg/vm/engine/tae/db/test` pass. - Focused race stress (`-race -count=100`) passes. - Full owning-package race test passes. - Build and vet pass. - On machine 55, the pre-fix baseline regression fails and the fixed version passes. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary Fixes matrixorigin#26804. Tombstone merge now prunes a target row only when the target object was committed as dropped at the merge transaction snapshot. A later object drop is retained for a subsequent merge, preventing concurrent data-object generations from losing tombstones. Adds a deterministic regression covering both snapshot cases. ## Validation - Focused test and full `pkg/vm/engine/tae/db/test` pass. - Focused race stress (`-race -count=100`) passes. - Full owning-package race test passes. - Build and vet pass. - On machine 55, the pre-fix baseline regression fails and the fixed version passes. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
Fixes #26804.
Tombstone merge now prunes a target row only when the target object was committed as dropped at the merge transaction snapshot. A later object drop is retained for a subsequent merge, preventing concurrent data-object generations from losing tombstones.
Adds a deterministic regression covering both snapshot cases.
Validation
pkg/vm/engine/tae/db/testpass.-race -count=100) passes.