{"record":{"id":"b8f95cf9b7e93650","repo":"juicedata/juicefs","slug":"no-available-cache-dir","errorCode":null,"errorMessage":"no available cache dir","messagePattern":"no available cache dir","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/chunk/cache_manager.go","lineNumber":264,"sourceCode":"}\n\nfunc (m *cacheManager) cache(key string, p *Page, force, dropCache bool) {\n\tstore := m.getStore(key)\n\tif store != nil {\n\t\tstore.cache(key, p, force, dropCache)\n\t}\n}\n\ntype ReadCloser interface {\n\t// io.Reader\n\tio.ReaderAt\n\tio.Closer\n}\n\nfunc (m *cacheManager) load(key string) (ReadCloser, error) {\n\tstore := m.getStore(key)\n\tif store == nil {\n\t\treturn nil, errors.New(\"no available cache dir\")\n\t}\n\tr, err := store.load(key)\n\tif err == errNotCached {\n\t\tlegacy := m.getStoreLegacy(key)\n\t\tif legacy != store && legacy != nil {\n\t\t\tr, err = legacy.load(key)\n\t\t}\n\t}\n\treturn r, err\n}\n\nfunc (m *cacheManager) exist(key string) (string, bool) {\n\tstore := m.getStore(key)\n\tif store == nil {\n\t\treturn \"\", false\n\t}\n\tloc := store.dir\n\texisted, err := store.exist(key)","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/chunk/cache_manager.go#L246-L282","documentation":"Returned by cacheManager.load when no cache store is currently available — every configured cache directory failed health checks or is in a backoff state, so there is nowhere to read a cached block from. Reads then fail at the cache layer and fall back to object storage by the caller's design.","triggerScenarios":"Thrown at pkg/chunk/cache_manager.go:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check cache dir free space, permissions, and errors in the mount log","Ensure --cache-dir points to a writable, healthy directory and enough free space remains (free-space ratio)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}