risingwavelabs/risingwave · error · ConnectorError

No allow_alter_on_fly fields registered for connection: {con

Error message

No allow_alter_on_fly fields registered for connection: {connection_name}

What it means

The connection type is recognized but has no allow_alter_on_fly field allowlist registered, so on-the-fly alteration cannot be applied to it. This connection kind does not support hot-altering of its fields.

Source

Thrown at src/connector/src/allow_alter_on_fly_fields.rs:500

        }
    }
    Ok(())
}

pub fn check_connection_allow_alter_on_fly_fields(
    connection_name: &str,
    fields: &[String],
) -> crate::error::ConnectorResult<()> {
    use crate::source::connection_name_to_prop_type_name;

    // Convert connection name to the type name key
    let Some(type_name) = connection_name_to_prop_type_name(connection_name) else {
        return Err(ConnectorError::from(anyhow::anyhow!(
            "Unknown connection: {connection_name}"
        )));
    };
    let Some(allowed_fields) = CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name) else {
        return Err(ConnectorError::from(anyhow::anyhow!(
            "No allow_alter_on_fly fields registered for connection: {connection_name}"
        )));
    };
    for field in fields {
        if !allowed_fields.contains(field) {
            return Err(ConnectorError::from(anyhow::anyhow!(
                "Field '{field}' is not allowed to be altered on the fly for connection: {connection_name}"
            )));
        }
    }
    Ok(())
}

/// Checks if all given fields are allowed to be altered on the fly for the specified sink connector.
/// Returns Ok(()) if all fields are allowed, otherwise returns a `ConnectorError`.
pub fn check_sink_allow_alter_on_fly_fields(
    sink_name: &str,
    fields: &[String],

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Recreate the connection with the desired fields instead of altering
  2. Upgrade RisingWave if hot-alter support for this connection type was added later
  3. Register allowed fields if you maintain a custom connection type

Example fix

// before: ALTER CONNECTION c SET endpoint = '...'; -- unsupported
// after: CREATE CONNECTION c2 ... endpoint='...'; then rebind the sink/source
Defensive patterns

Strategy: validation

Validate before calling

if !SUPPORTS_ALTER_ON_FLY_CONNECTIONS.contains(&conn_type) {
    plan_recreate_connection(conn, new_fields)?;
}

Try / catch

match res {
    Err(e) if e.to_string().contains("No allow_alter_on_fly fields registered for connection") => {
        // recreate connection and rebind dependents instead
    }
    other => other?,
}

Prevention

When it happens

Trigger: ALTER on a connection whose type exists in connection_name_to_prop_type_name but lacks an entry in CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.

Common situations: Attempting to hot-alter connection fields (e.g. private link endpoint) for connection types that require recreation; feature not yet enabled for that connection type.

Related errors


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