Skip to content

[PR] storage: mysql on the proxy hot path (async shadow facade, #3388 step 3) - #3955

Merged
ranxianglei merged 1 commit into
2026-10-20_mysql-backendfrom
2026-10-20_mysql-hot-path
Oct 20, 2026
Merged

ranxianglei merged 1 commit into
2026-10-20_mysql-backendfrom
2026-10-20_mysql-hot-path

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Fixes #3931 (step 3 of #3388). Stacked on #3946 (step 2) — merge that first.

What

storage.backend="mysql" now carries the proxy hot path, not just export:

Explicitly degraded on mysql in v1 (all fail-safe, none silent-wrong)

incremental lane (sync unified reads) → honest 409 resync / unavailable; snapshot render → storage-off degradation; web session list → disk walk (webSummaryBaseline returns null so an empty authoritative row set can never blank the list).

Verification

  • tests/storage-backend-mysql-e2e.test.ts (new, DSN-gated): hot-path save lands on the backend; envelope discipline (writerOff refused); viewForAsync serves id + fold blocks; replica create/list/restore/delete; ext round-trip; restart stays warm (bare loadSync through the lazily seeded envelope, re-ingest after restart). Green against real MySQL 8.0.46 (docker).
  • Contract 7/7 + knob 4/4 against real MySQL; sqlite families unchanged: storage-unified 14, replicas 4, json-writer-off 3, review-fixes 4, full-flip 8, archive-gc 5, reap-journal 2, bounded 11, web-sessions 24, golden-render 5, export families 13, engine-bootstrap 30, config-epoch 5, snapshot-shadow 5, incremental-lane 24, inc-canonical-pointers 3, watermark 14. tsc clean.
  • CI mysql-contract lane (from step 2) runs the contract suite on every PR.

@ranxianglei ranxianglei changed the title storage: mysql on the proxy hot path (async shadow facade, #3388 step 3) [PR] storage: mysql on the proxy hot path (async shadow facade, #3388 step 3) Oct 20, 2026
@ranxianglei
ranxianglei force-pushed the 2026-10-20_mysql-hot-path branch from b3c4684 to b8ebf17 Compare October 20, 2026 11:31
@ranxianglei
ranxianglei force-pushed the 2026-10-20_mysql-backend branch 2 times, most recently from 48c0384 to 288c795 Compare October 20, 2026 11:49
Async shadow facade: sqlite keeps its zero-await sync fast path byte-for-byte;
mysql rides a serial backend queue for saves (watermark deltas, reap journal,
digest sampling, 3-strike disable) with the JSON envelope as the sync read
path. Replicas/ext/GC speak async twins; admin awaits them. writerOff stays
sqlite-only. Lazy disk-index seeding for bare-id cold loads on async backends
only. MySQL e2e suite (hot path, envelope discipline, replicas/ext, restart
warm) against real MySQL 8.0; sqlite families unchanged.
@ranxianglei
ranxianglei force-pushed the 2026-10-20_mysql-hot-path branch from b8ebf17 to a2b8bcd Compare October 20, 2026 11:50
@ranxianglei
ranxianglei merged commit 2350797 into 2026-10-20_mysql-backend Oct 20, 2026
17 checks passed
ranxianglei added a commit that referenced this pull request Oct 20, 2026
fix(deps): declare mysql2 + restore registry lock URLs; land the stranded step-3 merge (#3955)
Zhishulo pushed a commit to Zhishulo/billion-context that referenced this pull request Oct 20, 2026
…he stranded step-3 merge (ranxianglei#3955)

master is red on two jobs since ranxianglei#3946 merged:
- mysql-contract: package.json lost the mysql2 dependency when a local
  version-restore accident reverted the npm install --save edit (the lock
  kept the subtree), so the service lane cannot resolve mysql2.
- lock-sync: 11 lock entries carried resolved URLs from the local install
  relay (127.0.0.1:4873); rewritten to registry.npmjs.org (integrity
  hashes were already the official ones).

Also folds in 2350797 (the ranxianglei#3955 merge) which was accidentally merged
into its stacked base branch (2026-10-20_mysql-backend) instead of master
— this PR lands step 3 (mysql hot path) on master.
This was referenced Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant