GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(world): selectable journal ack modes — sync default, batched, async (#557) by dezren39 · Pull Request #12746 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements Drewry's 2026-11-22 decision on #557 (comment 7087900634): async/batched input acknowledgement as selectable modes — not a default flip. The documented durability contract stays the default.

Design

Design record (pkgs/id documentation protocol, written before the code): doc/2026-11-23T00-24-00Z_design_journal_ack_modes/.

  • JournalAckMode (world/journal.rs, re-exported from crate::world): Sync (default — acknowledged ⇒ durable, byte-for-byte the old behaviour), Batched (write on ack, one sync per JOURNAL_ACK_BATCH_SIZE = 64 appends; loss bounded to the unsynced tail), Async (no sync on the ack path; durability only at sync points). The tradeoff text for all three durability levers sits on the enum where the modes are defined: ack timing (this change), the fdatasync primitive (unchanged), and group commit — syncfs sharing measured-and-rejected on three filesystems (runner ~2.5×, btrfs ~1.26×, laptop ext4 1.07× median / 1.44× p99 vs fdatasync) and fdatasync group commit measured at zero queueing headroom. The fsync/syncfs axis is discussed in the same pass, per the decision.
  • WorldJournal gains ack_mode() and sync() with Sync/no-op defaults — every existing journal (including all test doubles) keeps the old contract without code changes.
  • FileJournal: appends route through append_write per mode; unsynced_appends() exposes exactly the acknowledged history an OS crash could still lose (always 0 in Sync). Transactions and compaction remain full sync points in every mode. The journal format and recovery scan are untouched, so reopening under a different mode replays identically — a mode changes what future acks promise, never what existing bytes mean.
  • Config surface: WorldLimits::journal_ack_mode (default Sync), plumbed through open_world to FileJournal::open_with_ack_mode. Existing open/open_with_max_bytes delegate with Sync.

Tests (laptop venue, under fleet-build-lock)

Fail-before: the six new tests applied alone to pristine origin/main fail to compile — 26 errors (no JournalAckMode, open_with_ack_mode, unsynced_appends, JOURNAL_ACK_BATCH_SIZE, trait ack_mode/sync).

Pass-after (this branch):

  • cargo test -p id-worlds --lib journal_ — 66 passed, 0 failed, including the five new mode tests: default mode writes the exact pre-change byte image and never leaves unsynced_appends at zero unobserved; async acks before any sync and an explicit sync() flushes; batched syncs exactly at the 64-append bound counted across append/append_batch; a journal written async replays identically under sync/batched (and vice versa); compaction is a sync point in async mode.
  • cargo test -p id-worlds --lib world_store:: — 51 passed, 0 failed (the whole store module, incl. the open_world path).
  • cargo test -p id-worlds --lib world_limits_default — 1 passed (WorldLimits default is Sync).
  • cargo fmt -p id-worlds -- --check clean (one assert reflowed).
  • Clippy: not run to completion — the laptop's shared broker target dir fails clippy with E0514 (clippy-driver vs cached rlib toolchain mismatch), the identical failure the id: F12.5 first new providers — kv, blob, http.fetch, notify #1062 lane recorded; no new warnings reference the touched code in the test build.

Not in this PR

  • No performance claim. The modes are opt-in; the default path is unchanged. The deciding measurement for id(world): F12.12 many worlds per node: 1,000 idle / 100 active with a per-world memory budget #557's criterion remains the unloaded laptop re-run, still outstanding — recorded in the new BASELINES.md section rather than substituted with a loaded number.
  • No new dependencies.

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
felix and others added 4 commits November 23, 2026 00:28
felix
id(world): selectable journal ack modes — sync default, batched, async (
5ba18c4
#557)

Implements Drewry's 2026-11-22 decision: async/batched input
acknowledgement as selectable modes, not a default flip.

- JournalAckMode (world/journal.rs): Sync (default, the original
  durability-before-ack contract, byte-for-byte), Batched (one sync
  per JOURNAL_ACK_BATCH_SIZE=64 appends; loss bounded to the unsynced
  tail), Async (no sync on the ack path; durability only at sync
  points). The tradeoff text for all three levers — ack timing, the
  fdatasync primitive, and the measured-and-rejected syncfs/fdatasync
  group commit — lives on the enum where the modes are defined.
- WorldJournal gains ack_mode() and sync() with Sync/no-op defaults,
  so every existing journal keeps the old contract.
- FileJournal implements the modes: appends write through
  append_write, unsynced_appends() exposes exactly the acknowledged
  history an OS crash could still lose, and compaction/transactions
  remain full sync points in every mode. The journal format and
  recovery scan are unchanged, so a mode switch on reopen replays
  identically.
- Config surface: WorldLimits::journal_ack_mode (default Sync),
  plumbed through open_world to FileJournal::open_with_ack_mode.
- Design record per the pkgs/id documentation protocol:
  doc/2026-11-23T00-24-00Z_design_journal_ack_modes.
- Tests: default-mode byte-for-byte disk image, async ack-before-sync
  + sync-point flush, batched sync exactly at the batch bound across
  append/append_batch, cross-mode reopen replay identity, compaction
  as a sync point, WorldLimits default.

No new dependencies. No performance claim: the unloaded laptop
re-run remains the outstanding #557 baseline.
@dezren39
style(id): rustfmt the ack-mode trait assert
5eb7f75
felix
docs(id): record ack-mode landing in BASELINES, no new measurement (#557
63f62cf
)
felix
docs(id): make the BASELINES design-doc path repo-root explicit (#557)
d3473df
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 00:57
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2e9558bc-ea4d-433c-95fe-5a54a8bbb640
Commits

Reviewing files that changed from the base of the PR and between e6268f8 and d3473df.

Files selected for processing: 5

  • doc/2026-11-23T00-24-00Z_design_journal_ack_modes/2026-11-23T00-24-00Z_design_journal_ack_modes.md
  • pkgs/id/benches/BASELINES.md
  • pkgs/id/crates/id-worlds/src/world/journal.rs
  • pkgs/id/crates/id-worlds/src/world/mod.rs
  • pkgs/id/crates/id-worlds/src/world_store.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 23, 2026
id(world): F12.12 many worlds per node: 1,000 idle / 100 active with a per-world memory budget #557
Open
2 of 3 tasks
@dezren39
dezren39 merged commit cc8482a into main Nov 23, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the felix/557-ack-modes branch November 23, 2026 00:58
@dezren39 dezren39 added the audit:no-issue No spawning issue; judged on stated intent label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:no-issue No spawning issue; judged on stated intent

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.