Skip to content

fix(txn): quiesce and drain TN RPC handlers before storage close - #28016

Merged
XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/tn-rpc-quiesce-drain
Sep 8, 2026
Merged

XuPeng-SH merged 9 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/tn-rpc-quiesce-drain

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

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

Which issue(s) this PR fixes:

issue #28012

Related to issue #27945 and PR #28015.

What this PR does / why we need it:

During standalone shutdown, accepted TN transaction RPC handlers can still depend on replicas, storage, and WAL. Closing those dependencies before the handlers finish can interrupt transaction completion or leave shutdown waiting indefinitely.

Changes

  • Add private Quiesce/Drain lifecycle hooks without changing public service interfaces.
  • Seal network admission and cached-local invocation leases before draining; cancel queued and forward-wait requests with exactly-once cleanup.
  • Retain replica, storage, and WAL dependencies until accepted handlers finish. Network and local drains share one deadline; failure returns before dependency destruction.
  • Make concurrent and repeated Close calls share a single terminal result.
  • Strengthen the forward-wait regression with a test-only barrier after dequeue, handler admission, and state selection. The test covers both readiness promotion and quiesce, and asserts exactly-once cancellation, no forwarding, request reset, zero active handlers, and joined worker shutdown.

The current remote head is e295863d85fcd5e55116c0a939e6acc6bd99a6d7, with merge-base 585a38efd152fadf216c8675b7b997a35ca8deb1. The range is B-only against the current main base; the merge-from-main commit changes no additional TN/RPC lifecycle files. No SQL/DDL, public RPC interface, wire protocol, persisted format, owner fence, discovery timeout, or transaction-outcome semantic change is introduced.

Validation

  • Exact-head scope: e295863d85fcd5e55116c0a939e6acc6bd99a6d7; complete diff is limited to the seven TN/RPC files in the B-only range.
  • Focused RPC tests on the exact head: normal PASS; -race -count=10 PASS for forward-wait quiesce and accepted-handler drain.
  • The repaired forward-wait regression uses a deterministic post-dequeue barrier, covers both promotion interleavings, and installs cancellation/unblock/join cleanup before assertions.
  • Approved unchanged production/package/native evidence from 781820fb5bc05b2a9db17857654265587e917885 remains applicable because the current merge-from-main commit does not change the reviewed B implementation. Current-head CI is tracked separately and is not claimed complete here.
  • gofmt and git diff --check: PASS.
  • BVT: N/A — SQL BVT cannot deterministically hold queued, active, forwarded-wait, or WAL-durability RPC requests at lifecycle barriers while asserting dependency lifetime during process shutdown. Equivalent deterministic regression coverage is in pkg/txn/rpc/server_test.go, pkg/tnservice/store_rpc_handler_test.go, and pkg/tnservice/store_test.go; real cross-service acceptance remains required.

Remaining acceptance and QA

PR A+B in-flight-commit SIGTERM, dependency-order evidence, ten same-UUID restarts, and the disposable SIGKILL owner-fence control remain outstanding. Component tests do not establish a real LogService handoff. Unknown commit outcomes must be determined by recovery and must not be described as rollback.

The PR is Ready for review; this UI state is not a claim of final approval or completed runtime acceptance. Merge/QA acceptance remains pending the cross-service evidence.

  • QA required: yes, because transaction shutdown, hang, restart, and unknown-commit behavior are affected.
  • Production entrypoint: accepted TN transaction RPC during standalone graceful shutdown.
  • Automated coverage: network/local admission, request cleanup, bounded drains, and dependency-retention component tests.
  • QA handoff remains paused until cross-service gates are complete; this update does not change issue phase or assignment.

@matrix-meow matrix-meow added the size/XL Denotes a PR that changes [1000, 1999] lines label Sep 2, 2026
@mergify mergify Bot added kind/bug Something isn't working kind/refactor Code refactor labels Sep 2, 2026
@VioletQwQ-0
VioletQwQ-0 force-pushed the codex/tn-rpc-quiesce-drain branch from 0f684ed to 1ed6768 Compare September 2, 2026 12:33
@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH The forward-wait test finding is addressed in 781820fb5bc05b2a9db17857654265587e917885.

The worker's second Done() evaluation now supplies a test-only barrier after dequeue, beginHandler, and selection of TxnForwardWait. Quiesce runs while that barrier is held. A separate promotion case closes waitReady before quiescing, so both readiness and shutdown are present when the worker resumes. Both cases require exactly one cancellation, no forwarding, a reset request, zero active count, and a joined worker. Cancel/unblock/join cleanup is registered before launch and assertions. The accepted-handler test now makes a single deadline-bearing Drain call after release instead of putting an unbounded call inside Eventually.

Validation: both changed tests pass normally; each top-level test passes 100 race repetitions; the RPC package passes normally and under race. Removing the production stoppingC forward-wait arm in an isolated overlay makes the new waiting case fail in 1.00s and exit without a stranded worker. Production code is unchanged in this commit.

Please re-review the test repair. The cross-service acceptance request remains open: A+B in-flight commit SIGTERM, shutdown order, 10 same-UUID restarts, and SIGKILL fence evidence have not been supplied by this update. I am not treating package tests as proof of real LogService handoff or asking to waive that gate. The PR body now also reflects the actual Ready UI state without claiming runtime acceptance is complete. The local-dispatch microbenchmark remains an optional follow-up; no lease optimization was made.

@XuPeng-SH XuPeng-SH 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.

Deep re-review of exact head 781820f against base/merge-base 7e6cb6a: APPROVE for the source change. The outstanding cross-service QA acceptance listed below is not claimed complete. Under the current maintainer review direction, missing test evidence alone is not a REQUEST_CHANGES blocker when no verified source correctness/concurrency/unhappy-path failure remains.

The previous forward-wait regression defect is fixed. The single worker's second Done() evaluation holds execution after dequeue, beginHandler and TxnForwardWait state selection; it no longer treats the pre-incremented active count as proof of worker entry. The two cases exercise waiting and readiness-promotion versus quiesce, require exactly one cancellation, zero forwarding, a reset request, zero active handlers and a joined worker. Cancellation/release/join cleanup is installed before launch/assertions. The accepted-handler test now uses a deadline-bearing Drain directly instead of trying to bound a blocking callback with Eventually. The author also reports a discriminating negative control that removes the production stoppingC arm and fails the repaired waiting case without stranding the test worker; that report is attributed evidence, not my own run.

I read all changed hunks in the complete seven-file B-only diff, checked the exact test-only delta from 1c84b15, and traced the network queue, active-handler accounting, forwarding, cached local dispatch and actual standalone shutdown consumers. Production content is unchanged from the previous reviewed head. Quiesce seals admission before waiting for admitted producers; queued/dequeued cancellation and ordinary execution have separate exactly-once cleanup paths. Cached local closures acquire a call-time lease. Network and local drains use the same store deadline, and failure returns before replica cancellation/storage destruction. Concurrent/repeated closes share the terminal result.

The actual service supervisor stops TN before LogService, propagates TN Close failure through its role task, and returns without initiating the next dependency shutdown phase. I am not reopening the already-corrected TN-to-LogService ordering or interpreting an unknown commit outcome as rollback.

Audit Closure
Q1 / generation Admitted requests and local leases remain counted until their terminal owner releases them; request pools are reset on release; close does not reopen admission.
Q2 Forward-wait observes stopping/cancellation; accepted execution drains while dependencies remain available; timed-out drain prevents dependency teardown and leaves fail-stop/recovery to the supervisor.
Q3 / performance Existing queue/worker bounds remain; local dispatch adds bounded per-call locking/closure overhead, not a new unbounded cache or queue. A microbenchmark is optional, not a reason to remove call-time admission.

Validation: exact-head MatrixOne ALL CI 34195541983 is successful and git diff --check passes. Reviewed the source/oracles and reused the previous unchanged production/consumer review plus author-reported RPC focused/package/race and unchanged TN/native evidence with attribution; no new local native/race/topology run is claimed. This is a lifecycle bug fix with no public interface, wire, persisted-format or WAL outcome change, not a new protocol design.

Still incomplete QA acceptance, separate from this source approval: combined A+B in-flight-commit SIGTERM, real dependency-order evidence, ten same-UUID restarts, and a disposable SIGKILL owner-fence control. Component tests and green CI do not prove those cross-service results. Keep the outstanding QA record explicit and determine uncertain commit outcomes through recovery. I found no additional verified source blocker.

@mergify mergify Bot added the queued label Sep 8, 2026
@mergify

mergify Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-08 07:40 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-08 08:03 UTC · at e295863d85fcd5e55116c0a939e6acc6bd99a6d7

This pull request spent 22 minutes 24 seconds in the queue, with no time running CI.

Waiting for
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
    • check-success = Matrixone CI / SCA Test on Linux/arm64
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
All conditions
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
    • check-success = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]

Reason

Pull request #28016 has been dequeued

Queue conditions are not satisfied:

  • #changes-requested-reviews-by<=0

Failing checks:

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@iamlinjunhong iamlinjunhong 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.

P1 — drain timeout 后嵌入式关闭路径仍会销毁 TN 依赖

触发场景:嵌入式集群中已有 TN RPC commit 被接受,但在 4 分钟 drain deadline 内仍停在 WAL/存储终态,随后调用 `Cluster.Close()`。

  1. `pkg/tnservice/store.go:378` 在 `drainHandlers` 返回超时后提前返回,这本身保留了 active handler、replica、storage 和 WAL,符合本 PR 的契约。但同一服务的调用方 `pkg/embed/operator.go:143-155` 在 `op.reset.svc.Close()` 返回错误后,仍无条件停止 stopper 并关闭 `op.reset.fs`。该 file service 正是 `operator.go:294-298` 传给 TN、并在 `pkg/tnservice/factory.go:108-124` 用来构造 TAE storage 的依赖;此时 active handler 仍可能在使用它。

  2. `pkg/embed/cluster.go:248-249` 忽略 TN `Close` 错误并继续反向关闭后续服务。嵌入式服务顺序是 Log -> TN -> CN,因此 TN drain 超时后仍会关闭 LogService/WAL,而未终止的 commit handler 仍可能等待该 WAL。这样会把本应保留并交由恢复判定的 unknown commit outcome 变成依赖被销毁的失败路径。

请让嵌入式 owner 在 TN close 失败时保留 file/WAL 依赖和 cleanup owner,并停止后续 LogService teardown;同时补一个经过 `ErrTxnDrainTimeout` 的 embedded timeout regression。虽然上述两个 consumer 文件未在本 PR 中修改,但它们是本 PR 新增 early-return 语义的实际调用链,当前路径会破坏 PR 声明的 timeout contract。

P2 — 跨服务 QA 证据仍未完成

PR body 与作者在当前 conversation 的回复都确认,A+B in-flight-commit SIGTERM、真实依赖关闭顺序、同 UUID 重启和 SIGKILL owner-fence 证据仍未提供。该项不是本次 `REQUEST_CHANGES` 的源码触发条件,但不能由组件测试和绿 CI 代替。

本地复核:当前 head 的 7 个变更文件与原 head blob 相同,`git diff --check` 通过;本机定向 Go 测试受 CGo 环境缺少 `jemalloc.h/libmo` 阻塞,未宣称本地测试通过。

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

Addressed the embedded drain-timeout owner issue in bd37201d1275682160a25971180c793f5c7b5d46:

  • operator.Close now returns before stopping the service stopper or closing its file service when service close fails, retaining the cleanup owners for retry.
  • cluster.closeServicesFromLocked stops reverse dependency teardown at the first failed dependent service, so TN drain failure does not close LogService/WAL dependencies.
  • Added operator-level retry/owner assertions and an embedded cluster regression using rpc.ErrTxnDrainTimeout.

Validation on the exact pre-push content: gofmt and git diff --check pass; semantic snapshot/collector pass. Focused CGo tests were attempted but are blocked on this host by the missing cgo/libmo.dylib; no local test pass is claimed. Cross-service SIGTERM/restart/owner-fence QA remains outstanding. Please re-review the new head.

@mergify

mergify Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
  • -closed [📌 queue requirement]
  • any of: [📌 queue requirement]
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue rule main]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-2.1]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-2.2]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-3.0]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-4.0]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-4.1]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • all of: [📌 queue conditions of queue rule release-4.2]
      • github-review-approved [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
All conditions
  • -closed [📌 queue requirement]
  • any of [📌 queue requirement]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule main]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-2.1]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-2.2]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-3.0]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-4.0]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-4.1]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • all of [📌 queue conditions of queue rule release-4.2]:
      • github-review-approved [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
        • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
        • check-success = Matrixone CI / UT Test on Ubuntu/x86
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone CI / SCA Test on Linux/arm64
        • check-neutral = Matrixone CI / SCA Test on Linux/arm64
        • check-skipped = Matrixone CI / SCA Test on Linux/arm64
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
        • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Utils CI / Coverage
        • check-neutral = Matrixone Utils CI / Coverage
        • check-skipped = Matrixone Utils CI / Coverage
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
        • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
      • any of [🛡 GitHub branch protection]:
        • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
        • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = @mergify/Configuration changed
    • check-success = @mergify/Configuration has been deleted

@aptend aptend 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.

Deep re-review of exact head bd37201 against current base 585a38e: APPROVE. I read the complete review history, author responses, full ten-file diff, the e295863..bd37201 incremental diff, and the actual embedded/standalone close consumers. There are no inline review threads.

The prior embedded drain-timeout blocker is closed. operator.Close now leaves the service object, operator stopper, and file service owned and live when service Close returns ErrTxnDrainTimeout. cluster.closeServicesFromLocked stops reverse teardown at that failed TN, so the earlier LogService/WAL dependency is not closed. A successful service close still releases those owners in dependency order; cluster admission and port leases are released only after all services close successfully. Because the real TN store caches the first Close terminal, a drain timeout is a fail-stop result rather than a claim that a later retry can resume that store; the retained owners keep the unknown transaction outcome recoverable until process recovery.

The previously reviewed network/local lifecycle remains closed over the full diff: admission and active accounting linearize with quiesce, queued and forward-wait requests have exactly-once cancellation/release, cached local handlers acquire invocation-time leases, and the TN shares one deadline across network and local drains before replica/storage teardown. The supervisor and embedded owner now both stop dependency teardown on a TN close failure.

Local exact-head validation:

  • make thirdparties and make -C cgo: PASS
  • changed embedded owner tests: PASS, count=20
  • changed RPC/TN lifecycle tests: PASS, count=20
  • all changed lifecycle tests across embed/RPC/TN under race: PASS, count=5
  • complete diff check: PASS

Exact-head CI is not claimed green: its coverage job currently reports failure while other jobs are still running. Branch protection should keep that independent gate. The PR body also still names e295863 and a seven-file scope; it should be refreshed to the actual bd37201 ten-file scope for audit accuracy. The outstanding A+B SIGTERM, real dependency-order, same-UUID restart, and SIGKILL owner-fence QA evidence also remains explicitly unproven; I found no additional verified source blocker.

This branch was previously deployed

1 inactive deployment
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 kind/refactor Code refactor size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants