Joseph Doherty
6d754635e7
feat: add bounded write cache with TTL eviction and background flush (Gap 1.8)
Add WriteCacheManager inner class to FileStore with ConcurrentDictionary-based
tracking of per-block write sizes and timestamps, a PeriodicTimer (500ms tick)
background eviction loop, TTL-based expiry, and size-cap enforcement. Add
TrackWrite/TrackWriteAt/EvictBlock/FlushAllAsync/DisposeAsync API. Integrate
into FileStore constructor, AppendAsync, StoreMsg, StoreRawMsg, and RotateBlock.
Add MaxCacheSize/CacheExpiry options to FileStoreOptions. 12 new tests cover
size tracking, TTL eviction, size-cap eviction, flush-all, and integration paths.
Reference: golang/nats-server/server/filestore.go:4443 (setupWriteCache),
golang/nats-server/server/filestore.go:6148 (expireCache).
2026-02-25 08:12:06 -05:00
..
2026-02-24 15:22:22 -05:00
2026-02-25 02:08:37 -05:00
2026-02-25 02:23:02 -05:00
2026-02-24 15:41:35 -05:00
2026-02-25 08:12:06 -05:00
2026-02-23 19:55:31 -05:00
2026-02-25 02:25:39 -05:00
2026-02-24 06:47:17 -05:00
2026-02-23 13:43:14 -05:00
2026-02-23 22:35:06 -05:00
2026-02-23 13:43:14 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 22:35:06 -05:00
2026-02-23 13:43:14 -05:00
2026-02-24 06:47:17 -05:00
2026-02-23 22:35:06 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 15:03:35 -05:00
2026-02-23 13:43:14 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 13:43:14 -05:00
2026-02-24 06:47:17 -05:00
2026-02-24 12:39:32 -05:00
2026-02-23 13:08:52 -05:00
2026-02-24 12:39:32 -05:00
2026-02-23 14:51:30 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 14:51:30 -05:00
2026-02-23 13:43:14 -05:00
2026-02-24 16:52:15 -05:00
2026-02-23 14:54:30 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 14:50:18 -05:00
2026-02-24 06:47:17 -05:00
2026-02-23 22:35:06 -05:00
2026-02-23 14:54:30 -05:00
2026-02-23 13:43:14 -05:00
2026-02-23 14:47:24 -05:00
2026-02-24 06:03:46 -05:00
2026-02-24 23:59:37 -05:00
2026-02-24 23:59:37 -05:00
2026-02-24 23:59:37 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 13:08:52 -05:00
2026-02-23 13:43:14 -05:00
2026-02-24 22:05:13 -05:00
2026-02-24 20:58:14 -05:00
2026-02-24 20:58:18 -05:00
2026-02-24 20:38:13 -05:00
2026-02-24 22:05:13 -05:00
2026-02-24 19:39:40 -05:00
2026-02-23 19:55:31 -05:00
2026-02-23 19:55:31 -05:00
2026-02-23 19:55:31 -05:00