Skip to content

perf(storage): simplify hot-path persistence and retire redundant product state #1186

Open

Description

@XuPeng-SH

Problem and scope

Continue the persistence simplification after #1182, starting from current main 1226b37e336ef80f1ac64aea71ca4e12ef1444c5. This is a combined storage-design and product-retirement wave, covering hot-path SQL, inefficient queries/schema/indexes, and low-value tables with their complete owning logic. It must be comparable in system scope to #1182, rather than another small index-only PR.

The complete current source inventory has 121 table declarations. agent_runs still combines 50 control/identity/recovery columns, including several large serialized bodies, with frequent cursor/lease/status updates. Event tables carry many indexes. Remaining legacy snapshot/decision/harness diagnostic products need a caller and value audit before any retirement decision. These observations are source facts, not measured physical write-amplification results.

Existing work and boundaries

Acceptance

  • Read/write/caller and ownership map for the remaining schema, with concrete retained/optimized/retired dispositions.
  • A coherent substantial delivery spanning hot-path SQL and schema design plus justified low-value business-chain removal; no padding through test lines or arbitrary feature deletion.
  • Preserve canonical conversation/Context custody, provider attempt/billing identity, Run recovery, owner isolation, cancellation, deletion fences, idempotency, rollback and explicit lock ordering.
  • Fresh same-version deployments only; no compatibility layer, migration/new version marker, relaxed timeout or hidden fallback.
  • Full closure for retired schema/index/bootstrap/cleanup/worker/API/SDK/UI/config/test/documentation paths, with explicit product loss.
  • Before/after real MatrixOne evidence for changed mechanisms and bounded sustained 100/1,000-Session scenarios where applicable. Report offered/committed/rejected work, foreground interference, lock/pool wait and latency; do not equate a finite burst with sustained capacity or infer an unmeasured engine-write multiplier.
  • Affected static/lint checks, owning unit tests, real DB unhappy paths and supported concurrency validation; exact source fingerprints and limitations. Explicit gpt-6.1-terra/max design and final overall review before PR delivery.

No deployment, production data changes, merge, or CI rerun/wait is part of this work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions