Skip to content

v0.5.4

Choose a tag to compare

@LarsArtmann LarsArtmann released this 02 Aug 02:47
· 143 commits to master since this release

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 at batch_size, at interval only if at least min_batch items are pending, or unconditionally at max_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_from never 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_flush is a pure function; tests now call it directly with synthetic Duration values instead of thread::sleep. Eliminates all CI flakiness from wall-clock dependency.

  • SegmentConfig examples use Default::default() + field reassignment (works with #[non_exhaustive]).

Documentation

  • docs/PERFORMANCE.md tuning guide: BatchOrIntervalMin callout for low-throughput producers.

Full changelog: https://github.com/LarsArtmann/segment-buffer/blob/v0.5.4/CHANGELOG.md

💘 Generated with Crush