risingwavelabs/risingwave · error · ParallelismStrategyParseError
Parse error: {0}
Error message
Parse error: {0} What it means
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>".
Source
Thrown at src/common/src/system_param/adaptive_parallelism_strategy.rs:67
AdaptiveParallelismStrategy::Full => write!(f, "FULL"),
AdaptiveParallelismStrategy::Bounded(n) => write!(f, "BOUNDED({})", n),
AdaptiveParallelismStrategy::Ratio(r) => write!(f, "RATIO({})", r),
}
}
}
impl From<AdaptiveParallelismStrategy> for String {
fn from(val: AdaptiveParallelismStrategy) -> Self {
val.to_string()
}
}
#[derive(Error, Debug)]
pub enum ParallelismStrategyParseError {
#[error("Unsupported strategy: {0}")]
UnsupportedStrategy(String),
#[error("Parse error: {0}")]
ParseIntError(#[from] std::num::ParseIntError),
#[error("Parse error: {0}")]
ParseFloatError(#[from] std::num::ParseFloatError),
#[error("Invalid value for Bounded strategy: must be positive integer")]
InvalidBoundedValue,
#[error("Invalid value for Ratio strategy: must be between 0.0 and 1.0")]
InvalidRatioValue,
}
impl AdaptiveParallelismStrategy {
pub fn compute_target_parallelism(&self, current_parallelism: usize) -> usize {
match self {
AdaptiveParallelismStrategy::Auto | AdaptiveParallelismStrategy::Full => {
current_parallelism
}View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before SET adaptive_parallelism_strategy = 'bounded(2.5)'; // after SET adaptive_parallelism_strategy = 'bounded(3)';
Defensive patterns
Strategy: validation
Validate before calling
// Validate the bounded argument before composing the strategy string
fn bounded(n: i64) -> Result<String, String> {
if n <= 0 { return Err("bounded requires a positive integer".into()); }
Ok(format!("bounded({n})"))
} Try / catch
match result {
Err(ParallelismStrategyParseError::ParseIntError(e)) => {
eprintln!("bounded(...) argument must be a plain integer: {e}");
}
other => other?,
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Decimal point in the bound; pasting values with units ('bounded(8 cores)'); invisible whitespace or quotes left inside the parentheses.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Parse error: {0}
- Unsupported parallelism: {0}
- Unsupported strategy: {0}
- Invalid value for Bounded strategy: must be positive integer
- Invalid value for Ratio strategy: must be between 0.0 and 1.
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/761a3aebed6ca30c.
Report an issue: GitHub.