Review group commit in production and record what it exposed - #266
Conversation
Group commit works: journal_hold avg 5,452 -> 3,093 us and the lock's duty cycle 18.5% -> 14.5% at a comparable process age (NOT against the 29.6% from the 19h process — a mature process is not the comparator for a 44-minute one). PR #263 is separately confirmed by journal_stats_publishes at 0.80/s against a ~1/s target. The cost did not disappear, it became measurable. performed 30,075 + coalesced 30,506 = 60,581 waiters exactly, 11.4 fsync cycles/s is one per 88 ms, and 11.4 x 88 ms is the whole second — the commit pipeline runs at ~100% duty, so every arrival queues. block.journal_commit_wait averages 362 ms with a 10.7 s max, on the pre-ack path. The ~2x coalescing is OPTIMAL for arrival-rate x fsync-duration, so batching harder buys nothing; the lever is cost per commit. Three findings recorded: the deploy pipeline stranding merged code (observed live on #262, second instance after #251, fixed by #258); unbounded growth of Complete task history driving compact() under the global mutex; and the no-op rollup skip being defeated by restart frequency, which raises the value of the content-fingerprint tag follow-up.
|
Reviewed. This is a docs-only PR (single new file, Fact-check against the codebase — all correct:
One gap worth a mention: the summary table reports Strengths:
Suggestion: items 1–3 under "New findings" read like real bugs/gaps (unbounded journal growth, deploy pipeline silently stranding rollouts) rather than just narrative — if they aren't already tracked as issues/follow-up PRs, it'd be worth filing them so they don't get lost inside a dated plan doc. No blocking issues — good to merge as documentation. |
#262 went live at 10:36Z once #258's merge pushed a non-ignored path — a docs merge deploys nothing, so stranded code needs a code push to land. At 31 minutes: 8 obsolete base files proven reproduced (no futile rebuild minted), 19 not (minted as before), base_generation_unverified = 15 retries over those 19 files. rollup_published_empty_over_full_base stayed 0 and rollup_median_contiguous_days stayed 30 — the silent-short-publish failure mode this change risked did not occur.
|
Reviewed. This is a docs-only PR (one new file, Verification against the codebase I checked the claims that are falsifiable against source, and all of them hold up:
Minor notes (non-blocking)
Overall: the technical claims about code behavior are accurate and well-sourced, the arithmetic is internally consistent, and the PR attributions match actual merge state. No code/security/test-coverage concerns since this changes no code. Nice level of rigor distinguishing the two conflated wins (#263 vs. group commit) and correctly flagging PR #265 as the next lever rather than overselling batching. 🤖 Generated with Claude Code |
Docs only.
Group commit works
journal_hold.avg_usjournal_holdduty cyclejournal_stats_publishes_totalTwo wins, not one, and they should not be conflated: #263 removed the full-journal rescan (the 0.80/s confirms it), group commit moved the
fsyncout from under the global mutex (the duty-cycle drop).The comparison uses the 18.5%-at-34-min reading, not the 29.6% from the 19 h process in the disk-flood doc — a mature process is not the comparator for a 44-minute one.
The cost became measurable rather than disappearing
performed 30,075 + coalesced 30,506 = 60,581waiters exactly. 11.4 fsync cycles/s is one per 88 ms, and 11.4 × 88 ms is the whole second — the commit pipeline runs at ~100% duty, so every arrival queues.journal_commit_waitaverages 362 ms, max 10.7 s, on the pre-ack path.The ~2x coalescing is optimal, not disappointing: at 23 arrivals/s a batch can only contain the ~2 that arrive per 88 ms cycle. Batching harder buys nothing — the lever is cost per commit, which is PR #265.
Three new findings
Build and Deploygreen at 10:08:55Z, log endsA newer master commit superseded this rollout; production is unchanged.Superseded by two docs-only pushes.UpdatedAt=09:39:25Z— over an hour stranded, green job, nothing reporting it. Second instance after Weight each backfill project's share by its uncovered backlog #251. Fixed by Do not let a docs-only merge cancel a code deploy #258, merged today after sitting open since 09-10.tasks_complete71,399 (09-11) → 78,907 (today); nothing prunes Complete tasks, andcompact()rewrites the whole snapshot under the global mutex at a size tracking history rather than load.content_fp: None— and production restarted three times in two and a half hours today. This makes the content-fingerprint tag follow-up worth considerably more than it looked when written.🤖 Generated with Claude Code