Max statements one interactive write transaction may issue before the
round-trip guard fires. Every statement inside a withTransaction holds the
single primary write connection open for another edge→primary round-trip, so a
chatty interactive transaction is what the primary aborts as "Transaction
timed-out". A plain batch (executeBatch) is one round-trip regardless of how
many statements it carries and is never counted — the whole point is to push
chatty writes onto it. Set above the largest legitimate interactive
transaction; anything that grows with input size (a big attendee merge, a
per-leg ledger post) must prepare its reads outside the lock and apply its
writes as one batch instead. The current high-water mark is recreateTable
on attendee_answers: 8 DROP TRIGGER + 5 rebuild + 6 CREATE INDEX +
8 CREATE TRIGGER = 27 statements; the threshold sits above that.
Usage
import { TRANSACTION_ROUNDTRIP_THRESHOLD } from "doc.ts";