{"record":{"id":"a4d384c0aa2ad1c1","repo":"risingwavelabs/risingwave","slug":"no-allow-alter-on-fly-fields-registered-for-sink","errorCode":null,"errorMessage":"No allow_alter_on_fly fields registered for sink: {sink_name}","messagePattern":"No allow_alter_on_fly fields registered for sink: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/allow_alter_on_fly_fields.rs","lineNumber":537,"sourceCode":") -> crate::error::ConnectorResult<()> {\n    // TODO(#24846): JDBC sink currently uses `()` as sink config type in `for_all_sinks!`,\n    // so it cannot have an isolated key in `SINK_ALLOW_ALTER_ON_FLY_FIELDS`.\n    // Reuse the JDBC entry in `CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS` for now.\n    // TODO(#24846): remove this special case after JDBC sink has a dedicated config type\n    // and allow-alter fields are generated directly into `SINK_ALLOW_ALTER_ON_FLY_FIELDS`.\n    let allowed_fields = if sink_name == JdbcSink::SINK_NAME {\n        CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.get(JdbcSink::SINK_NAME)\n    } else {\n        // Convert sink name to the type name key\n        let Some(type_name) = sink_properties::sink_name_to_config_type_name(sink_name) else {\n            return Err(ConnectorError::from(anyhow::anyhow!(\n                \"Unknown sink connector: {sink_name}\"\n            )));\n        };\n        SINK_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name)\n    };\n    let Some(allowed_fields) = allowed_fields else {\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"No allow_alter_on_fly fields registered for sink: {sink_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 sink: {sink_name}\"\n            )));\n        }\n    }\n    Ok(())\n}\n","sourceCodeStart":519,"sourceCodeEnd":550,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/allow_alter_on_fly_fields.rs#L519-L550","documentation":"Validation error from check_sink_allow_alter_on_fly_fields: the given sink has no allow_alter_on_fly field list registered in SINK_ALLOW_ALTER_ON_FLY_FIELDS, so no fields may be altered on the fly for it. JDBC is a special case reusing the connection whitelist (see TODO #24846) until sinks get a dedicated config type.","triggerScenarios":"ALTER SINK on a connector that resolves via sink_name_to_config_type_name but is absent from SINK_ALLOW_ALTER_ON_FLY_FIELDS.","commonSituations":"Hot-altering properties of sinks that require recreation (e.g. changing sink target) on connectors without hot-alter support; running an older RW against newer expectations.","solutions":["Drop and recreate the sink with the desired field values","Upgrade RisingWave if the sink gained allow_alter_on_fly support in a newer release","Only alter fields documented as hot-alterable for the sink"],"exampleFix":"// before: ALTER SINK sk SET location = 's3://new'; -- unsupported\n// after: DROP SINK sk; CREATE SINK sk FROM t WITH (connector='iceberg', location='s3://new', ...);","handlingStrategy":"validation","validationCode":"if !SUPPORTS_ALTER_ON_FLY_SINKS.contains(&sink_name) {\n    plan_recreate_sink(sink, new_fields)?;\n}","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"No allow_alter_on_fly fields registered for sink\") => {\n        // drop and recreate the sink with new fields\n    }\n    other => other?,\n}","preventionTips":["Check hot-alter support per sink before issuing ALTER SINK","Prefer recreate workflows for sinks with immutable properties","Track release notes for newly hot-alterable sink fields"],"tags":["sink","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"}