GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — ci(fork): run the project's own CI matrix on this branch by vifar · Pull Request #2 · vifar/t3code Conversation
Owner
This is a fork-only pull request whose only purpose is to obtain the project's own CI signal on Why it exists. Upstream's What it changes. The base branch here carries one fork-only commit that swaps the runner labels for the
Nothing else changes. Same steps, same composite actions, same scripts, same test suites, same job selection. What is under test. The merge commit of this pull request is the upstream head This pull request is tooling for the fork. It is not a contribution and nothing here is meant to be merged
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…onnection
The MCP read path is the server's hottest read: every `t3_thread_read` goes
through `getThreadRecords`, and the shell list goes through
`getShellSnapshot` and `getThreadShell`. All three ran on the writer
connection, so a read had to take the write lock.
On a host whose state database is large and whose writer is busy, that is
where the time goes. Measured on such a host, over a ten-minute window:
```
MCP tool calls: 1,857 in ~10 minutes (peak 506 in one minute)
DB lock waits > 100 ms: 1,608 (518 seconds of lock wait in that window)
correlation calls/min vs
total lock wait/min: r = 0.751
sqlite ops by connection:
18,408 (writer, read) <-- reads also go through the writer
234 (writer, write)
```
78.5% of every query in that window ran inside an MCP call. The worst single
lock wait was 6,622 ms, on
`SELECT payload_json FROM orchestration_v2_projection_nodes WHERE node_id = ?`.
The reader connection already exists - `nodeSqliteClient` starts a reader
worker for a file-backed database, and `NodeSqliteClient.readOnly` routes a
read to it. It was barely used: 8 transactions in the window, averaging
497 ms, which is the reader pool starved exactly when the writer is busy.
These three reads are pure reads, so they belong on the reader. The change
moves them and nothing else: the queries, the transaction shape and the
results are unchanged.
Co-authored-by: GPT-6.1 Sol <[email protected]> The lock-wait measurement's writer inserted rows with columns that `orchestration_v2_projection_checkpoints` does not have, and the insert was wrapped in `Effect.ignore`, so every row was rejected and the "under write load" measurement had no write load in it. The writer now uses the table's own columns, generates a unique scope per row, and does not swallow failures: the test counts the rows the writer reports and counts the rows on disk, and asserts they are the same. Both measurements now assert the lock wait is reported, so the before/after is compared on the measure the server logs. The writer signalled its milestone only after every insert had finished, so the read ran against a writer that was already done. The measurement was of a read with no write load in it, which is the opposite of what the test claims to measure. The milestone is now signalled part way through the inserts, and the writer keeps writing while the read runs. The test asserts that the writer was still going when the read started, so the overlap is pinned rather than assumed. Co-authored-by: codex <[email protected]> …ingdotgg#23519) Co-authored-by: Claude Opus 5.5 <[email protected]> … is guaranteed
The writer streamed inserts and signalled a milestone part way through, so
the read could still start after the writer had finished: the reader's
transaction opens with an asynchronous BEGIN, and the writer can use that
window to complete its inserts. The test then measured a read with no write
load in it.
The writer now HOLDS the write lock for the whole read, so the overlap is
guaranteed by construction rather than by timing. With the lock held, the
two connections behave differently, and the difference is the change:
read-on-reader: connection=reader lock_wait_ms=0.022 lock_held_for_ms=12
read-on-writer: outcome=Failure lock_held_for_ms=3002 connections_acquired=0
The read on the reader connection completes while the writer holds the
lock. The same read on the writer connection cannot even acquire a
connection - it waits for the lock until the bound expires, and there is no
db.connection span for it because the acquisition never finished.
… timeout Two assertions were weaker than the claims they carried. The reader case asserted that the lock was held for the whole read by checking the elapsed time, which is a 1 ms-resolution clock reading: a fast read can finish inside the same millisecond, so the assertion could fail intermittently, and it did not prove what its comment said. The lock is held by construction - the writer holds its transaction until the read has finished - and what proves it is that the writer's row was still uncommitted, and so invisible to the reader, when the read finished. The test now asserts that. The writer case accepted any failure. Effect.timeout can preserve an earlier SQL failure, so "it failed" did not mean "it was blocked by the lock". The failure is now asserted to be the timeout, and to have waited for the bound, which a read that failed for another reason would not do. …g#23808) Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> … on the reader too A triage note on issue pingdotgg#21840 named four ProjectionStore reads that still default to the writer on main, because neither they nor their callers opt into readOnly. Two of them - getShellSnapshot and getThreadRecords - are covered by the previous commits. This covers the other two: - getRecoveryThreadIds, the startup-recovery query; - getSettlementCandidates, the auto-settlement sweep. Both are pure reads, so both belong on the reader connection: startup recovery and the settlement sweep must not take the write lock. Together with getThreadShell, that is every read the note named. …ngdotgg#23047) Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Haiku 5.5 <[email protected]>
|
There was an error while loading. Please reload this page.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The server typecheck was never actually run locally: `vp run --filter
@t3tools/server typecheck` matches no package, so it exits 0 having done
nothing. The package is `t3`, and `tsc --noEmit` in apps/server reports
twelve errors in the two new test files, which the project's CI caught and
this commit fixes.
- `ModelSelection` was used but never imported.
- `withWriteLockHeld` declared neither the `uncommittedRows` it returns nor
the `SqlError` its queries can fail with.
- The span attribute is read as `{} | null`, so it needs narrowing before it
can be used as a connection name.
- `console.log` inside Effect code is rejected by the effect language
service, and `Effect.log` is swallowed by the test runner, so the
measurement is printed through a suppressed `console.log` instead.
- `Fiber.join` propagates the writer's failure rather than returning it, so
a row that did not insert now fails the test instead of passing as write
load. The writer also releases the reader if the write fails, instead of
leaving it to time out.
- The two layer merges that provided `NodeServices.layer` alongside other
layers raised a warning and made `tsc` exit non-zero with no errors at
all. They now provide it with `Layer.provideMerge`, the way the rest of
the repository does.
`tsc --noEmit` in apps/server now exits 0 with no errors and no warnings,
and the seven tests in the two files pass.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.