perf(server-ng): cap sealed-segment read handles with per-partition LRU - #3806
Merged
Conversation
hubcio
force-pushed
the
feat/server-ng-sealed-read-lru
branch
from
August 3, 2026 09:35
b9b41fb to
cff1ba3
Compare
A lone consumer crossing a sealed segment degraded to full-segment scans: rotation drops the writer and the resident index, so every poll re-opened the file and scanned from byte 0. Sealed segments now share a per-partition read-state handle caching the read fd and the sparse index reloaded from the .index file, capped by an LRU so descriptors stay bounded. Shard allocation defaults back to numa:auto now that multi-shard server-ng is stable; the previous single-shard default collapsed all work onto one core. A reloaded index materializes only under a byte cap; a denser one (an aggressive flush cadence tracks every message) is binary-searched on file, so a poll never reads or pins an unbounded index. Purge wipes the shared read state in place, so a poll suspended across it fails closed on the recreated files instead of serving purged data via a stale fd.
hubcio
force-pushed
the
feat/server-ng-sealed-read-lru
branch
from
August 3, 2026 09:36
cff1ba3 to
0a1759e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3806 +/- ##
=============================================
- Coverage 76.01% 32.84% -43.17%
Complexity 969 969
=============================================
Files 1325 1323 -2
Lines 162380 141977 -20403
Branches 135260 114935 -20325
=============================================
- Hits 123427 46637 -76790
- Misses 35291 94127 +58836
+ Partials 3662 1213 -2449
🚀 New features to boost your workflow:
|
numinnex
approved these changes
Aug 4, 2026
numinnex
approved these changes
Aug 4, 2026
spetz
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A lone consumer crossing a sealed segment degraded to full-segment
scans: rotation drops the writer and the resident index, so every poll
re-opened the file and scanned from byte 0. Sealed segments now share
a per-partition read-state handle caching the read fd and the sparse
index reloaded from the .index file, capped by an LRU so descriptors
stay bounded.
Shard allocation defaults back to numa:auto now that multi-shard
server-ng is stable; the previous single-shard default collapsed all
work onto one core.
This is half of the single-node latency parity work; the produce-side
single-pass batch checksum change lives in #3746.