22 ADRs: server-authoritative sight and single egress, per-recipient views/diffs, uniform nack, opaque ids, 32 px tile unit, wall switches/presets, see-over, thick walls, open-door gap, typed wall columns, proto 2, build order, zoom clamp, accepted status leak, player marker, chunked explored, slow-client policy, session/key split, closing message, character records, global lock, synchronous choice. Each links its tickets and its spec section.
30 lines
1.3 KiB
Markdown
30 lines
1.3 KiB
Markdown
# `synchronous=NORMAL`, with `FULL` around GM authoring
|
|
|
|
SQLite runs with `journal_mode=WAL` and `synchronous=NORMAL`, except that GM authoring transactions
|
|
(walls, scene changes, token create/update/remove) run with `FULL`. `NORMAL` cut the average commit
|
|
from 0.60 to 0.17 ms and server total from 1.16 to 0.74 ms with the tail unchanged, and a SIGKILL
|
|
loses nothing; a power loss can drop the last few commits but never corrupts. Positions and explored
|
|
cells are cheap to lose (the next refresh re-derives explored), while GM-authored walls and scenes
|
|
are expensive, so only authoring pays the `FULL` cost.
|
|
|
|
## Status
|
|
accepted
|
|
|
|
## Alternatives
|
|
- `FULL` everywhere: rejected, pays the cost on every move for no benefit the owner values.
|
|
- `NORMAL` everywhere: rejected, a power loss could silently drop authored content.
|
|
- Move persistence outside the lock: rejected (ADR-0021).
|
|
|
|
## Consequences
|
|
An ack follows COMMIT, so a client never sees state a crash can undo, except under a `NORMAL` power
|
|
loss, which is stated rather than hidden. The trade-off is explicit: ack-before-durable on power
|
|
loss for moves and explored. Wall and scene writes update memory only after COMMIT, so a failed
|
|
write leaves memory and DB identical. The two-commit pattern for explored under an authoring write
|
|
is accepted (ADR-0016).
|
|
|
|
## Tickets
|
|
Q12, #16.
|
|
|
|
## Spec
|
|
Current §4.4, §4.2.
|