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

Raised when the `commit-checkpoint-interval` option on an Iceberg sink is 0. This interval controls how often commit checkpoints occur; 0 would cause immediate/never-commit behavior and is rejected during config parsing in from_btreemap.

Solutions

  1. Set `commit_checkpoint_interval` to a positive number of seconds, e.g. 60.
  2. Remove the option entirely to use the default value.
  3. If using a config generator, ensure the field is populated from a validated non-zero input.

Example fix

// before
WITH (connector = 'iceberg', commit_checkpoint_interval = 0)
// after
WITH (connector = 'iceberg', commit_checkpoint_interval = 60)
Defensive patterns

Strategy: validation

Validate before calling

if (Number(opts.commit_checkpoint_interval ?? 60) <= 0) {
  throw new Error('`commit-checkpoint-interval` must be greater than 0');
}

Type guard

function isValidInterval(v) {
  return v === undefined || (Number.isInteger(v) && v > 0);
}

Try / catch

try {
  await createIcebergSink(opts);
} catch (e) {
  if (String(e).includes('commit-checkpoint-interval')) {
    delete opts.commit_checkpoint_interval;
    return createIcebergSink(opts);
  }
  throw e;
}

Prevention

When it happens

Trigger: Creating an Iceberg sink with `commit_checkpoint_interval = 0` in the WITH options (or a profile/template defaulting it to 0).

Common situations: Copy-paste of config with placeholder 0; programmatic config builders that leave the field at its numeric default; users misunderstanding '0 = 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/3cce36202e83aff4. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/sink/iceberg/config.rs:625

        }

        // Enforce merge-on-read for append-only sinks
        Self::validate_append_only_write_mode(&config.r#type, config.write_mode)?;
        config.validate_enable_pk_index()?;
        config.validate_manifest_rewrite_format(config.format_version)?;

        // All configs start with "catalog." will be treated as java configs.
        config.java_catalog_props = iceberg_java_catalog_props_from_options(
            values
                .iter()
                .map(|(key, value)| (key.as_str(), value.as_str())),
        );
        config
            .unknown_fields
            .retain(|key, _| key != "connector" && !key.starts_with("catalog."));

        if config.commit_checkpoint_interval == 0 {
            return Err(SinkError::Config(anyhow!(
                "`commit-checkpoint-interval` must be greater than 0"
            )));
        }

        if config.compaction_interval_sec == Some(0) {
            return Err(SinkError::Config(anyhow!(
                "`compaction_interval_sec` must be greater than 0"
            )));
        }

        if config.trigger_snapshot_count == Some(0) {
            return Err(SinkError::Config(anyhow!(
                "`compaction.trigger_snapshot_count` must be greater than 0"
            )));
        }

        if config.max_snapshots_num_before_compaction == Some(0) {
            return Err(SinkError::Config(anyhow!(

View on GitHub (pinned to 6469eb736d)