databendlabs/databend · error · Error
Unsupported storage type
Error message
Unsupported storage type: {:?} What it means
init_operator_uncached builds a fresh opendal Operator by matching on StorageParams; storage types outside the supported set hit the wildcard arm and return an InvalidInput error. Unlike error 303 this bypasses the operator cache, so it fires on every direct uncached initialization of an unsupported backend.
Solutions
- Set storage.type to a supported value (fs, s3, etc.) in the config.
- Upgrade or recompile Databend with support for the desired storage backend.
- Verify no wrapper/plugin serialized an unexpected StorageParams variant into stage or attach metadata.
- Check the {:?} payload in the message — it names the exact unsupported variant.
Example fix
// before [storage] type = "obs" // after [storage] type = "s3"
Defensive patterns
Strategy: validation
Validate before calling
// Rust: only pass supported storage types to the uncached builder
match &storage_params {
StorageParams::Fs(_) | StorageParams::S3(_) => { /* ok */ }
other => return Err(format!("unsupported storage type: {other:?}")),
} Try / catch
match init_operator_uncached(&cfg, scope) {
Ok(op) => op,
Err(e) if e.to_string().contains("Unsupported storage type") => {
eprintln!("set storage.type to a supported backend (fs/s3)"); Err(e)
}
Err(e) => Err(e),
} Prevention
- Keep storage.type values in sync with the compiled binary's supported backends
- Upgrade the binary before adopting new storage types from newer configs
- Log the StorageParams variant when serializing into stage/attach metadata
When it happens
Trigger: Calling get_or_create -> init_operator_uncached with a StorageParams variant not handled by the match (e.g. a newly added or experimental storage type the operator builder doesn't cover, or a storage type compiled without its feature).
Common situations: Configuring storage.type with a value this Databend build doesn't support (e.g. oss/cos in an edition lacking it); version skew where a config from a newer/patched build is used on an older binary.
Related errors
- bandsave load databend meta data failed
- Failed to get or create operator
- S3 params must remain S3
- Invalid config.rpc
- The header tree can only contain DataHeader
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/09cf2840726f4f97.
Report an issue: GitHub.
Appendix: source
Thrown at src/common/storage/src/operator.rs:162
StorageParams::Webhdfs(cfg) => build_operator(
init_webhdfs_operator(cfg)?,
cfg.network_config.as_ref(),
endpoint_policy_scope,
)?,
StorageParams::Cos(cfg) => build_operator(
init_cos_operator(cfg)?,
cfg.network_config.as_ref(),
endpoint_policy_scope,
)?,
StorageParams::Huggingface(cfg) => build_operator(
init_huggingface_operator(cfg)?,
cfg.network_config.as_ref(),
endpoint_policy_scope,
)?,
v => {
return Err(Error::new(
ErrorKind::InvalidInput,
anyhow!("Unsupported storage type: {:?}", v),
));
}
};
Ok(op)
}
/// Please take care about the timing of calling opendal's `finish`.
///
/// Layers added before `finish` will use static dispatch, and layers added after `finish`
/// will use dynamic dispatch. Adding too many layers via static dispatch will increase
/// the compile time of rustc or even results in a compile error.
///
/// ```txt
/// error[E0275]: overflow evaluating the requirement `http::response::Response<()>: std::marker::Send`
/// |
/// = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`databend_common_storage`)
/// note: required because it appears within the type `h2::proto::peer::PollMessage`View on GitHub (pinned to 288d84d76e)