{"record":{"id":"62d1704319770ceb","repo":"FuelLabs/fuel-core","slug":"fragments-don-t-have-the-same-encoding-and-cannot","errorCode":null,"errorMessage":"Fragments don't have the same encoding and cannot be merged. Fragments: {a:?} and {b:?}","messagePattern":"Fragments don't have the same encoding and cannot be merged\\. Fragments: (.+?) and (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/chain-config/src/config/state/writer.rs","lineNumber":193,"sourceCode":"            #[cfg(feature = \"parquet\")]\n            (\n                FragmentData::Parquet {\n                    tables,\n                    compression,\n                },\n                FragmentData::Parquet {\n                    tables: their_tables,\n                    compression: their_compression,\n                },\n            ) => {\n                tables.extend(their_tables);\n                anyhow::ensure!(\n                    *compression == their_compression,\n                    \"Fragments use different compressions.\"\n                )\n            }\n            #[cfg(feature = \"parquet\")]\n            (a, b) => anyhow::bail!(\n                \"Fragments don't have the same encoding and cannot be merged. Fragments: {a:?} and {b:?}\"\n            ),\n        };\n\n        Ok(self)\n    }\n}\n\n#[derive(Debug, Clone)]\npub struct SnapshotFragment {\n    dir: PathBuf,\n    data: FragmentData,\n}\n\nimpl SnapshotFragment {\n    pub fn merge(mut self, fragment: Self) -> anyhow::Result<Self> {\n        self.data = self.data.merge(fragment.data)?;\n        Ok(self)","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/chain-config/src/config/state/writer.rs#L175-L211","documentation":"Fragment merging only understands (Parquet, Parquet) pairs; any other combination — e.g. a parquet fragment with a non-parquet fragment — fails with \"Fragments don't have the same encoding and cannot be merged. Fragments: {a:?} and {b:?}\" (crates/chain-config/src/config/state/writer.rs:193). The encodings are different container formats, so their tables cannot be concatenated. The Debug output in the message names both fragments' encodings.","triggerScenarios":"Merging a fragment written with the parquet feature against one written without it (e.g. a JSON-encoded fragment), i.e. any merge that is not Parquet+Parquet.","commonSituations":"Upgrading tooling so newer runs write parquet while older fragments predate the feature; binaries in the same pipeline built with different feature sets; mixing fragments from different tool versions.","solutions":["Regenerate all fragments with the same encoding (parquet is the modern default).","Ensure every process producing or merging fragments is built with the same feature flags (parquet enabled).","Do not merge fragments across tool versions; re-encode old fragments before merging."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"match fragment_a.merge(fragment_b) {\n    Err(e) if e.to_string().contains(\"cannot be merged\") => {\n        // encodings differ (e.g. parquet vs non-parquet) → re-encode one side, then retry\n        reencode_to_parquet(&fragment_b)?;\n    }\n    other => other?,\n}","preventionTips":["Produce all fragments with the same encoding; parquet is the default under the parquet feature.","Build every tool in the snapshot pipeline with the same feature flags.","Do not merge fragments from different tool versions; regenerate instead."],"tags":["rust","fuel-core","chain-config","snapshot","encoding","merge"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}