Repository navigation
v0.5.4
Non-breaking batch: a new FlushPolicy variant for tiny-segment suppression, a counting-allocator regression guard, expanded concurrency tests, and broader documentation. No API break, no on-disk format change, no new dependency.
Added
-
FlushPolicy::BatchOrIntervalMin— suppresses tiny segment files during low-throughput periods. Flushes immediately atbatch_size, atintervalonly if at leastmin_batchitems are pending, or unconditionally atmax_interval(safety valve). Builder convenience setter with debug-assert validation. Covered by pure decision tests, an integration test, and an exhaustive proptest. -
Allocation-count regression guard (
tests/alloc_guard.rs) — machine-independent heap-allocation budgets on hot paths (warm append, read_from, stats, append+flush). -
MPMC boundary stress tests — proves
read_fromnever returns corrupt data under concurrent delete/flush. -
Domain Language expansions — consistency model, tradeoffs matrix, schema evolution guide.
Changed
-
FlushPolicy time-based tests rewritten as pure decision tests —
should_flushis a pure function; tests now call it directly with syntheticDurationvalues instead ofthread::sleep. Eliminates all CI flakiness from wall-clock dependency. -
SegmentConfigexamples useDefault::default()+ field reassignment (works with#[non_exhaustive]).
Documentation
docs/PERFORMANCE.mdtuning guide:BatchOrIntervalMincallout for low-throughput producers.
Full changelog: https://github.com/LarsArtmann/segment-buffer/blob/v0.5.4/CHANGELOG.md
💘 Generated with Crush