{"record":{"id":"35d2f58dee6817c9","repo":"risingwavelabs/risingwave","slug":"parse-error-0","errorCode":null,"errorMessage":"Parse error: {0}","messagePattern":"Parse error: (.+?)","errorType":"validation","errorClass":"ConfigParallelismParseError","httpStatus":null,"severity":"error","filePath":"src/common/src/session_config/parallelism.rs","lineNumber":58,"sourceCode":"pub const DEFAULT_TABLE_SOURCE_STREAMING_PARALLELISM: ConfigParallelism = bounded_parallelism(4);\npub const DEFAULT_SINK_STREAMING_PARALLELISM: ConfigParallelism = bounded_parallelism(8);\n\n#[derive(Copy, Debug, Clone, PartialEq, Default)]\npub enum ConfigParallelism {\n    #[default]\n    Default,\n    Fixed(NonZeroU64),\n    Adaptive,\n    Bounded(NonZeroU64),\n    Ratio(f32),\n}\n\n#[derive(Error, Debug)]\npub enum ConfigParallelismParseError {\n    #[error(\"Unsupported parallelism: {0}\")]\n    UnsupportedParallelism(String),\n\n    #[error(\"Parse error: {0}\")]\n    ParseIntError(#[from] ParseIntError),\n\n    #[error(transparent)]\n    StrategyParseError(#[from] ParallelismStrategyParseError),\n}\n\nimpl FromStr for ConfigParallelism {\n    type Err = ConfigParallelismParseError;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        match s.to_ascii_lowercase().as_str() {\n            KEYWORD_DEFAULT => return Ok(ConfigParallelism::Default),\n            KEYWORD_ADAPTIVE | KEYWORD_AUTO => return Ok(ConfigParallelism::Adaptive),\n            _ => {}\n        }\n\n        match parse_strategy(s) {\n            Ok(AdaptiveParallelismStrategy::Auto | AdaptiveParallelismStrategy::Full) => {","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/session_config/parallelism.rs#L40-L76","documentation":"This variant wraps a std ParseIntError produced while parsing the numeric portion of a parallelism config value. When the input looks like a fixed-parallelism number (e.g. '12x' or 'abc' where a Bounded integer is expected), the conversion via #[from] ParseIntError produces \"Parse error: <inner message>\". It indicates the parallelism value's numeric part is not a valid integer.","triggerScenarios":"Setting a parallelism config to a string whose numeric component fails i64/u64 parsing, e.g. 'set streaming_parallelism = 8.5' or 'parallelism = ten' — the parser attempts integer parse and the underlying ParseIntError bubbles up through #[from].","commonSituations":"Passing a decimal fraction where an integer is required; passing a very large number overflowing u64; locale-formatted numbers with separators like '1_000' or '1,000'.","solutions":["Provide a plain positive integer (e.g. '8') without decimals, separators, or units.","If you want a fractional setting, use the 'ratio(0.5)' strategy form instead of a bare float.","Ensure the number fits in u64/NonZeroU64 range."],"exampleFix":"// before\nSET streaming_parallelism = '8.5';\n// after\nSET streaming_parallelism = 'ratio(0.5)';","handlingStrategy":"validation","validationCode":"// Ensure the value is a plain positive integer before parsing\nfn valid_int_parallelism(v: &str) -> Result<u64, String> {\n    let n: u64 = v.trim().parse().map_err(|e| format(\"invalid integer '{v}': {e}\"))?;\n    if n == 0 { return Err(\"parallelism must be positive\".into()); }\n    Ok(n)\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(ConfigParallelismParseError::ParseIntError(e)) => {\n        eprintln!(\"parallelism must be a plain integer: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Reject floats, separators, and units at the UI/script layer before setting the config.","Use ratio(x) when a fractional target is intended.","Sanitize values coming from environment variables or external config files."],"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"}