Skip to content

fix(tae): return tombstone bitmap allocation errors - #33245

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/33243-committed-tombstone-alloc
Nov 25, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/33243-committed-tombstone-alloc

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Closes #33243

What this PR does / why we need it:

Committed tombstone matching marked candidate RowIDs through an infallible NULL bitmap update. When bitmap growth failed, the allocator error became a panic. This change adds a fallible containers.MarkNull helper and uses it for in-memory and persisted committed tombstone matches, preserving existing miss, visibility, and write-write conflict behavior.

The transaction candidate boundary now returns unexpected scan errors before copying partial filtering results back. On success or WW, copyback reports bitmap allocation failures to the caller. This is needed so a committed-match allocation error cannot be hidden or converted into a panic during copyback. The small consumer guard overlaps the same correctness boundary in #33240; the workspace and frontend changes remain in that PR.

Deterministic capped-pool tests reproduce the old panic and verify ErrMPoolCapacity, unchanged failed candidates, normal matching after capacity is restored, no publication of partial results after an unexpected error, and allocation-error precedence over WW during copyback.

Validation passed:

  • Full tests for pkg/vm/engine/tae/index/indexwrapper, pkg/vm/engine/tae/tables, and pkg/vm/engine/tae/txn/txnimpl
  • Targeted tests for those packages under -race
  • go vet, molint check, and golangci-lint for all changed Go packages

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify

mergify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH

XuPeng-SH commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 094ebc870911758e2d79af7b8049a2b28cd071ad

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 094ebc870911758e2d79af7b8049a2b28cd071ad

Assessment: approve

The change returns bitmap allocation errors through committed tombstone scans and avoids publishing partial candidate filtering on unexpected errors. It reuses the existing bitmap allocator without introducing new persistent state or protocol behavior. No actionable defects were found.

Model: gpt-6.1-terra / max

Session: 01a211d7-e427-70e2-a993-c62f1960cb9e · slot 3 · generation 3

Validation:

  • Passed the four owning Go packages with the supplied test executor. Log: owning-packages.log; receipt: checks/1795600392204760586-3.json.

  • Passed the focused allocation-error and candidate-copyback tests. Log: focused-go-tests.log; receipt: checks/1795600095209460245-3.json.

  • Passed reviewer fault-injection probes against real in-memory and persisted tombstone objects. Logs: reviewer-memory-probe.log and reviewer-persisted-probe.log; receipts: checks/1795600295802312487-3.json and checks/1795600112075976116-3.json.

  • Private-runtime preflight passed, and the native library built from the assigned inputs passed provenance verification.

Limitations:

  • Fault injection exercised TAE object APIs rather than the SQL frontend. Transaction caller propagation and cleanup were assessed through source tracing and focused candidate-copyback tests.

  • The persisted-object probe used a separate capped key pool to reach the bitmap allocation failure.

  • The PR-reported race and lint runs had no retained execution evidence in the supplied record and were not independently repeated.

This branch was successfully deployed

No deployments
ci — 97b4880a Deployed Nov 25, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: committed tombstone matching may panic when NULL bitmap allocation fails

2 participants