risingwavelabs/risingwave · error · ConnectorError
Field ' ' is not allowed to be altered on the fly for…
Error message
Field '{field}' is not allowed to be altered on the fly for connection: {connection_name} What it means
Generated-code guard for `ALTER CONNECTION`: the requested field is not in the CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS whitelist for that connection type, so altering it on the fly fails. Generic whitelist check; the offending input is the field name not registered for the connection.
Solutions
- Alter only fields listed in the connection's allow_alter_on_fly registry.
- Drop and recreate the connection with the new field value if it is immutable.
- Correct field name spelling/case.
- Add the field to the allow list and regenerate if it should be mutable.
Example fix
// before
check_connection_allow_alter_on_fly_fields("privatelink", &["endpoint".into()])?;
// after
DROP CONNECTION privatelink;
CREATE CONNECTION privatelink WITH (... new endpoint ...); Defensive patterns
Strategy: validation
Validate before calling
fn can_alter_connection(name: &str, field: &str) -> bool {
connection_name_to_prop_type_name(name)
.and_then(|t| CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.get(t))
.map(|f| f.contains(&field.to_string()))
.unwrap_or(false)
} Try / catch
match check_connection_allow_alter_on_fly_fields(name, &fields) {
Err(e) => suggest_recreate_connection(&e),
Ok(()) => proceed(),
} Prevention
- Treat connection credentials/endpoints as immutable; recreate connections to change them
- Verify field names against the connection's registered schema
When it happens
Trigger: Validating an ALTER on a connection field (e.g. a private-link field) that is not in CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS for that connection type.
Common situations: Trying to mutate immutable connection fields (endpoint, port, credentials) without recreating the connection; field-name typo; attempting unsupported live schema change.
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
- Field ' ' is not allowed to be altered on the fly for sink
- Field ' ' is not allowed to be altered on the fly for…
- ALTER ICEBERG TABLE does not support SECRET or CONNECTION…
- ALTER TABLE is not supported for iceberg table without auto…
- ALTER TABLE is not supported for iceberg table: . …
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/a472da86e4432276.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/with_options_test.rs:834
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],
) -> crate::error::ConnectorResult<()> {{
// TODO(#24846): JDBC sink currently uses `()` as sink config type in `for_all_sinks!`,
// so it cannot have an isolated key in `SINK_ALLOW_ALTER_ON_FLY_FIELDS`.
// Reuse the JDBC entry in `CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS` for now.
// TODO(#24846): remove this special case after JDBC sink has a dedicated config type
// and allow-alter fields are generated directly into `SINK_ALLOW_ALTER_ON_FLY_FIELDS`.View on GitHub (pinned to 6469eb736d)