{"record":{"id":"7259d51ebcc73a0d","repo":"risingwavelabs/risingwave","slug":"commit-checkpoint-interval-must-be-greater-than-7259d5","errorCode":null,"errorMessage":"`commit_checkpoint_interval` must be greater than 0","messagePattern":"`commit_checkpoint_interval` must be greater than 0","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/starrocks.rs","lineNumber":169,"sourceCode":"fn 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        }\n        Ok(config)\n    }\n}\n\n#[derive(Debug, PartialEq, Eq)]\nstruct LoadRequestSizeDecision {\n    finish_current_load: bool,\n    next_batch_size_bytes: u64,\n}\n","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/starrocks.rs#L151-L187","documentation":"`from_btreemap` validates that `commit_checkpoint_interval` is strictly positive; a value of 0 would mean committing every zero checkpoints, which StarRocks sink semantics forbid, so it raises this `SinkError::Config`. This guards against misconfiguration that would otherwise break the flush/checkpoint loop.","triggerScenarios":"Creating a StarRocks sink with `commit_checkpoint_interval=0` in the WITH options (e.g. misunderstanding that 0 means 'auto' or 'immediate').","commonSituations":"Users setting 0 expecting 'commit as fast as possible' or to disable the interval; templating tools emitting a default 0; copy-paste from configs where 0 was a valid sentinel.","solutions":["Set `commit_checkpoint_interval` to a positive integer (checkpoints between commits; e.g. 10 for every 10th checkpoint).","Remove the option entirely to use the default value defined in StarrocksConfig.","If you need lower latency, reduce the interval to a small positive number rather than 0."],"exampleFix":"-- before\nCREATE SINK s FROM mv WITH (connector='starrocks', commit_checkpoint_interval=0, ...);\n-- after\nCREATE SINK s FROM mv WITH (connector='starrocks', commit_checkpoint_interval=10, ...);","handlingStrategy":"validation","validationCode":"// Rust: reject zero before constructing the sink\nif let Some(v) = props.get(\"commit_checkpoint_interval\") {\n    if v.parse::<u64>().map_or(true, |n| n == 0) { return Err(\"commit_checkpoint_interval must be > 0\".into()); }\n}","typeGuard":null,"tryCatchPattern":"match StarrocksConfig::from_btreemap(props) {\n    Err(e) if e.to_string().contains(\"commit_checkpoint_interval\") => {\n        eprintln!(\"use a positive integer or omit the option for the default\");\n    }\n    other => other,\n}","preventionTips":["Never set 0 expecting 'auto' — omit the option for defaults","Validate numeric option values in tooling before CREATE SINK","Document that the interval counts checkpoints and must be >= 1"],"tags":["starrocks","sink","config","validation"],"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-23T08:17:48.524Z"}