{"record":{"id":"ef3b26f556db6d3a","repo":"risingwavelabs/risingwave","slug":"field-field-is-not-allowed-to-be-altered-on-th","errorCode":null,"errorMessage":"Field '{field}' is not allowed to be altered on the fly for connector: {connector_name}","messagePattern":"Field '(.+?)' is not allowed to be altered on the fly for connector: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/allow_alter_on_fly_fields.rs","lineNumber":479,"sourceCode":"/// 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;\n\n    // Convert connection name to the type name key\n    let Some(type_name) = connection_name_to_prop_type_name(connection_name) else {\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"Unknown connection: {connection_name}\"\n        )));","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/allow_alter_on_fly_fields.rs#L461-L497","documentation":"The field being altered is not in the connector's allow_alter_on_fly allowlist, so it cannot be changed on the fly for that source. Only fields explicitly registered as mutable-on-the-fly are permitted.","triggerScenarios":"ALTER SOURCE trying to modify/add a field (e.g. a WITH property like 'topic' vs a disallowed one) that is not in SOURCE_ALLOW_ALTER_ON_FLY_FIELDS for the connector.","commonSituations":"Trying to change core connector options (e.g. bootstrap.servers, topic) at runtime; assuming all properties are hot-alterable.","solutions":["Check documentation for which fields are allow-alter-on-fly for this connector and alter only those","Recreate the source (drop + create) with the new field values","Upgrade RW if the field became hot-alterable in a newer version"],"exampleFix":"// before: ALTER SOURCE s SET topic = 'other-topic'; -- not allowed\n// after: recreate the source with the new topic","handlingStrategy":"validation","validationCode":"const ALLOWED: &[&str] = &[\"topic\",\"region\"]; // per-connector allowlist\nfn ensure_field_allowed(connector: &str, field: &str) -> Result<(), String> {\n    if ALLOWED.contains(&field) { Ok(()) } else { Err(format!(\"{field} not hot-alterable for {connector}\")) }\n}","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"not allowed to be altered on the fly\") => {\n        // switch to recreate-the-source path\n    }\n    other => other?,\n}","preventionTips":["Consult the allow-alter-on-fly field list per connector before ALTER","Treat core options (servers, topic, table) as immutable at runtime","Automate recreation workflows for non-alterable fields"],"tags":["connector","validation","configuration"],"backgroundTag":"invalid-argument-value","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"}