{"record":{"id":"09cf2840726f4f97","repo":"databendlabs/databend","slug":"unsupported-storage-type","errorCode":null,"errorMessage":"Unsupported storage type: {:?}","messagePattern":"Unsupported storage type: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/common/storage/src/operator.rs","lineNumber":162,"sourceCode":"        StorageParams::Webhdfs(cfg) => build_operator(\n            init_webhdfs_operator(cfg)?,\n            cfg.network_config.as_ref(),\n            endpoint_policy_scope,\n        )?,\n        StorageParams::Cos(cfg) => build_operator(\n            init_cos_operator(cfg)?,\n            cfg.network_config.as_ref(),\n            endpoint_policy_scope,\n        )?,\n        StorageParams::Huggingface(cfg) => build_operator(\n            init_huggingface_operator(cfg)?,\n            cfg.network_config.as_ref(),\n            endpoint_policy_scope,\n        )?,\n        v => {\n            return Err(Error::new(\n                ErrorKind::InvalidInput,\n                anyhow!(\"Unsupported storage type: {:?}\", v),\n            ));\n        }\n    };\n\n    Ok(op)\n}\n\n/// Please take care about the timing of calling opendal's `finish`.\n///\n/// Layers added before `finish` will use static dispatch, and layers added after `finish`\n/// will use dynamic dispatch. Adding too many layers via static dispatch will increase\n/// the compile time of rustc or even results in a compile error.\n///\n/// ```txt\n/// error[E0275]: overflow evaluating the requirement `http::response::Response<()>: std::marker::Send`\n///      |\n///      = help: consider increasing the recursion limit by adding a `#![recursion_limit = \"256\"]` attribute to your crate (`databend_common_storage`)\n/// note: required because it appears within the type `h2::proto::peer::PollMessage`","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/common/storage/src/operator.rs#L144-L180","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\n[storage]\ntype = \"obs\"\n// after\n[storage]\ntype = \"s3\"","handlingStrategy":"validation","validationCode":"// Rust: only pass supported storage types to the uncached builder\nmatch &storage_params {\n    StorageParams::Fs(_) | StorageParams::S3(_) => { /* ok */ }\n    other => return Err(format!(\"unsupported storage type: {other:?}\")),\n}","typeGuard":null,"tryCatchPattern":"match init_operator_uncached(&cfg, scope) {\n    Ok(op) => op,\n    Err(e) if e.to_string().contains(\"Unsupported storage type\") => {\n        eprintln!(\"set storage.type to a supported backend (fs/s3)\"); Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["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"],"tags":["rust","opendal","storage","config"],"backgroundTag":"unsupported-config-value","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}