{"record":{"id":"77182d01c3ce68b6","repo":"quickwit-oss/quickwit","slug":"split-folder-name-should-match-the-format-split","errorCode":null,"errorMessage":"split folder name should match the format `<split_id>.split`: got `{}`","messagePattern":"split folder name should match the format `<split_id>\\.split`: got `(.+?)`","errorType":"exception","errorClass":"io::Error (InvalidInput)","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-indexing/src/split_store/indexing_split_cache.rs","lineNumber":467,"sourceCode":"        let mut read_dir = tokio::fs::read_dir(&split_store_folder).await?;\n        while let Some(dir_entry) = read_dir.next_entry().await? {\n            let metadata = dir_entry.metadata().await?;\n            let dir_path: PathBuf = dir_entry.path();\n\n            if metadata.is_file() {\n                warn!(\n                    \"unexpected file found in split cache directory: `{}`\",\n                    dir_path.display()\n                );\n                continue;\n            }\n\n            let split_id = split_id_from_split_folder(&dir_path).ok_or_else(|| {\n                let error_msg = format!(\n                    \"split folder name should match the format `<split_id>.split`: got `{}`\",\n                    dir_path.display()\n                );\n                io::Error::new(io::ErrorKind::InvalidInput, error_msg)\n            })?;\n\n            let split_folder = SplitFolder::create(split_id, &dir_entry.path()).await?;\n            split_folders.push(split_folder);\n        }\n\n        let mut inner_local_split_store = InnerSplitCache {\n            split_store_folder: split_store_folder.clone(),\n            split_registry: SplitFolderRegistry::with_quota(space_quota),\n        };\n\n        split_folders.sort_by_key(|split_folder| split_folder.created_at);\n\n        // We record all `split_folder`, sorted by `creation_time`.\n        for split_folder in split_folders {\n            let split_id = split_folder.split_id.clone();\n            if !inner_local_split_store\n                .make_room_and_record_split(split_folder)","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-indexing/src/split_store/indexing_split_cache.rs#L449-L485","documentation":"While restoring the split cache from disk, open() iterates subdirectories of the cache and derives the split id from the folder name via split_id_from_split_folder, which expects the `<split_id>.split` format. Any directory whose name does not match this convention triggers an InvalidInput I/O error.","triggerScenarios":"Starting an indexer whose cache directory (default per indexing directory setting, e.g. ./data/indexing) contains a subdirectory not named `<split_id>.split`, such as a leftover temp folder, a manually created directory, or an old-format split folder.","commonSituations":"Manual cleanup or copying of the indexing cache directory left stray folders; upgrades changing folder naming; operators unpacking splits by hand into the cache directory.","solutions":["Inspect the cache directory and rename the offending folder to `<split_id>.split`, or remove it if it is stale.","Only place split folders produced by Quickwit in the cache directory; move extracted/migrated folders elsewhere.","If the data is stale/recoverable from storage, wipe the cache directory and let Quickwit re-download splits."],"exampleFix":"// cache dir contains: 03F8QW2X/ (invalid)\nmv data/indexing/03F8QW2X data/indexing/03F8QW2X.split\n// or delete the stale folder\nrm -r data/indexing/03F8QW2X","handlingStrategy":"validation","validationCode":"fn is_valid_split_folder(name: &str) -> bool {\n    let Some(stem) = name.strip_suffix(\".split\") else { return false };\n    !stem.is_empty()\n}\n// before booting the indexer, scan the cache dir:\n// for entry in fs::read_dir(cache_dir)? { assert!(is_valid_split_folder(entry.file_name())) }","typeGuard":"fn split_id_from_name(name: &str) -> Option<&str> {\n    name.strip_suffix(\".split\").filter(|s| !s.is_empty())\n}","tryCatchPattern":"match cache.open().await {\n    Ok(cache) => cache,\n    Err(e) if format!(\"{}\").contains(\"split folder name should match\") => {\n        // clean invalid folders, then retry\n        clean_invalid_folders(cache_dir)?;\n        cache.open().await?\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Never manually create or rename directories inside the indexing cache directory","Treat the cache directory as disposable: recover stale content from object storage instead of hand-editing","Run a pre-start check that validates folder naming in the cache directory","Use only Quickwit tooling to move or unpack split folders"],"tags":["filesystem","naming-convention","startup"],"backgroundTag":"invalid-identifier-format","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}