Title: impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on) · Issue #8239 · developing-today/code · GitHub
Open Graph Title: impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on) · Issue #8239 · developing-today/code
X Title: impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on) · Issue #8239 · developing-today/code
Description: Follow-on from task 12126 profiling (issue #7064, #557 remainder). Profiling verdict recorded on issue #7064: the many_worlds ack path is capped by per-append fdatasync — FileJournal::append (pkgs/id/src/world_store.rs) does write_all + ...
Open Graph Description: Follow-on from task 12126 profiling (issue #7064, #557 remainder). Profiling verdict recorded on issue #7064: the many_worlds ack path is capped by per-append fdatasync — FileJournal::append (pkgs/...
X Description: Follow-on from task 12126 profiling (issue #7064, #557 remainder). Profiling verdict recorded on issue #7064: the many_worlds ack path is capped by per-append fdatasync — FileJournal::append (pkgs/...
Opengraph URL: https://github.com/developing-today/code/issues/8239
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on)","articleBody":"Follow-on from task 12126 profiling (issue #7064, #557 remainder). Profiling verdict recorded on issue #7064: the many_worlds ack path is capped by per-append fdatasync — `FileJournal::append` (pkgs/id/src/world_store.rs) does write_all + sync_data inline in the world actor's persist() (pkgs/id/src/world/actor.rs), unit cost 5.18 ms median sequential (repo bench journal_append_fsync), and concurrent fdatasync across 100 journal files on ext4 aggregates only ~0.85–1.5k syncs/s — below the 2,000/s offered load, so queueing delay, not service time, dominates p99 (5,650 ms vs 50 ms target).\n\n## Scope\n\nImplement ack batching (group commit) for world inputs so one sync_data covers a batch of queued inputs per world, preserving durability-before-ack for every command:\n\n- Journal: add `append_batch(&[JournalEntry])` to the WorldJournal trait (default = per-entry append loop); FileJournal override = one concatenated write_all + one sync_data, falling back to per-entry append when any entry requires a header version bump.\n- Actor: when the command loop receives an unsigned Input, drain already-queued unsigned Inputs (bounded, e.g. 64; stop at the first non-Input and hold it for the next loop iteration), stage them in order, persist the batch once, then commit and reply in order.\n\n## Invariants the implementation must respect (found in profiling, do not rediscover)\n\n- `prepare_input` assigns sequence = core.sequence + 1 without advancing it: batch staging must assign sequences explicitly in order (a prepare-at-sequence variant) or commits fail \"prepared world event is stale\".\n- `ensure_uses_left` is checked at prepare time but `spend` happens at commit: a batch from one participant must account for staged spends, or it over-admits past the uses limit.\n- program.update runs before persist today; a mid-batch program rejection marks the program unhealthy and later inputs must see today's exact error semantics — stage in order, stop at the first failure, commit the staged prefix, and route the failed + remaining inputs through the single-command path.\n- append_transaction is NOT the batch primitive: it rewrites the whole journal via compact (O(journal size)) and exists for builder-install atomicity.\n\n## Acceptance\n\n- cargo test -p id --lib green (world actor + journal tests, plus new batch tests: batch of N inputs = N events, one sync; mid-batch program rejection semantics unchanged).\n- Full world_bench run on the reference laptop recorded in pkgs/id/benches/baseline.txt + BASELINES.md showing the many_worlds p99 movement vs the 5,650.792 ms line; issue #557 stays open until a recorded run shows target_met=true.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-10T20:33:20Z","url":"https://github.com/developing-today/code/issues/8239"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5868f722-d6c4-b404-e7eb-85501d2f229e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CEC8:107A1:9B93D1:CA542B:6B06349E |
| html-safe-nonce | 44c7d1a35d752573461fe61ec0fe6983b038a25ffa5799e901046facca079ec6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUM4OjEwN0ExOjlCOTNEMTpDQTU0MkI6NkIwNjM0OUUiLCJ2aXNpdG9yX2lkIjoiODUyMTc5NTY2Nzc4ODk2OTExOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | edaae3bade0b52aa7d0c1ed0b07e05d2deec8a9827135531a92fd8ca67c81f5c |
| hovercard-subject-tag | issue:6315304953 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/8239/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c321824c94c547182a0b67fe2b7a99c94367cb005461add5dda6a12c81e37da/developing-today/code/issues/8239 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c321824c94c547182a0b67fe2b7a99c94367cb005461add5dda6a12c81e37da/developing-today/code/issues/8239 |
| og:image:alt | Follow-on from task 12126 profiling (issue #7064, #557 remainder). Profiling verdict recorded on issue #7064: the many_worlds ack path is capped by per-append fdatasync — FileJournal::append (pkgs/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width