Repository navigation
Description
Parent Issue
Parent issue: #32278
Detail of Subtask
Catalog ID: D16
Origin: A - Introduced by 4.2-to-main evolution or incomplete retirement on main
Evidence level: Local initialization behavior change reproduced
4.2 versus main: provenance
Main introduces an independent index-file cache enabled by the production SHARED launcher. The baseline skips ordinary disk-cache path initialization when that cache is disabled. Main's default embedded path does not set the same internal enablement flag.
Design problem, impact, and existing responsibility
Disabling ordinary disk capacity or enableDiskCache can still create -index-file. The default 8GiB is target capacity, not preallocation. An unwritable path fails initialization, changing the meaning of old disabling configurations and leaving a production-versus-test coverage gap.
Acceptance criteria
- Specify behavior and migration guidance for disk-capacity=1 and ordinary-cache disablement; disabling a cache avoids its initialization according to the contract.
- Production startup and embedded tests cover the same configuration contract, including missing/unwritable paths, full disk, close/restart, and workloads without index use.
- Measure actual disk usage, hits, and latency. Do not describe 8GiB as preallocation or disable functionality merely to hide initialization errors.
Describe implementation you've considered
Define independent cache switches, compatible defaults, and a total disk budget in existing fileservice configuration/construction. Make production/embedded differences explicit and testable. Avoid hidden cache creation and divergent defaults while retaining useful index-I/O behavior.
Additional information
Existing investigation and validation limits
A local overlay test disables ordinary disk cache and supplies /dev/null/unused-data-cache; main fileservice initialization fails with mkdir not a directory. Existing tests also confirm index cache can stay enabled when ordinary cache is disabled. The affected production configuration has not been reproduced through a complete CN process.
main investigation snapshot: cmd/mo-service/config.go:387; pkg/fileservice/cache.go:135; pkg/embed/config.go:355
4.2 baseline snapshot: pkg/fileservice/cache.go
The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.
Related existing work: #31051, #31772. Closed items identify implemented controls or historical context; they do not mean this subtask is already resolved.
Activity
[-][Subtask]: D16 [4.2→main] 明确索引文件缓存的启停与磁盘预算,统一正式和 embedded 初始化语义[/-][+][Subtask]: D16 [4.2-to-main] Make index-file cache enablement, disk budgets, and embedded defaults explicit[/+]MatrixAdventurer commentedon Nov 6, 2026
分级建议:severity/s2——旧「关闭磁盘缓存」配置语义在新 index-file cache 等默认下不再等效,正文已本地复现初始化行为变化,属升级兼容风险。
所属模块:pkg/fileservice(缓存初始化/默认值)。
疑似重复:未发现直接重复;相关 #32274、#30167(ENOSPC,open/s2)。
建议负责人:XuPeng-SH(assignee);fileservice 侧建议 cpegeric 参与。
本操作由LW授权的MOI智能体提交