{"record":{"id":"1a613c28fe8a37cf","repo":"risingwavelabs/risingwave","slug":"no-allow-alter-on-fly-fields-registered-for-connec","errorCode":null,"errorMessage":"No allow_alter_on_fly fields registered for connector: {connector_name}","messagePattern":"No allow_alter_on_fly fields registered for connector: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/allow_alter_on_fly_fields.rs","lineNumber":473,"sourceCode":"/// Get all connection names that have `allow_alter_on_fly` fields\npub fn get_connection_names_with_allow_alter_on_fly_fields() -> Vec<&'static str> {\n    CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.keys().map(|s| s.as_str()).collect()\n}\n\n/// Checks if all given fields are allowed to be altered on the fly for the specified source connector.\n/// Returns Ok(()) if all fields are allowed, otherwise returns a `ConnectorError`.\npub fn check_source_allow_alter_on_fly_fields(\n    connector_name: &str,\n    fields: &[String],\n) -> crate::error::ConnectorResult<()> {\n    // Convert connector name to the type name key\n    let Some(type_name) = source_properties::source_name_to_prop_type_name(connector_name) else {\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"Unknown source connector: {connector_name}\"\n        )));\n    };\n    let Some(allowed_fields) = SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name) else {\n    return Err(ConnectorError::from(anyhow::anyhow!(\n        \"No allow_alter_on_fly fields registered for connector: {connector_name}\"\n    )));\n    };\n    for field in fields {\n        if !allowed_fields.contains(field) {\n            return Err(ConnectorError::from(anyhow::anyhow!(\n                \"Field '{field}' is not allowed to be altered on the fly for connector: {connector_name}\"\n            )));\n        }\n    }\n    Ok(())\n}\n\npub fn check_connection_allow_alter_on_fly_fields(\n    connection_name: &str,\n    fields: &[String],\n) -> crate::error::ConnectorResult<()> {\n    use crate::source::connection_name_to_prop_type_name;","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/allow_alter_on_fly_fields.rs#L455-L491","documentation":"The connector name was recognized, but no allow_alter_on_fly field allowlist is registered for it, so on-the-fly field alteration cannot be validated for this source connector. The connector simply does not support altering fields on the fly (yet).","triggerScenarios":"Running ALTER SOURCE (alter on the fly) for a source whose connector exists in source_name_to_prop_type_name but has no entry in SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.","commonSituations":"Attempting on-the-fly field changes on connectors that haven't opted in to the feature; running a newer feature against an older connector registration set.","solutions":["Do not attempt alter-on-the-fly for this connector; recreate the source with the desired fields instead","Upgrade RisingWave if the connector gained allow_alter_on_fly support in a later release","Contribute/register the connector's allowed fields if you maintain a custom connector"],"exampleFix":"// before: ALTER SOURCE s ADD COLUMN ... (unsupported connector)\n// after: recreate\nDROP SOURCE s;\nCREATE SOURCE s (... new fields ...) WITH (connector = 'nexmark', ...);","handlingStrategy":"validation","validationCode":"// Pre-check support before issuing alter-on-the-fly\nif !SUPPORTS_ALTER_ON_FLY.contains(&connector) {\n    plan_recreate_source(connector, new_fields)?; // avoid unsupported ALTER\n}","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"No allow_alter_on_fly fields registered\") => {\n        // fall back to drop-and-recreate workflow\n    }\n    other => other?,\n}","preventionTips":["Only use ALTER ... on the fly for connectors documented as supporting it","Check release notes for newly supported hot-alter connectors","Prefer idempotent recreate scripts for non-hot-alter sources"],"tags":["connector","feature-support","validation"],"backgroundTag":"feature-not-enabled","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}