EMRY-004: SPSC event ring with drop-and-count backpressure #52
No reviewers
Labels
No labels
blocked
bug
compat
docs
documentation
duplicate
emry-cli
emry-core
emry-engine
emry-ingest
emry-py
emry-store
emry-tui
emry-web
enhancement
good first issue
gpu-compute
help wanted
hpc
infra
integrations
invalid
needs-design
P0-blocker
P1-core
P2-enhanced
P3-future
performance
pull-request
python
pytorch
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/emry!52
Loading…
Reference in a new issue
No description provided.
Delete branch "emry-004-ring-buffer"
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?
Closes EMRY-004 (#5). Branched off
main(no stacking).What
crates/emry-core/src/ring.rs—EventProducer/EventConsumerwrappingrtrb(lock-free SPSC),DEFAULT_CAPACITY= 65 536.Backpressure policy (design §3)
Observability never blocks training. On a full ring,
push()drops the event, increments a shared atomic counter, and returnsRingFull.dropped()is readable from both halves so the UI can surface loss.Verification
./scripts/pre-commit-rust.shgreen: fmt, clippy-D warnings, 26 tests, ring.rs 96% linesReview note
Reviewer flagged
Relaxedordering on the counter. KeptRelaxed(correct for a standalone counter — coherence + finite-time visibility cover the 'observe the count' goal; no happens-before edge needed since it guards no other memory) and documented the rationale inline so it isn't re-flagged.