FileService and data caching¶
Baseline: v4.2.5. FileService provides file/object I/O. Caches contain reconstructible data rather than unique authoritative SQL state.
Read hierarchy¶
operator/Reader → file path + Offset + Size
→ memory / disk cache
→ available remote cached data
→ object storage
This describes layers, not a mandatory sequence for every request. I/O policy, configuration and path determine access. Remote cache GetCacheData RPCs return bytes for file ranges; they do not execute forwarded SQL.
Eviction, ownership and correctness¶
Memory and disk caches use fifocache implementations and should not universally be described as traditional LRU. Memory data has reference/release handling; disk caching manages files and capacity. Immutable objects support range caching, while upper-layer MVCC/Logtail still decides visibility.
Invariant: a cache hit replaces the corresponding read, not snapshot selection, deletion filtering or query semantics. Remote failures/misses follow fallback/error handling; cache hit ratios do not establish transaction success.
Scaling and performance¶
Additional CNs can spread sessions and supply distributed execution capacity. Actual remote execution depends on planning/placement. Observe remote cache hits separately from remote SQL fragments. A new CN may need synchronization and cache warming; one timing does not prove linear scaling.
Hold data, SQL, plan, CN, concurrency and storage constant for cold/warm comparisons. Inspect actual bytes, cache-layer hits, remote reads and CPU. Object metadata caches, file data caches and query results are different categories.
Diagnosis and experiments¶
Separate scan volume, deletion merging, cache misses, object storage and remote RPC. Retain Path/Offset/Size and service ID. Check correctness separately from latency after cache loss. Clear caches/change capacities only in an isolated experiment; do not delete database object files.
See CN scaling.