Skip to content

feat: bootstrap protected Sirius TAE leases - #29255

Closed
aunjgr wants to merge 2 commits into
matrixorigin:mainfrom
aunjgr:feature/28966-tae-recovery
Closed

aunjgr wants to merge 2 commits into
matrixorigin:mainfrom
aunjgr:feature/28966-tae-recovery

Conversation

@aunjgr

@aunjgr aunjgr commented Sep 22, 2026

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:

issue #28966

What this PR does / why we need it:

Adds the disabled-by-default TAE recovery foundation required by embedded Sirius. An explicit internal broker option restores durable read protection before checkpoint replay or the first cleaner opportunity, then publishes the recovered manager only after complete TAE storage construction succeeds. Ordinary standalone and distributed TN startup remains unchanged, and no production launcher enables the option.

The change also adds same-process and legacy-compatible directory exclusion, a durable directory-generation token created lazily under that lock, bounded journal/token reads, crash-safe token publication, and rollback ordering that retains the directory lock until failed open cleanup finishes.

Production direct-TAE activation remains intentionally blocked until a later PR establishes exclusive shared-namespace enrollment; the design documents that boundary explicitly.

Validation:

  • owning packages passed normal and race modes: substrait, tnservice, tae/db, tae/options, txn/storage/tae
  • same-process, subprocess, and legacy lock exclusion tests
  • token corruption, interrupted publication, generic-hook, generation, broker, replay, and rollback tests
  • incremental lint: 0 issues
  • formatting and diff checks

@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 →

@fengttt fengttt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This code is wrong. To build sirius in MO, in theory we only touch query plan and execution. The project should not touch ANYTHING in tae.

@fengttt

fengttt commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

This code is wrong. To build sirius in MO, in theory we only touch query plan and execution. The project should not touch ANYTHING in tae.

Should not touch lock service either -- assume that we only offload read queries to sirius.

@aunjgr

aunjgr commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Deferred by the owner for the MO-reader-only embedded Sirius milestone. This PR adds TAE and directory-lock changes that the current milestone will not use; retaining the branch for a separately reviewed direct-TAE design.

XuPeng-SH pushed a commit that referenced this pull request Sep 29, 2026
## What type of PR is this?

- [x] API-change
- [ ] BUG
- [ ] Improvement
- [x] Documentation
- [x] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Refs #28966. This PR does not close the migration issue.

## Review notes

The owner narrowed this migration milestone to MO-reader input on
2026-09-23. Direct-TAE reads and new TAE/lock changes are deferred;
#29255 was closed.

The [MO-reader-only embedded design
v2](https://github.com/aunjgr/matrixone/blob/d6e95dddbd/docs/design/sirius-embedded.md)
supersedes the unmerged direct-TAE draft for this milestone. Sections 3
and 4 define MO-owned input and bindings; sections 6 and 7 retain
fail-closed execution and Flight compatibility; section 10 requires all
22 queries on embedded MO-reader input with two streams. Independent
technical review of this exact revised design blob has been requested;
prior approval of v1 is not being treated as v2 approval.

Focused embedded binding tests, the full `pkg/sql/plan/substrait`
package, `go vet`, formatting, and diff checks passed locally.
Exact-head CI has no failed or pending checks.

## What this PR does / why we need it:

Add deterministic, query-local MO read bindings to embedded Sirius
Substrait plans. Each binding advertises the exact post-scan schema
emitted by its MO producer. Reject invalid sources, binding identities,
projections, and hidden-column shapes before native preparation;
preserve the existing Flight plan path.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
ci — 3c8483bc Deployed Sep 23, 2026 by aunjgr via Matrixone Coverage execution / Coverage #55391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature kind/test-ci size/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants