{"record":{"id":"aa60ac76575d00a9","repo":"risingwavelabs/risingwave","slug":"field-field-is-not-allowed-to-be-altered-on-th-aa60ac","errorCode":null,"errorMessage":"Field '{field}' is not allowed to be altered on the fly for sink: {sink_name}","messagePattern":"Field '(.+?)' is not allowed to be altered on the fly for sink: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/allow_alter_on_fly_fields.rs","lineNumber":543,"sourceCode":"    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":525,"sourceCodeEnd":550,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/allow_alter_on_fly_fields.rs#L525-L550","documentation":"Thrown by `check_sink_allow_alter_on_fly_fields` in the connector crate when an ALTER on a sink includes a field that is not on the sink connector's registered allow-list for live alteration. Some sink properties (e.g. rate limits) can be changed without recreating the sink; everything else is rejected. If no allow-list is registered for the connector at all, a related error is raised instead.","triggerScenarios":"Calling `validate_sink_props` or `update_connection_and_dependent_objects_props` with a props map containing a field that is not in the connector's `allowed_fields` set registered in allow_alter_on_fly_fields.rs.","commonSituations":"Running `ALTER SINK ... SET (field = value)` on a property that requires sink recreation, misspelling an alterable field name, or assuming a field is hot-alterable for a connector that only registers a few fields.","solutions":["Remove the field from the ALTER statement and instead recreate the sink (DROP and CREATE) with the new value.","Check the registered allow_alter_on_fly fields for your sink connector to see which fields are hot-alterable.","Fix typos in the field name so it matches the registered allow-list exactly."],"exampleFix":"// before\nALTER SINK my_sink SET (retention_ms = 86400000); -- not on allow-list\n// after\nDROP SINK my_sink;\nCREATE SINK my_sink AS ... WITH (connector = 'kafka', retention_ms = 86400000);","handlingStrategy":"validation","validationCode":"const ALLOWED_ALTER_FIELDS: Record<string, string[]> = { kafka: ['rate_limit'], ... };\nfunction assertAlterable(sink: string, fields: string[]) {\n  const allowed = ALLOWED_ALTER_FIELDS[sink] ?? [];\n  const bad = fields.filter(f => !allowed.includes(f));\n  if (bad.length) throw new Error(`Fields not hot-alterable for ${sink}: ${bad.join(',')}`);\n}\nassertAlterable('kafka', ['retention_ms']); // throws before ALTER","typeGuard":null,"tryCatchPattern":"try { await alterSink(name, props); } catch (e) { if (String(e).includes('not allowed to be altered on the fly')) await recreateSink(name, props); else throw e; }","preventionTips":["Consult the connector's registered allow_alter_on_fly list before using ALTER SINK.","Treat ALTER as invalid-and-recreate for any field not on the list.","Validate field names against the list in CI/tooling before issuing ALTER."],"tags":["sink","alter","validation","connector"],"backgroundTag":"unsupported-operation","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"}