{"record":{"id":"761a3aebed6ca30c","repo":"risingwavelabs/risingwave","slug":"parse-error-0-761a3a","errorCode":null,"errorMessage":"Parse error: {0}","messagePattern":"Parse error: (.+?)","errorType":"validation","errorClass":"ParallelismStrategyParseError","httpStatus":null,"severity":"error","filePath":"src/common/src/system_param/adaptive_parallelism_strategy.rs","lineNumber":67,"sourceCode":"            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 {\n            AdaptiveParallelismStrategy::Auto | AdaptiveParallelismStrategy::Full => {\n                current_parallelism\n            }","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/system_param/adaptive_parallelism_strategy.rs#L49-L85","documentation":"ParallelismStrategyParseError::ParseIntError wraps a std::num::ParseIntError from parsing the integer argument of the Bounded parallelism strategy. When input like 'bounded(abc)' or 'bounded(8.5)' is given, the inner token fails integer parsing and this error surfaces as \"Parse error: <inner message>\".","triggerScenarios":"Setting the adaptive parallelism strategy to 'bounded(x)' where x is not a valid integer — non-numeric text, floats ('bounded(2.5)'), negative-with-sign issues, or numbers overflowing i64/u64.","commonSituations":"Decimal point in the bound; pasting values with units ('bounded(8 cores)'); invisible whitespace or quotes left inside the parentheses.","solutions":["Ensure the Bounded argument is a plain positive integer: 'bounded(8)'.","Remove units, decimals, spaces, or stray quotes inside the parentheses.","If a fractional target is desired, use the 'ratio(...)' strategy instead."],"exampleFix":"// before\nSET adaptive_parallelism_strategy = 'bounded(2.5)';\n// after\nSET adaptive_parallelism_strategy = 'bounded(3)';","handlingStrategy":"validation","validationCode":"// Validate the bounded argument before composing the strategy string\nfn bounded(n: i64) -> Result<String, String> {\n    if n <= 0 { return Err(\"bounded requires a positive integer\".into()); }\n    Ok(format!(\"bounded({n})\"))\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(ParallelismStrategyParseError::ParseIntError(e)) => {\n        eprintln!(\"bounded(...) argument must be a plain integer: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Always pass integer literals inside bounded(...); no decimals or units.","When generating the string programmatically, format integers, never floats.","Strip whitespace inside parentheses before setting."],"tags":["config","parallelism","parse","integer"],"backgroundTag":"invalid-argument-format","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"}