M10.9d: batch durable action lookups (one per poll, one per commit)
Foundation / checks (deploy) (push) Successful in 3m27s
Foundation / checks (ecs) (push) Successful in 1m57s
Foundation / checks (client) (push) Successful in 12m41s
Foundation / checks (network) (push) Successful in 13m33s
Foundation / checks (tsan) (push) Successful in 7m54s
Foundation / checks (checks) (push) Successful in 32m56s
Foundation / checks (postgres) (push) Successful in 46m10s
Foundation / postgres-tools (push) Successful in 18s
Foundation / image (push) Successful in 2m33s
Foundation / server-image (push) Successful in 4m24s
Foundation / checks (deploy) (push) Successful in 3m27s
Foundation / checks (ecs) (push) Successful in 1m57s
Foundation / checks (client) (push) Successful in 12m41s
Foundation / checks (network) (push) Successful in 13m33s
Foundation / checks (tsan) (push) Successful in 7m54s
Foundation / checks (checks) (push) Successful in 32m56s
Foundation / checks (postgres) (push) Successful in 46m10s
Foundation / postgres-tools (push) Successful in 18s
Foundation / image (push) Successful in 2m33s
Foundation / server-image (push) Successful in 4m24s
The fourth dev drill showed a synchronous PostgreSQL round trip per action on the simulation thread: at admission (uniqueness) and again at commit (first-record rule). About 12 lookups landed on each commit tick (commit ticks 58-70 ms, session p99 30-39 ms). - ActionLedger::find_all; persistence::find_region_actions applies the schema v11 find_region_action to many pairs in one statement (no migration). - IntentAdmission::admit/verify: actions only the ledger can refuse wait for one verify per poll; receipts still go out in the same poll. committed() asks once per commit. - Tests: deferred_actions (network_control), find_region_actions and find_all (Postgres). - ADR-0097 fourth run, ADR-0092 amendment, VALIDATION; refresh the dev session window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -387,3 +387,34 @@ the trust), then the drill ran at 21:00–21:05 UTC and was restored.
|
||||
scope here.
|
||||
- The drill summary now judges by budgets v2 and prints commit and other-tick maxima and
|
||||
the poll and replicate averages.
|
||||
|
||||
## 10.9d fourth reference run (2026-10-09, image `754446fe…`)
|
||||
Drill at 01:00–01:06 UTC, restored. It is the first run whose actions were all new (no
|
||||
duplicates), so the first in which actions actually committed (about 12 per commit, one
|
||||
commit about every 1.05 s).
|
||||
- **Client side:** 24 sessions within every client budget (response p95 111 ms; 20 Hz;
|
||||
no starvation; `duplicate_actions=0`). Outcome p95 about 1.2 s: the action waits for
|
||||
the commit of the batch it rides. The governor refused logins beyond 24.
|
||||
- **Server side, not within budgets v2:**
|
||||
- commit ticks 58–70 ms (budget 50);
|
||||
- session-layer p99 30–39 ms (1.5–1.6 ms per session), and 3–5.6 ms with a single
|
||||
session;
|
||||
- other ticks at most 12–19 ms; no tick debt.
|
||||
- **Cause:** a synchronous PostgreSQL round trip per action on the simulation thread.
|
||||
Admission looked up each new action's durable record (uniqueness across epochs,
|
||||
processes and regions), and each commit looked up every committed action again, so the
|
||||
first-record rule could hold. About 12 lookups land on each commit tick (≈ 35 ms on the
|
||||
dev database), and each incoming action costs one round trip on whichever tick it
|
||||
arrives. Locally a round trip is a fraction of a millisecond, which is why the profile
|
||||
missed it. Drill 3 never reached the commit path.
|
||||
- **Fix (no schema change):**
|
||||
- `ActionLedger::find_all` answers many (account, action) pairs in one statement: the
|
||||
schema v11 `find_region_action`, lease check included, applied to each pair through
|
||||
`unnest … CROSS JOIN LATERAL`.
|
||||
- `IntentAdmission::admit` holds an action that only the ledger can still refuse, and
|
||||
one `verify` per poll confirms every waiting action with one request. Its receipt is
|
||||
still sent in the same poll.
|
||||
- `committed` asks once per commit.
|
||||
- The store cost is now at most one round trip per poll plus one per commit, whatever
|
||||
the number of sessions or actions.
|
||||
- **Next:** a fifth run with this fix, then the declaration.
|
||||
|
||||
Reference in New Issue
Block a user