{"record":{"id":"aba3f3f489b7d821","repo":"databendlabs/databend","slug":"unsupported-state-machine-entry-at-line","errorCode":null,"errorMessage":"unsupported state machine entry at line {}: {:?}","messagePattern":"unsupported state machine entry at line (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/process/src/filter_tenant.rs","lineNumber":229,"sourceCode":"            }\n\n            let kind = match entry {\n                RaftStoreEntry::GenericKV { key, value } => StateKind::GenericKV { key, value },\n                RaftStoreEntry::Expire { value, .. } => StateKind::Expire { key: value.key },\n                RaftStoreEntry::DataHeader { .. } => StateKind::System {\n                    label: \"state-machine-data-header\".to_string(),\n                },\n                RaftStoreEntry::Nodes { key, .. } => StateKind::System {\n                    label: format!(\"node:{key}\"),\n                },\n                RaftStoreEntry::StateMachineMeta { key, .. } => StateKind::System {\n                    label: format!(\"state-machine-meta:{key:?}\"),\n                },\n                RaftStoreEntry::Sequences { key, .. } => StateKind::System {\n                    label: format!(\"sequence:{key}\"),\n                },\n                other => {\n                    anyhow::bail!(\n                        \"unsupported state machine entry at line {}: {:?}\",\n                        line_no,\n                        other\n                    );\n                }\n            };\n\n            dump.state_lines.push(StateLine {\n                line_no,\n                line,\n                kind,\n                mark: None,\n            });\n            dump.report.state_machine_lines += 1;\n        }\n\n        Ok(dump)\n    }","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/process/src/filter_tenant.rs#L211-L247","documentation":"`filter_tenant` replays a serialized meta-service state machine dump line by line. Each line must parse into a recognized RaftStoreEntry variant that the tool knows how to classify. An unknown/unsupported entry variant bails with this error, including the line number and the offending entry debug output.","triggerScenarios":"Running filter_tenant against a meta snapshot/dump produced by a newer databend-meta that contains entry kinds (RaftStoreEntry variants) this tool's match statement does not handle.","commonSituations":"Version skew: dumping state from a recent meta version and filtering it with an older filter_tenant; hand-edited or corrupted dump files introducing unexpected entries.","solutions":["Use a filter_tenant build that matches (or is newer than) the databend-meta version that produced the dump.","Inspect the `{:?}` payload in the message to identify the unsupported entry type and add a match arm for it if you control the code.","Re-export the dump from the same version and retry."],"exampleFix":"// before\nother => {\n    anyhow::bail!(\"unsupported state machine entry at line {}: {:?}\", line_no, other);\n}\n// after\nRaftStoreEntry::Streams { key, .. } => StateKind::System {\n    label: format!(\"stream:{key}\"),\n},\nother => anyhow::bail!(\"unsupported state machine entry at line {}: {:?}\", line_no, other),","handlingStrategy":"validation","validationCode":"# pre-flight: check meta binary/dump version match\ndatabend-meta --version  # must be >= the version that produced the dump\n# and scan the dump for entry kinds the tool may not know\nsort -u dump.log | grep -oE 'RaftStoreEntry::[A-Za-z]+' | sort -u","typeGuard":"fn entry_supported(entry: &RaftStoreEntry) -> bool {\n    matches!(\n        entry,\n        RaftStoreEntry::GenericKV { .. }\n            | RaftStoreEntry::Sequences { .. }\n            | RaftStoreEntry::StateMachineMeta { .. }\n    )\n}","tryCatchPattern":"match load_lines(&path) {\n    Err(e) if e.to_string().starts_with(\"unsupported state machine entry\") => {\n        eprintln!(\"dump from newer meta version; upgrade filter_tenant\");\n        std::process::exit(3);\n    }\n    other => other?,\n}","preventionTips":["Use a filter_tenant build from the same release as the meta dump.","Never hand-merge or append dump files.","Preview the set of entry types in the dump before filtering.","Keep the variant match exhaustive with a logged error instead of bail when adding new kinds."],"tags":["meta","raft","parsing","compatibility"],"backgroundTag":"unsupported-enum-value","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}