risingwavelabs/risingwave · error · ConnectorError
No allow_alter_on_fly fields registered for connection
Error message
No allow_alter_on_fly fields registered for connection: {connection_name} What it means
Generated-code guard in check_connection_allow_alter_on_fly_fields: no allow_alter_on_fly whitelist is registered for the given connection type (CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS has no entry), so any field-alteration request for this connection is rejected. Generic sentinel for unregistered connections.
Solutions
- Re-run code generation to rebuild CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.
- Register allow_alter_on_fly fields for the connection type if it should support them.
- Skip this validation for connection types without registered fields.
Example fix
// before
check_connection_allow_alter_on_fly_fields(name, fields)?;
// after
if CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.contains_key(connection_name_to_prop_type_name(name).unwrap()) {
check_connection_allow_alter_on_fly_fields(name, fields)?;
} Defensive patterns
Strategy: type-guard
Validate before calling
fn connection_has_alter_fields(name: &str) -> bool {
connection_name_to_prop_type_name(name)
.and_then(|t| CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.get(t))
.is_some()
} Try / catch
if connection_has_alter_fields(name) {
check_connection_allow_alter_on_fly_fields(name, fields)?;
} Prevention
- Regenerate code after adding connection types
- Test that each registered connection type has a registry entry
When it happens
Trigger: Calling check_connection_allow_alter_on_fly_fields for a known connection type whose allow-list was never generated, or when the generated registry is stale.
Common situations: New connection type added without updating the generator inputs; build cache missing freshly generated maps; connection type intentionally has no on-the-fly alterable fields but validation is called anyway.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- No allow_alter_on_fly fields registered for connector
- No allow_alter_on_fly fields registered for sink
- ALTER ICEBERG TABLE does not support SECRET or CONNECTION…
- Doris/Starrocks connect error
- failed to connect to all meta servers
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/4919974fb1b30217.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/with_options_test.rs:828
}}
}}
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)