{"record":{"id":"31dec1ef0a16b403","repo":"risingwavelabs/risingwave","slug":"no-allow-alter-on-fly-fields-registered-for-connec-31dec1","errorCode":null,"errorMessage":"No allow_alter_on_fly fields registered for connection: {connection_name}","messagePattern":"No allow_alter_on_fly fields registered for connection: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/allow_alter_on_fly_fields.rs","lineNumber":500,"sourceCode":"        }\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        )));\n    };\n    let Some(allowed_fields) = CONNECTION_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 connection: {connection_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 connection: {connection_name}\"\n            )));\n        }\n    }\n    Ok(())\n}\n\n/// Checks if all given fields are allowed to be altered on the fly for the specified sink connector.\n/// Returns Ok(()) if all fields are allowed, otherwise returns a `ConnectorError`.\npub fn check_sink_allow_alter_on_fly_fields(\n    sink_name: &str,\n    fields: &[String],","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/allow_alter_on_fly_fields.rs#L482-L518","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Recreate the connection with the desired fields instead of altering","Upgrade RisingWave if hot-alter support for this connection type was added later","Register allowed fields if you maintain a custom connection type"],"exampleFix":"// before: ALTER CONNECTION c SET endpoint = '...'; -- unsupported\n// after: CREATE CONNECTION c2 ... endpoint='...'; then rebind the sink/source","handlingStrategy":"validation","validationCode":"if !SUPPORTS_ALTER_ON_FLY_CONNECTIONS.contains(&conn_type) {\n    plan_recreate_connection(conn, new_fields)?;\n}","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"No allow_alter_on_fly fields registered for connection\") => {\n        // recreate connection and rebind dependents instead\n    }\n    other => other?,\n}","preventionTips":["Assume connections are immutable unless docs say a field is hot-alterable","Check release notes when adopting new connection types","Script connection recreation with dependent rebinds"],"tags":["connection","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"}