writeonce/database
shoney.arickathil 9fc439dd47 feat(db): the inline path takes the fatal rule, asymmetry documented — T3
databasev2 4 part A, task 3. Looks like a no-op; it is not — without it
the two write paths would disagree about what a failure means, which is
the unevenness the spec exists to remove.

- inline path (a statement already on shard 0) keeps its own barrier,
  batch size 1. It cannot hold a reply: it returns into its OWN fiber
  rather than unparking a requester, so batching it would need that fiber
  parked on the barrier — part B's machinery, deliberately out of part A
- the comment says so, and says why not to "fix" it, because the next
  reader will otherwise see an inconsistency and delete the commit
- the ordering assumption is written down: committing here is safe only
  because the drain commits unconditionally whenever anything is staged,
  so the buffer is empty when this runs. If that stops holding, this
  commit would make another statement's record durable early and ack it
  to the wrong writer
- staging and commit failures are fatal here too. The update arm's old
  comment admitted what it did — "RAM ahead of disk: trap, do not ack" —
  and that is now gone

WO_T_IO no longer appears anywhere in db.c: the write path cannot be
caught. Language-visible, and task 6 records it in the error catalogue.

Verified:

- just wovm-test: 36 suites 0 fail, cli_smoke OK
- WO_SHARDS=1 db-bench-quick: 85 checks 0 failures, crash.s1.0 800 acked
  rows present after kill -9 — the configuration that takes this path
  exclusively
- default shards: 85 checks 0 failures

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 09:32:34 +02:00
..
src feat(db): the inline path takes the fatal rule, asymmetry documented — T3 2026-08-28 09:32:34 +02:00