{"record":{"id":"f5f2c971fef2e63b","repo":"risingwavelabs/risingwave","slug":"e-f5f2c9","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/starrocks.rs","lineNumber":159,"sourceCode":"}\n\ncrate::impl_sink_unknown_fields!(StarrocksConfig);\n\nimpl EnforceSecret for StarrocksConfig {\n    fn enforce_one(prop: &str) -> crate::error::ConnectorResult<()> {\n        StarrocksCommon::enforce_one(prop)\n    }\n}\n\nfn default_commit_checkpoint_interval() -> u64 {\n    DEFAULT_COMMIT_CHECKPOINT_INTERVAL_WITH_SINK_DECOUPLE\n}\n\nimpl StarrocksConfig {\n    pub fn from_btreemap(properties: BTreeMap<String, String>) -> Result<Self> {\n        let config =\n            serde_json::from_value::<StarrocksConfig>(serde_json::to_value(properties).unwrap())\n                .map_err(|e| SinkError::Config(anyhow!(e)))?;\n        if config.r#type != SINK_TYPE_APPEND_ONLY && config.r#type != SINK_TYPE_UPSERT {\n            return Err(SinkError::Config(anyhow!(\n                \"`{}` must be {}, or {}\",\n                SINK_TYPE_OPTION,\n                SINK_TYPE_APPEND_ONLY,\n                SINK_TYPE_UPSERT\n            )));\n        }\n        if config.commit_checkpoint_interval == 0 {\n            return Err(SinkError::Config(anyhow!(\n                \"`commit_checkpoint_interval` must be greater than 0\"\n            )));\n        }\n        if let Some(0) = config.max_batch_size_bytes {\n            return Err(SinkError::Config(anyhow!(\n                \"`starrocks.max_batch_size_bytes` must be greater than 0\"\n            )));\n        }","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/starrocks.rs#L141-L177","documentation":"`StarrocksConfig::from_btreemap` converts the sink's `WITH` options into a `StarrocksConfig` by round-tripping through serde_json and deserializing into the struct. If serde rejects the properties (unknown/missing/incorrectly-typed fields), the serde error is wrapped verbatim in a `SinkError::Config` with this message (`{e}` is the serde error text). It means the sink's user-provided options did not match the expected config shape.","triggerScenarios":"Creating a StarRocks sink whose WITH options fail `serde_json::from_value::<StarrocksConfig>` — e.g. missing required `starrocks.url`/`table` fields, a field with the wrong type (string vs number), or unknown keys when deny_unknown_fields applies.","commonSituations":"Typos in option names (`starrocks.host` vs `url`); quoting issues so a numeric option arrives as a string; forgetting required options; passing options reserved for another connector.","solutions":["Read the embedded serde error text (`{e}` in the message) — it names the exact field and mismatch.","Compare your WITH options against StarrocksConfig's expected fields and fix names/types.","Ensure required StarRocks options (url, database/table, username, password, type) are all present.","Quote complex values correctly in the CREATE SINK statement (single quotes for strings)."],"exampleFix":"-- before (missing/misspelled option)\nCREATE SINK s FROM mv WITH (connector='starrocks', starrocks.host='...', type='append_only');\n-- after\nCREATE SINK s FROM mv WITH (connector='starrocks', starrocks.url='jdbc:mysql://fe:9030', starrocks.table='t', type='append_only');","handlingStrategy":"validation","validationCode":"// Rust: verify required StarRocks options before building the sink\nfn validate_starrocks_props(props: &BTreeMap<String, String>) -> Result<(), String> {\n    for k in [\"starrocks.url\", \"starrocks.table\", \"type\"] {\n        if !props.contains_key(k) { return Err(format!(\"missing {k}\")); }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match StarrocksConfig::from_btreemap(props) {\n    Err(SinkError::Config(e)) => { log::error!(\"bad starrocks config: {e}\"); fix_props_and_retry(); }\n    other => other,\n}","preventionTips":["Copy option names exactly from StarrocksConfig field names","Read the embedded serde error in the message — it names the offending field","Keep a known-good WITH clause template for StarRocks sinks"],"tags":["starrocks","sink","config","serde"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}