risingwavelabs/risingwave · error

Unsupported throttle target: {:?} and throttle type: {:?}

Error message

Unsupported throttle target: {:?} and throttle type: {:?}

What it means

ALTER ... SET RATE LIMIT supports only a fixed set of target/type combinations (e.g. MV/sink/dtable/source DML throttling). The matched statement's target (throttle_target) paired with the given throttle_type fell outside the handled arms of the match, so the handler bails with the debug-formatted pair. It is a guard against unsupported combinations rather than a failure of the resource itself.

Source

Thrown at src/frontend/src/handler/alter_streaming_rate_limit.rs:129

        }
        (PbThrottleTarget::Sink, PbThrottleType::Sink) => {
            let reader = session.env().catalog_reader().read_guard();
            let (sink, schema_name) =
                reader.get_any_sink_by_name(db_name, schema_path, &real_table_name)?;
            if sink.target_table.is_some() {
                bail!("ALTER SINK_RATE_LIMIT is not for sink into table")
            }
            session.check_privilege_for_drop_alter(schema_name, &**sink)?;
            (StatementType::ALTER_SINK, sink.id.as_raw_id())
        }
        (PbThrottleTarget::Sink, PbThrottleType::Backfill) => {
            let reader = session.env().catalog_reader().read_guard();
            let (sink, schema_name) =
                reader.get_any_sink_by_name(db_name, schema_path, &real_table_name)?;
            session.check_privilege_for_drop_alter(schema_name, &**sink)?;
            (StatementType::ALTER_SINK, sink.id.as_raw_id())
        }
        _ => bail!(
            "Unsupported throttle target: {:?} and throttle type: {:?}",
            throttle_target,
            throttle_type
        ),
    };
    execute_with_long_running_notification(
        handle_alter_streaming_rate_limit_by_id(
            &session,
            throttle_target,
            throttle_type,
            id,
            rate_limit,
            stmt_type,
        ),
        &session,
        "ALTER STREAMING RATE LIMIT",
        LongRunningNotificationAction::SuggestRecover,
    )

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check the supported throttle_target/throttle_type combinations in the RisingWave version you run and use a supported one
  2. Upgrade RisingWave to a version that supports throttling for this target type
  3. Re-encode the throttling differently (e.g. adjust upstream producer rate instead of an RW-side throttle)

Example fix

-- before
ALTER SINK s SET RATE LIMIT 100; -- unsupported combo
-- after
ALTER MATERIALIZED VIEW mv SET RATE LIMIT 100; -- supported target
Defensive patterns

Strategy: try-catch

Validate before calling

-- Check your target is supported before altering
SELECT name, type FROM rw_catalog.rw_tables WHERE name = 'mv_name';

Try / catch

try {
  await conn.query("ALTER MATERIALIZED VIEW mv SET RATE LIMIT 100");
} catch (e) {
  if (String(e.message).includes('Unsupported throttle target')) {
    // fall back or upgrade
  }
}

Prevention

When it happens

Trigger: Running ALTER statements that set a rate limit on a target/type pair not implemented, e.g. altering a throttle on a target the match statement does not cover (the handled arms are table/sink MV throttle etc.).

Common situations: Users applying an ALTER THROTTLE / SET RATE LIMIT syntax copied from docs for a feature version where their target (e.g. a specific sink or source type) is not yet supported; version mismatch between docs and deployed RisingWave.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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