risingwavelabs/risingwave · error · SinkError::Config

`commit_checkpoint_interval` must be greater than 0

Error message

`commit_checkpoint_interval` must be greater than 0

What it means

Sink validation error raised in ClickHouse sink's validate(): the user set commit_checkpoint_interval to zero (or a non-positive value). The checkpoint interval controls how often the sink commits to ClickHouse and must be a positive number; 0 would mean commit never/invalidly.

Source

Thrown at src/connector/src/sink/clickhouse.rs:602

        if !self.is_append_only
            && !clickhouse_engine.is_collapsing_engine()
            && !clickhouse_engine.is_delete_replacing_engine()
        {
            return match clickhouse_engine {
                ClickHouseEngine::ReplicatedReplacingMergeTree(None) | ClickHouseEngine::ReplacingMergeTree(None) | ClickHouseEngine::SharedReplacingMergeTree(None) =>  {
                    Err(SinkError::ClickHouse("To enable upsert with a `ReplacingMergeTree`, you must set a `clickhouse.delete.column` to the UInt8 column in ClickHouse used to signify deletes. See https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/replacingmergetree#is_deleted for more information".to_owned()))
                }
                _ => Err(SinkError::ClickHouse("If you want to use upsert, please use either `VersionedCollapsingMergeTree`, `CollapsingMergeTree` or the `ReplacingMergeTree` in ClickHouse".to_owned()))
            };
        }

        self.check_column_name_and_type(&clickhouse_column)?;
        if !self.is_append_only {
            self.check_pk_match(&clickhouse_column)?;
        }

        if self.config.common.commit_checkpoint_interval == 0 {
            return Err(SinkError::Config(anyhow!(
                "`commit_checkpoint_interval` must be greater than 0"
            )));
        }
        Ok(())
    }

    fn validate_alter_config(config: &BTreeMap<String, String>) -> Result<()> {
        ClickHouseConfig::from_btreemap(config.clone())?;
        Ok(())
    }

    async fn new_log_sinker(&self, writer_param: SinkWriterParam) -> Result<Self::LogSinker> {
        let writer = ClickHouseSinkWriter::new(
            self.config.clone(),
            self.schema.clone(),
            self.pk_indices.clone(),
            self.is_append_only,
        )

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Set commit_checkpoint_interval to a positive integer (checkpoints per commit).
  2. Remove the option to use the default interval instead of 0.
  3. Review sink common config files for a stray commit_checkpoint_interval = 0.

Example fix

// before
WITH (connector='clickhouse', commit_checkpoint_interval=0, ...)
// after
WITH (connector='clickhouse', commit_checkpoint_interval=10, ...)
Defensive patterns

Strategy: validation

Validate before calling

if (Number(props.commit_checkpoint_interval ?? 1) <= 0) throw new Error('commit_checkpoint_interval must be greater than 0');

Prevention

When it happens

Trigger: ClickHouse sink created with commit_checkpoint_interval=0 in the WITH options (or a config path setting it to 0 in the sink common config).

Common situations: Attempting to 'disable' checkpoint commits by setting 0; copying tuning parameters from other sinks where 0 means disabled.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/2917358fe6ceec5d. Report an issue: GitHub.