databendlabs/databend · error

unsupported state machine entry at line

Error message

unsupported state machine entry at line {}: {:?}

What it means

`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.

Solutions

  1. Use a filter_tenant build that matches (or is newer than) the databend-meta version that produced the dump.
  2. Inspect the `{:?}` payload in the message to identify the unsupported entry type and add a match arm for it if you control the code.
  3. Re-export the dump from the same version and retry.

Example fix

// before
other => {
    anyhow::bail!("unsupported state machine entry at line {}: {:?}", line_no, other);
}
// after
RaftStoreEntry::Streams { key, .. } => StateKind::System {
    label: format!("stream:{key}"),
},
other => anyhow::bail!("unsupported state machine entry at line {}: {:?}", line_no, other),
Defensive patterns

Strategy: validation

Validate before calling

# pre-flight: check meta binary/dump version match
databend-meta --version  # must be >= the version that produced the dump
# and scan the dump for entry kinds the tool may not know
sort -u dump.log | grep -oE 'RaftStoreEntry::[A-Za-z]+' | sort -u

Type guard

fn entry_supported(entry: &RaftStoreEntry) -> bool {
    matches!(
        entry,
        RaftStoreEntry::GenericKV { .. }
            | RaftStoreEntry::Sequences { .. }
            | RaftStoreEntry::StateMachineMeta { .. }
    )
}

Try / catch

match load_lines(&path) {
    Err(e) if e.to_string().starts_with("unsupported state machine entry") => {
        eprintln!("dump from newer meta version; upgrade filter_tenant");
        std::process::exit(3);
    }
    other => other?,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11). Data as JSON: /api/errors/aba3f3f489b7d821. Report an issue: GitHub.

Appendix: source

Thrown at src/meta/process/src/filter_tenant.rs:229

            }

            let kind = match entry {
                RaftStoreEntry::GenericKV { key, value } => StateKind::GenericKV { key, value },
                RaftStoreEntry::Expire { value, .. } => StateKind::Expire { key: value.key },
                RaftStoreEntry::DataHeader { .. } => StateKind::System {
                    label: "state-machine-data-header".to_string(),
                },
                RaftStoreEntry::Nodes { key, .. } => StateKind::System {
                    label: format!("node:{key}"),
                },
                RaftStoreEntry::StateMachineMeta { key, .. } => StateKind::System {
                    label: format!("state-machine-meta:{key:?}"),
                },
                RaftStoreEntry::Sequences { key, .. } => StateKind::System {
                    label: format!("sequence:{key}"),
                },
                other => {
                    anyhow::bail!(
                        "unsupported state machine entry at line {}: {:?}",
                        line_no,
                        other
                    );
                }
            };

            dump.state_lines.push(StateLine {
                line_no,
                line,
                kind,
                mark: None,
            });
            dump.report.state_machine_lines += 1;
        }

        Ok(dump)
    }

View on GitHub (pinned to 288d84d76e)