{"record":{"id":"28e08726aa80d1a2","repo":"quickwit-oss/quickwit","slug":"missing-recovery-index-uid","errorCode":null,"errorMessage":"missing recovery index UID","messagePattern":"missing recovery index UID","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-metastore/src/split_metadata.rs","lineNumber":230,"sourceCode":"            (None, None) => None,\n            (Some(start), Some(end)) => {\n                bail!(\"invalid recovery time range: start {start} is after end {end}\")\n            }\n            _ => bail!(\"recovery time range must contain both start and end\"),\n        };\n        ensure!(\n            !footer_offsets.is_empty(),\n            \"invalid recovery footer offsets\"\n        );\n        let maturity = match maturation_period_millis {\n            Some(maturation_period_millis) => SplitMaturity::Immature {\n                maturation_period: Duration::from_millis(maturation_period_millis),\n            },\n            None => SplitMaturity::Mature,\n        };\n        let split_metadata = Self {\n            split_id: split_id.into(),\n            index_uid: index_uid.ok_or_else(|| anyhow::anyhow!(\"missing recovery index UID\"))?,\n            partition_id,\n            source_id,\n            node_id,\n            num_docs: num_docs.try_into()?,\n            uncompressed_docs_size_in_bytes: uncompressed_docs_size_bytes,\n            time_range,\n            create_timestamp,\n            maturity,\n            tags: tags.into_iter().collect(),\n            footer_offsets,\n            delete_opstamp,\n            num_merge_ops: num_merge_ops.try_into()?,\n            doc_mapping_uid: doc_mapping_uid\n                .ok_or_else(|| anyhow::anyhow!(\"missing recovery doc mapping UID\"))?,\n        };\n        let parent_split_ids = parent_split_ids.into_iter().map(SplitId::from).collect();\n        Ok((split_metadata, parent_split_ids))\n    }","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-metastore/src/split_metadata.rs#L212-L248","documentation":"During deserialization/recovery of SplitMetadata from its backward-compatible field-by-field format, index_uid is optional in the wire format but mandatory on the struct. When the persisted split metadata lacks an index UID, the constructor rejects the data with this error instead of silently producing a split that cannot be attributed to any index.","triggerScenarios":"Loading a split metadata file (or JSONL metastore record) written by an old Quickwit version or corrupted such that the index_uid field is absent when Self::from parts reconstructs the metadata.","commonSituations":"Restoring metastore data from a partial backup; manually edited split metadata files; migrating data from a version that serialized index UID elsewhere.","solutions":["Restore the missing index_uid in the split metadata record (from the index directory layout, metastore backup, or the split's .quickwit/ metadata).","Verify the integrity of the metastore/split files — truncation can drop trailing fields.","If the split is unrecoverable, delete the orphan split record so the metastore stops trying to load it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before loading split metadata\nlet raw: serde_json::Value = serde_json::from_str(&text)?;\nif raw.get(\"index_uid\").is_none() {\n    eprintln!(\"split metadata missing index_uid; restore from backup\");\n}","typeGuard":null,"tryCatchPattern":"match SplitMetadata::try_from(raw) {\n    Err(e) if e.to_string().contains(\"missing recovery index UID\") => {\n        // quarantine the record, restore index_uid from index metadata\n    }\n    other => other?,\n}","preventionTips":["Keep metastore backups and verify integrity after restores.","Never hand-edit split metadata records.","Run version-compatibility checks before migrating metastore data across Quickwit versions."],"tags":["metastore","deserialization","split-metadata","data-corruption"],"backgroundTag":"missing-required-argument","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"}