Repository navigation
Description
Existing issue search
- Searched open issues for persistence latency and durable turn performance; no matching scoped issue found.
Problem
A local Astra release build against an isolated account on a dedicated MatrixOne CN takes about 6 seconds for a fresh "hello" turn with an immediate deterministic model stub. Interleaved baseline/candidate measurements (10 each) show approximately 208 SQL/transaction operations and 17 transactions before run_finished; about 90% of the wall interval overlaps SQL waits. A first atomic input audit/transcript batching experiment reduced this to about 204 operations / 16 transactions, but P80/P90 improved only ~1.12x/~1.13x and mean latency did not improve.
Requested capability
Consolidate durable execution boundaries and transaction-local admission facts so the normal agent path does substantially less synchronous database work. Acceptance target: at least 3x lower P80 and P90 non-model turn latency under interleaved same-environment tests, followed by multi-round and correctness regression coverage.
Design constraints
- MatrixOne remains the durable source of truth; no success publication before required commits.
- Preserve billing admission, immutable identity/hash collision checks, lost-ack reconciliation, session deletion fences, cancellation and owner-generation takeover safety.
- Reuse canonical storage owners and typed transaction-local receipts; do not introduce cross-transaction authorization caches, fallback paths or relaxed timeout/gates.
- Empty recovery should prove there is no work in one owner-scoped snapshot, rather than run the full reconstruction transaction.
- Consolidate run/session/canonical turn admission and terminal boundaries where their existing contracts allow it.
- Preserve explicit lock order. A multi-table locking JOIN is not yet proven safe: some Work writers do not take the lifecycle fence.
- Benchmark using an isolated test account only; no business-data or deployment modifications.
Validation
Keep every measured sample, alternate A/B and B/A order, identify exact build revisions and CN execution routing, and count overlapping SQL wait intervals once. Distinguish a genuine improvement from environment drift. Targeted database tests must cover replay, collisions, deletion, cancellation, expiry, takeover and ambiguous commit. No 3x result has been achieved yet.
Consolidated evidence and acceptance
This issue also tracks the concerns previously recorded in #980 and #1124. Preserve the independent scenarios and their original measurements:
- [Bug]: Short Server turns incur excessive database round trips with a remote MatrixOne database #980: real-provider Server-only fresh turns against remote MatrixOne, including Explain; historical P90 was 14.22 seconds, with a target below 7 seconds in the same scenario. Retain the full terminal-receipt measurement and correctness boundaries.
- [Bug]: A single hi turn incurs 200+ SQL operations and ~20 transactions, with seconds of non-model latency on QA #1124: the 2026-10-23 isolated mock-provider investigation recorded a historical median of 208 SQL/query-log entries and 17 BEGINs; its QA/local topology and statement-counting scope are documented in that issue. Preserve it as historical evidence, not a claim about current main.
- Re-establish a current-main baseline for each relevant topology, preserve offered/failed/slow samples and explicitly report transaction and SQL counting scope. Keep [Feature]: Consolidate durable execution boundaries to reduce non-model turn latency #1119's interleaved 3x P80/P90 non-model latency objective and correctness, ownership and recovery constraints. The historical real-provider and mock-provider targets are separate measurements, not interchangeable.
Activity
XuPeng-SH commentedon Nov 15, 2026
已合并追踪至 #1302 的第 5 节。保留同环境 P80/P90 至少 3× 和历史真实 provider 场景 P90 低于 7 秒的独立目标。
此关闭仅表示将追踪入口合并,不表示原问题已全部修复。原报告、讨论和尚未满足的验收条件继续作为新 issue 的证据与验收来源。