{"record":{"id":"347d83b2032511fe","repo":"quickwit-oss/quickwit","slug":"missing-recovery-doc-mapping-uid","errorCode":null,"errorMessage":"missing recovery doc mapping UID","messagePattern":"missing recovery doc mapping UID","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-metastore/src/split_metadata.rs","lineNumber":244,"sourceCode":"            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    }\n\n    /// Creates a new instance of split metadata.\n    pub fn new(\n        split_id: SplitId,\n        index_uid: IndexUid,\n        partition_id: u64,\n        source_id: SourceId,\n        node_id: String,\n    ) -> Self {\n        Self {\n            split_id,\n            index_uid,\n            partition_id,\n            source_id,","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-metastore/src/split_metadata.rs#L226-L262","documentation":"Same reconstruction path as the missing index UID error, but for doc_mapping_uid: the persisted split metadata must carry the doc mapping UID that produced the split. When the optional field is absent during recovery, the constructor fails with this error to preserve the invariant that every split references its doc mapping version.","triggerScenarios":"Deserializing split metadata whose doc_mapping_uid field is missing (old format, hand-edited, or truncated record) while building SplitMetadata via the recovery constructor.","commonSituations":"Metastore backups restored from incompatible versions; corrupted JSONL metastore logs; manual cleanup that removed doc mapping UID fields.","solutions":["Restore doc_mapping_uid in the metadata record from an index metadata backup (index config's doc mapping UID).","Re-ingest/re-index the affected splits if the source metadata cannot be recovered.","Check file integrity — truncated records can end before optional fields."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before loading split metadata\nlet raw: serde_json::Value = serde_json::from_str(&text)?;\nif raw.get(\"doc_mapping_uid\").is_none() {\n    eprintln!(\"split metadata missing doc_mapping_uid; restore from index config\");\n}","typeGuard":null,"tryCatchPattern":"match SplitMetadata::try_from(raw) {\n    Err(e) if e.to_string().contains(\"missing recovery doc mapping UID\") => {\n        // recover doc_mapping_uid from the index metadata or quarantine the record\n    }\n    other => other?,\n}","preventionTips":["Back up index metadata (contains doc mapping UID) alongside split metadata.","Verify JSONL metastore records parse fully after any restore.","Avoid partial/truncated copies of metastore data."],"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"}