Keep the snapshot compaction replaces, and seed its test in one transaction #163
No reviewers
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda!163
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-15-stall"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task: NEC-15 — https://projectron.nerchure.com/tasks/15
Re-lands the checkpoint writer from PR #145, which
b6b264dtook out aftermain's run 676 timed out incheckpoints.test.ts › past the compaction threshold, through the WebSocket path. The first commit restores it unchanged, withconformance.mdregenerated. The rest explain the stall and fix it.It was the test, not the writer. The test seeded its document with 510 appends, each committed alone at
synchronous = FULLon the main thread. That is 510 fsyncs with the event loop blocked:Test timed out in 5000msat:271:3, main's exact oneThe fix seeds in one transaction, so one fsync. The seed is setup, not the path under test.
Left for reference:
checkpoint-soak.ymlandpackages/server/scripts/checkpoint-soak.mjs, dispatch-only likee2e-soak.yml. They loop the test on the runner, idle and beside N neighbours, and print a per-phase timeline and an fsync probe. The test prints its timeline only under the soak (CHECKPOINT_TIMELINE=1).Seen, not chased: with the seed fixed, connect → first compaction rose to about 220 ms idle and 0.7–1.7 s loaded. The likely cause is the writer thread's cold start, now that the first job arrives about 25 ms after the server starts rather than seconds later. That is unverified. It happens once per server start, and even the worst case stays well inside the 5 s budget.
Changelog
The server now keeps earlier versions of each note when it compacts its history, instead of discarding them.
🤖 Generated with Claude Code
https://claude.ai/code/session_0187PLDdwErbQsm6aZi7KXuH