risingwavelabs/risingwave · error

not supported: write model V1 to meta store V2

Error message

not supported: write model V1 to meta store V2

What it means

Meta store model V2 cannot accept snapshots written with format_version < 2 (write model V1); restore_impl calls `unimplemented!` to abort. Upgrading from V1 backups to a V2 meta store is unsupported — the snapshot must be migrated by other means.

Source

Thrown at src/meta/src/backup_restore/restore.rs:191

        }
        Some(s) => s,
    };

    if opts.validate_integrity {
        tracing::info!("Start integrity validation.");
        validate_integrity(
            snapshot.objects.clone(),
            &opts.hummock_storage_url,
            &opts.hummock_storage_directory,
        )
        .await
        .inspect_err(|_| tracing::error!("Fail integrity validation."))?;
        tracing::info!("Succeed integrity validation.");
    }

    let format_version = snapshot.format_version;
    if format_version < 2 {
        unimplemented!("not supported: write model V1 to meta store V2");
    } else {
        dispatch(
            target_id,
            &opts,
            LoaderV2::new(backup_store),
            WriterModelV2ToMetaStoreV2::new(meta_store),
        )
        .await?;
    }

    Ok(())
}

async fn dispatch<L: Loader<S>, W: Writer<S>, S: Metadata>(
    target_id: MetaSnapshotId,
    opts: &RestoreOpts,
    loader: L,
    writer: W,

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Restore the V1 snapshot with an older RisingWave version that supports V1 write model, then upgrade and take a new backup
  2. Regenerate a V2-format backup before attempting restore on the current binary
  3. Do not attempt direct V1 restore; migrate data via the intermediate version
Defensive patterns

Strategy: validation

Validate before calling

if snapshot.format_version < 2 {
    return Err(anyhow!("V1 snapshot cannot be restored to V2 meta store; migrate via intermediate version"));
}

Prevention

When it happens

Trigger: Restoring a meta snapshot whose `format_version` is 1 (or 0) into a current meta store that expects V2 write model.

Common situations: Using a very old RisingWave backup (pre-V2 format) with a modern binary after the storage format change.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/0fc63e5e4d814f70. Report an issue: GitHub.