{"record":{"id":"695494b409221aeb","repo":"risingwavelabs/risingwave","slug":"unsupported-strategy-0","errorCode":null,"errorMessage":"Unsupported strategy: {0}","messagePattern":"Unsupported strategy: (.+?)","errorType":"validation","errorClass":"ParallelismStrategyParseError","httpStatus":null,"severity":"error","filePath":"src/common/src/system_param/adaptive_parallelism_strategy.rs","lineNumber":64,"sourceCode":"    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        match self {\n            AdaptiveParallelismStrategy::Auto => write!(f, \"AUTO\"),\n            AdaptiveParallelismStrategy::Full => write!(f, \"FULL\"),\n            AdaptiveParallelismStrategy::Bounded(n) => write!(f, \"BOUNDED({})\", n),\n            AdaptiveParallelismStrategy::Ratio(r) => write!(f, \"RATIO({})\", r),\n        }\n    }\n}\n\nimpl From<AdaptiveParallelismStrategy> for String {\n    fn from(val: AdaptiveParallelismStrategy) -> Self {\n        val.to_string()\n    }\n}\n\n#[derive(Error, Debug)]\npub enum ParallelismStrategyParseError {\n    #[error(\"Unsupported strategy: {0}\")]\n    UnsupportedStrategy(String),\n\n    #[error(\"Parse error: {0}\")]\n    ParseIntError(#[from] std::num::ParseIntError),\n\n    #[error(\"Parse error: {0}\")]\n    ParseFloatError(#[from] std::num::ParseFloatError),\n\n    #[error(\"Invalid value for Bounded strategy: must be positive integer\")]\n    InvalidBoundedValue,\n\n    #[error(\"Invalid value for Ratio strategy: must be between 0.0 and 1.0\")]\n    InvalidRatioValue,\n}\n\nimpl AdaptiveParallelismStrategy {\n    pub fn compute_target_parallelism(&self, current_parallelism: usize) -> usize {\n        match self {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/system_param/adaptive_parallelism_strategy.rs#L46-L82","documentation":"ParallelismStrategyParseError::UnsupportedStrategy is raised when parsing an adaptive parallelism strategy parameter whose leading strategy name is not one of the supported ones (Bounded or Ratio). The parser in src/common/src/system_param/adaptive_parallelism_strategy.rs expects input like 'bounded(8)' or 'ratio(0.5)'; any other leading token yields this error with the raw input.","triggerScenarios":"Setting the adaptive parallelism strategy system parameter (e.g. 'SET system parameter adaptive_parallelism_strategy = ''random(3)''') with an unknown strategy name, or omitting the parentheses form entirely ('fast' instead of 'bounded(4)').","commonSituations":"Guessing strategy names; copying syntax from other systems; typos like 'bound(4)' or 'ration(0.5)'; case-sensitivity mistakes ('Bounded(4)' vs 'bounded(4)' depending on parser matching).","solutions":["Use 'bounded(<positive integer>)' or 'ratio(<0.0-1.0 float>)' as the strategy value.","Fix the strategy name spelling; only Bounded and Ratio strategies exist.","Check the parameter docs (system parameter reference) for exact accepted syntax."],"exampleFix":"// before\nSET adaptive_parallelism_strategy = 'bound(4)';\n// after\nSET adaptive_parallelism_strategy = 'bounded(4)';","handlingStrategy":"validation","validationCode":"// Validate adaptive strategy string before setting\nfn is_valid_strategy(v: &str) -> bool {\n    let v = v.trim();\n    (v.starts_with(\"bounded(\") && v.ends_with(')'))\n        || (v.starts_with(\"ratio(\") && v.ends_with(')'))\n}","typeGuard":null,"tryCatchPattern":"match AdaptiveParallelismStrategy::from_str(&value) {\n    Err(ParallelismStrategyParseError::UnsupportedStrategy(s)) => {\n        eprintln!(\"'{s}' unsupported; use bounded(<int>) or ratio(<0.0-1.0>)\");\n    }\n    other => other?,\n}","preventionTips":["Only the Bounded and Ratio strategies exist — keep a constants list in tooling.","Watch case sensitivity and typos in strategy names.","Validate system parameter values in deployment scripts before applying them."],"tags":["config","parallelism","strategy","risingwave"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}