Repository navigation
Todo
Labels
kind/tech-requestNew feature or request
Description
Is there an existing issue for the same tech request?
- I have checked the existing issues.
Does this tech request not affect user experience?
- This tech request doesn't affect user experience.
What would you like to be added ?
File-service cache v2: one range-fill model for the disk cache and the index-file cache (design doc docs/design/20261126-fileservice-cache-v2.md).
- Every cached object is a set of immutable range files
r<off>-<size>_<obj>.mofscache; a whole object is the range[0, size). - All fills, whole or ranged, go through one registry and one planner. A read takes each piece from a cached range, a running fill or a new fill, in that order.
- Every object-storage request goes through the object storage server, which owns room, priority and a memory budget. A slow stream reader never holds request room.
- One publisher per cache writes and removes cache files, ordered per object.
- A whole-object fill takes its size from its first part's response; a 16 MiB first read of a smaller object returns it whole.
Why is this needed ?
The current disk cache has separate whole-file and range paths, versioned reads, and stream snapshot/restore, which have produced repeated integration bugs (stalls, leaked buffers, budget bypasses). Range fills also stop whole-object prefetch from thrashing the cache on column-subset scans.
Additional information
- Upgrade: cache files with old names are removed at startup, so the disk cache starts cold after the upgrade (decided). With
fix-missingon, main's whole-object files are kept until the restore has written their missing objects. - Cached objects are assumed immutable, as on main; the paths main writes again are audited in the design doc.
IsWholeObjectCachedmeans "the cached ranges cover[0, size)".- Decisions (2026-12-01):
- The configured
max-conns-per-host/concurrencyhave a floor of 64: 1 to 63 is a misconfiguration and fails startup; the object storage server itself has no floor. max-conns-per-host/concurrencyin a SQL path'ss3-optscap each file service made for that path (as on main), from 1 up to the configuredmax-conns-per-host; a larger value is rejected.- A server's background share is half its room, rounded down; with a room of 1 a background request runs as a foreground one.
- A stream reads object storage in parts of at most 8 MiB into one buffer it owns, outside the memory budget; a part read ahead is charged and taken only when it fits; each part reads the version of the first.
IndexFileObjectnever comes withSkipAllCache; a read with both is outside the contract.
- The configured
Metadata
Metadata
Assignees
Labels
kind/tech-requestNew feature or request
Activity