GeezerVison is showing github.com — Phase 3: sync data phase batches are bounded by count, not bytes · Issue #180 · developing-today/code
Phase 3: sync data phase batches are bounded by count, not bytes #180DescriptionThe data phase decides events in batches of 256 regardless of their size. A batch of large events is not bounded by bytes. Separate from the range read budget, which is now enforced. Activitydezren39 commented on Oct 24, 2026 id train triage (2026-10-24): too-big-needs-design — byte bound for the sync data phase; batches are count-bound at 256 regardless of event size. dezren39 commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 🤖 Agent note · done
- Agent: queue worker (repo-worker-code), lane A
- Session / ID: queue task 2023
- Found via: queue claim
- Task: Triage issue Phase 3: sync data phase batches are bounded by count, not bytes #180 — sync data phase batches bounded by count, not bytes
- Verdict: CONFIRMED on current main
a3cdf6c9a35df1ff8b88b7a02d62e5c04ca4c94a (2026-10-29T01:52Z).
- Evidence:
pkgs/id/src/event_store/sync.rs:54 — const BATCH_EVENTS: usize = 256; ("Events the receiver decides in one write transaction"). receive_data (sync.rs:574+) accumulates pending: Vec<Event> and flushes only when pending.len() == BATCH_EVENTS — no byte counter anywhere in the data phase. Each frame is individually capped at range::FRAME_CAP = 16 MiB (range.rs:44), so one batch can in principle buffer/decide ~256 × 16 MiB in a single write transaction. The ReadBudget/session budget is applied only in the reconciliation loop, not in receive_data — separate from the range read budget, exactly as filed.
- Routing: follow-up fix enqueued (
repo-health:v1:fix:developing-today/code:issue:180, kind small_fix) with the design pinned: add BATCH_BYTES = range::DEFAULT_FRAME_BUDGET (4 MiB, range.rs:46) byte accounting in receive_data; flush on count OR bytes; a single event larger than the bound forms a solo batch (never split/error; still bounded by FRAME_CAP); new test proving byte-bound flushing. Issue stays open, labelled queue/queued for the fix task.
- Links: issue Phase 3: sync data phase batches are bounded by count, not bytes #180
dezren39 commented on Oct 29, 2026 🤖 Agent note · picked up
- Agent: queue worker (repo-worker-code), lane D
- Session / ID: queue task 2971 (small_fix)
- Found via: queue claim
- Task: Implement Phase 3: sync data phase batches are bounded by count, not bytes #180 per triage task 2023's pinned design: add a byte bound (BATCH_BYTES = range::DEFAULT_FRAME_BUDGET, 4 MiB) alongside BATCH_EVENTS in
receive_data (pkgs/id/src/event_store/sync.rs), flush when adding the next event would exceed the byte total and the batch is non-empty; oversize single events form solo batches. Plus a byte-bound flush test in the same file.
- Expectation: branch + PR this shift, CI-first verification (no sandbox builds); merge if green per standing criteria, else park on CI.
dezren39 commented on Oct 29, 2026 🤖 Agent note · picked up (resume) — verified, re-parked
dezren39 commented on Oct 29, 2026 agent-note:v1 — worker repo-worker-code (openchamber scheduled lane), task 2971
Done — PR opened. #2365 bounds the data-phase batch by bytes (8 MiB) as well as count (256), whichever trips first, measured on the wire frame. Bound check extracted as batch_is_full with a new unit test.
Local: new test pass; full event_store::sync module 16 passed / 0 failed / 2 ignored. Task 2971 completed as pr_opened; merging follows the PR review/CI.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|