risingwavelabs/risingwave · error · SinkError::Config
`manifest_rewrite_min_count_to_merge` must be greater than 0
Error message
`manifest_rewrite_min_count_to_merge` must be greater than 0
What it means
`from_btreemap` rejects `manifest_rewrite_min_count_to_merge` equal to 0. This option controls the minimum number of manifest files required before a rewrite/merge triggers; 0 is nonsensical for a minimum count and is treated as invalid config.
Solutions
- Set `manifest_rewrite_min_count_to_merge` to a positive integer (e.g. 100).
- Remove the option to use the default.
- Audit scripts generating sink properties for zero-filled numerics.
- Combine check with the sibling validations (row group bytes, target size) in a pre-submit config lint.
Example fix
// before
props.insert("manifest_rewrite_min_count_to_merge".to_string(), "0".to_string());
// after
props.insert("manifest_rewrite_min_count_to_merge".to_string(), "100".to_string()); Defensive patterns
Strategy: validation
Validate before calling
if let Some(n) = props.get("manifest_rewrite_min_count_to_merge") {
if n.parse::<u64>()? == 0 { return Err("manifest_rewrite_min_count_to_merge must be > 0"); }
} Type guard
fn valid_min_count(v: Option<u64>) -> bool { v.map_or(true, |n| n > 0) } Prevention
- Treat 0 as invalid for all *_min_count options
- Add a shared preflight validator for sink properties
- Avoid zero-fill defaults in config generators
When it happens
Trigger: Creating an Iceberg sink config whose properties include `manifest_rewrite_min_count_to_merge = 0`.
Common situations: Tuning compaction aggressiveness with zero to 'always merge', or config generators producing 0 for unset numeric fields.
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
- `compaction-interval-sec` must be greater than 0 when…
- `compaction.max_snapshots_num` must be greater than 0, got
- `compaction.target_file_size_mb` must be greater than 0
- `compaction.type` must not be set when `write_mode` is…
- `compaction.write_parquet_compression` must be one of
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/7f337518e809fb8b.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/iceberg/config.rs:685
return Err(SinkError::Config(anyhow!(
"`compaction.write_parquet_max_row_group_rows` must be greater than 0"
)));
}
if config.write_parquet_max_row_group_bytes == Some(0) {
return Err(SinkError::Config(anyhow!(
"`compaction.write_parquet_max_row_group_bytes` must be greater than 0"
)));
}
if config.manifest_rewrite_target_size_bytes == Some(0) {
return Err(SinkError::Config(anyhow!(
"`manifest_rewrite_target_size_bytes` must be greater than 0"
)));
}
if config.manifest_rewrite_min_count_to_merge == Some(0) {
return Err(SinkError::Config(anyhow!(
"`manifest_rewrite_min_count_to_merge` must be greater than 0"
)));
}
// Validate table identifier (e.g., database.name should not contain dots)
config
.table
.validate()
.map_err(|e| SinkError::Config(anyhow!(e)))?;
if config.write_parquet_max_row_group_rows.is_some() {
tracing::warn!(
"`compaction.write_parquet_max_row_group_rows` is deprecated and ignored; use `compaction.write_parquet_max_row_group_bytes` instead"
);
}
Ok(config)
}View on GitHub (pinned to 6469eb736d)