databendlabs/databend · error

importing from V001 is not supported since 2024-06-12…

Error message

importing from V001 is not supported since 2024-06-12, please use an older version databend-metactl to import from V001

What it means

Raised in import_lines when the exported meta snapshot uses the V001 data version. Support for importing V001 snapshots ended on 2024-06-12; the current databend-metactl rejects the import and directs the user to an older metactl version compatible with that format.

Solutions

  1. Use a databend-metactl release from before 2024-06-12 to import the V001 dump
  2. Re-export data from the source cluster using a current version producing V002+ format
  3. Verify the dump version header before planning the restore
Defensive patterns

Strategy: validation

Validate before calling

let version = reading::read_version(&mut lines.peekable())?;
if matches!(version, DataVersion::V0 | DataVersion::V001) {
    eprintln!("legacy dump: use an older databend-metactl release");
}

Try / catch

match import_lines(raft_config, lines).await {
    Err(e) if e.to_string().contains("V001 is not supported") => eprintln!("use pre-2024-06 metactl or re-export as V002+"),
    other => other,
}

Prevention

When it happens

Trigger: Running `metactl --import` with a dump whose version header is DataVersion::V001.

Common situations: Restoring backups exported between the V0 sunset and 2024-06-12; scripted DR restore using an outdated dump file.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at src/meta/control/src/import.rs:95

/// Import from lines of exported data and Return the max log id that is found.
async fn import_lines<SP: SpawnApi, B: BufRead + 'static>(
    raft_config: RaftConfig,
    lines: Lines<B>,
) -> anyhow::Result<Option<LogId>> {
    #[allow(clippy::useless_conversion)]
    let mut it = lines.into_iter().peekable();
    let version = reading::validate_version(&mut it)?;

    let max_log_id = match version {
        DataVersion::V0 => {
            return Err(anyhow::anyhow!(
                "importing from V0 is not supported since 2024-03-01,
                 please use an older version databend-metactl to import from V0"
            ));
        }
        DataVersion::V001 => {
            return Err(anyhow::anyhow!(
                "importing from V001 is not supported since 2024-06-12,
                 please use an older version databend-metactl to import from V001"
            ));
        }
        // v002 v003 v004 share the same exported data format.
        DataVersion::V002 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,
        DataVersion::V003 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,
        DataVersion::V004 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,
    };

    Ok(max_log_id)
}

/// Read every line from stdin or restore file, deserialize it into tree_name, key and value.
/// Insert them into sled db and flush.
///
/// Finally upgrade the data in raft_dir to the latest version.
async fn import_from_stdin_or_file<SP: SpawnApi>(

View on GitHub (pinned to 288d84d76e)