risingwavelabs/risingwave · error

OpenDAL is required

Error message

OpenDAL is required

What it means

The migration tool builds a remote object store from the given URL and requires the resulting backend to be an OpenDAL-backed store, since the list/copy rewrite logic uses OpenDAL APIs. Any other ObjectStoreImpl variant causes this error.

Solutions

  1. Provide an object store URL that builds an OpenDAL backend (opendal s3 url)
  2. Check the rw build/feature flags enable OpenDAL object store support
  3. Inspect build_remote_object_store's URL mapping to confirm which URL forms yield ObjectStoreImpl::Opendal

Example fix

null
Defensive patterns

Strategy: fallback

Validate before calling

let store = build_remote_object_store(&url, ...).await;
if !matches!(store, ObjectStoreImpl::Opendal(_)) {
    eprintln!("url {} does not yield an OpenDAL backend", url);
    return;
}

Prevention

When it happens

Trigger: Running migrate-legacy-object with a store URL that resolves to a non-OpenDAL implementation (e.g. native S3 client instead of OpenDAL S3).

Common situations: Using an s3:// URL while the OpenDAL developer option is not applied to the backend selection, or pointing at an in-memory/local store type.

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/2ce4e67e23c3e249. Report an issue: GitHub.

Appendix: source

Thrown at src/ctl/src/cmd_impl/hummock/migrate_legacy_object.rs:56

    println!("Normalized source_dir: {source_dir}.");
    println!("Normalized target_dir: {target_dir}.");
    if source_dir.is_empty() || target_dir.is_empty() {
        return Err(anyhow!("the source_dir and target_dir must not be empty"));
    }
    if target_dir.starts_with(source_dir) {
        return Err(anyhow!("the target_dir must not include source_dir"));
    }
    let mut config = ObjectStoreConfig::default();
    config.s3.developer.use_opendal = true;
    let store = build_remote_object_store(
        &url,
        ObjectStoreMetrics::unused().into(),
        "migrate_legacy_object",
        config.into(),
    )
    .await;
    let ObjectStoreImpl::Opendal(opendal) = store else {
        return Err(anyhow!("OpenDAL is required"));
    };
    let mut iter = opendal.list(source_dir, None, None).await?;
    let mut count = 0;
    println!("Migration is started: from {source_dir} to {target_dir}.");
    let mut from_to = Vec::with_capacity(concurrency as usize);
    let timer = Instant::now();
    while let Some(object) = iter.next().await {
        let object = object?;
        if !VALID_OBJECT_ID_SUFFIXES
            .iter()
            .any(|suffix| object.key.ends_with(suffix))
        {
            let legacy_path = object.key;
            assert_eq!(
                &legacy_path[..source_dir.len()],
                source_dir,
                "{legacy_path} versus {source_dir}"
            );

View on GitHub (pinned to 6469eb736d)