{"record":{"id":"e0f5161390896143","repo":"quickwit-oss/quickwit","slug":"unsupported-split-fields-format-version-version","errorCode":null,"errorMessage":"unsupported split fields format version: {version_byte[0]}","messagePattern":"unsupported split fields format version: (.+?)","errorType":"exception","errorClass":"io::Error (InvalidData)","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-proto/src/search/mod.rs","lineNumber":256,"sourceCode":"\nimpl ListFieldsMetadata {\n    /// Serializes the entries: one version byte followed by the zstd-compressed protobuf\n    /// encoding of `Self`.\n    pub fn serialize(&self) -> Vec<u8> {\n        let payload = self.encode_to_vec();\n        let mut out = vec![FIELDS_METADATA_FORMAT_VERSION];\n        zstd::stream::copy_encode(&payload[..], &mut out, FIELDS_METADATA_COMPRESSION_LEVEL)\n            .expect(\"zstd encoding into `Vec<u8>` should not fail\");\n        out\n    }\n\n    /// Reads the format produced by [`Self::serialize`].\n    pub fn deserialize<R: Read>(mut reader: R) -> io::Result<Self> {\n        let mut version_byte = [0u8; 1];\n        reader.read_exact(&mut version_byte)?;\n\n        if version_byte[0] != FIELDS_METADATA_FORMAT_VERSION {\n            return Err(io::Error::new(\n                io::ErrorKind::InvalidData,\n                format!(\n                    \"unsupported split fields format version: {}\",\n                    version_byte[0]\n                ),\n            ));\n        }\n        let mut zstd_decoder = zstd::stream::read::Decoder::new(reader)?;\n        let mut decompressed = Vec::new();\n        zstd_decoder.read_to_end(&mut decompressed)?;\n\n        Self::decode(&decompressed[..])\n            .map_err(|error| io::Error::new(io::ErrorKind::InvalidData, error))\n    }\n}\n\nimpl ListFieldsEntry {\n    pub fn cmp_by_name_and_type(&self, other: &Self) -> Ordering {","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-proto/src/search/mod.rs#L238-L274","documentation":"ListFields-style split fields metadata is serialized with a single leading version byte. `deserialize` reads that byte and rejects any value other than FIELDS_METADATA_FORMAT_VERSION with InvalidData, since the rest of the wire format cannot be trusted to match the parser.","triggerScenarios":"Deserializing split fields metadata written by a different Quickwit version (different FIELDS_METADATA_FORMAT_VERSION), or feeding deserialize a payload without the version prefix (e.g. the raw zstd/protobuf body).","commonSituations":"Upgrading/downgrading Quickwit while old splits' field metadata persists in storage; manually reassembling the payload and dropping the version byte; writing custom tooling against the metadata format.","solutions":["Ensure the payload is the exact output of the matching SplitFieldsMetadata::serialize, version byte included.","Use a Quickwit version compatible with the metadata format stored on the splits.","Re-generate or re-index the splits whose metadata is in an unsupported format.","Log/inspect the version byte value to identify the writer version."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn fields_version_ok(first_byte: u8) -> bool {\n    first_byte == FIELDS_METADATA_FORMAT_VERSION\n}","typeGuard":null,"tryCatchPattern":"match SplitFieldsMetadata::deserialize(reader) {\n    Err(e) if e.to_string().contains(\"format version\") => {\n        // incompatible writer version: re-index or migrate the split metadata\n    }\n    other => other?,\n}","preventionTips":["Never strip the leading version byte when copying or transforming metadata payloads.","Pin reader/writer to the same quickwit-proto version.","Re-index splits whose metadata predates a format version bump."],"tags":["io","serialization","versioning","invalid-data"],"backgroundTag":"unsupported-enum-value","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}