risingwavelabs/risingwave · error · ConfigParallelismParseError

Unsupported parallelism: {0}

Error message

Unsupported parallelism: {0}

What it means

ConfigParallelismParseError::UnsupportedParallelism is thrown when the value of a parallelism-related session/system config is a string that matches none of the supported forms (Auto, Default, a fixed Bounded number, or Ratio). The parser in src/common/src/session_config/parallelism.rs matches the input string against known strategy keywords and formats, and any other string produces this error carrying the offending input.

Source

Thrown at src/common/src/session_config/parallelism.rs:55

}

pub const DEFAULT_GLOBAL_STREAMING_PARALLELISM: ConfigParallelism = bounded_parallelism(64);
pub const DEFAULT_TABLE_SOURCE_STREAMING_PARALLELISM: ConfigParallelism = bounded_parallelism(4);
pub const DEFAULT_SINK_STREAMING_PARALLELISM: ConfigParallelism = bounded_parallelism(8);

#[derive(Copy, Debug, Clone, PartialEq, Default)]
pub enum ConfigParallelism {
    #[default]
    Default,
    Fixed(NonZeroU64),
    Adaptive,
    Bounded(NonZeroU64),
    Ratio(f32),
}

#[derive(Error, Debug)]
pub enum ConfigParallelismParseError {
    #[error("Unsupported parallelism: {0}")]
    UnsupportedParallelism(String),

    #[error("Parse error: {0}")]
    ParseIntError(#[from] ParseIntError),

    #[error(transparent)]
    StrategyParseError(#[from] ParallelismStrategyParseError),
}

impl FromStr for ConfigParallelism {
    type Err = ConfigParallelismParseError;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.to_ascii_lowercase().as_str() {
            KEYWORD_DEFAULT => return Ok(ConfigParallelism::Default),
            KEYWORD_ADAPTIVE | KEYWORD_AUTO => return Ok(ConfigParallelism::Adaptive),
            _ => {}
        }

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Use one of the supported values: 'auto', 'default', a positive integer like '8', or 'ratio(0.5)'.
  2. Check for typos or stray whitespace/characters in the configured value.
  3. Consult the parallelism docs in RisingWave for the accepted strategy syntax.

Example fix

// before
SET streaming_parallelism = 'maximum';
// after
SET streaming_parallelism = 'auto';
Defensive patterns

Strategy: validation

Validate before calling

// Validate parallelism value before setting
const VALID_STRATEGIES: [&str; 2] = ["auto", "default"];
fn is_valid_parallelism(v: &str) -> bool {
    VALID_STRATEGIES.contains(&v)
        || v.parse::<u64>().map(|n| n > 0).unwrap_or(false)
        || (v.starts_with("ratio(") && v.ends_with(')'))
}

Try / catch

match ConfigParallelism::from_str(&value) {
    Ok(p) => apply(p),
    Err(ConfigParallelismParseError::UnsupportedParallelism(s)) => {
        eprintln!("'{s}' is not a valid parallelism; use auto|default|<int>|ratio(x)");
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: Setting a parallelism config (e.g. STREAMING_PARALLELISM / PARALLELISM related parameter) to an arbitrary unrecognized string such as 'max', 'auto2', 'adaptive!', or '100x' instead of 'auto', 'default', a positive integer, or 'ratio(0.5)'.

Common situations: Typo when setting the parallelism parameter; copying syntax from another database; quoting mistakes that leave stray characters; using an old syntax removed in a newer version.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/25ce8e9a0c08deaf. Report an issue: GitHub.