Repository navigation
v0.5.5
segment-buffer v0.5.5 — 2026-08-04
Non-breaking release: panic-free public API, live segment_count, segment_size_stats tuning primitive, scan-cache TOCTOU fix, strict Clippy lint architecture, and expanded concurrency-property coverage. No API break, no on-disk format change, no new dependency.
Highlights
- Panic-free public API —
for_each_fromno longer holds the buffer mutex across the user callback; the only panic path (assert_not_reentered) and theIterationGuardtype are gone. Re-entrant calls from inside a callback (append,stats,delete_acked, …) are now safe. - Fixed
iter_fromsequence-number bug with gaps —iter_fromnow delegates tofor_each_from, so returned(seq, item)pairs are correct when deleted segments leave gaps. - Live
segment_countinBufferStats— tracked incrementally alongsideapprox_disk_bytes, recalibrated bysync_disk_bytes. - New
segment_size_stats()— on-demand size distribution (count/min/max/mean/p50/p90) of on-disk segment files; the tuning primitive forFlushPolicy::Batch(N). - Scan-cache TOCTOU fix —
mtimeis now captured before the directory scan, so a concurrent rename cannot pair a stale post-rename mtime with a pre-rename segment list. - Strict Clippy lint architecture —
Cargo.tomldeniespedantic + nursery + restrictionlints; library code is fully clippy-clean under the strict set. - Expanded concurrency coverage — added
for_each_from/iter_fromproperty tests under concurrent delete/flush, a high-concurrencysegment_countstress test, and new loom tests for the scan-cache path.
Full changelog
See CHANGELOG.md.