risingwavelabs/risingwave · error · SinkError::Config
`manifest_rewrite_target_size_bytes` must be greater than 0
Error message
`manifest_rewrite_target_size_bytes` must be greater than 0
What it means
`from_btreemap` validation rejects `manifest_rewrite_target_size_bytes` equal to 0. The Iceberg sink's manifest rewrite compaction needs a positive target size to decide when to rewrite manifest files; 0 would make every manifest a rewrite candidate and is considered a config error.
Solutions
- Set `manifest_rewrite_target_size_bytes` to a positive size in bytes (e.g. 8388608 for 8MB).
- Remove the option to use the built-in default.
- Verify templated config isn't substituting 0.
- If manifest rewrite should be off, unset `enable_manifest_rewrite` instead.
Example fix
-- before CREATE SINK s ... WITH (... manifest_rewrite_target_size_bytes = '0') -- after CREATE SINK s ... WITH (... manifest_rewrite_target_size_bytes = '8388608')
Defensive patterns
Strategy: validation
Validate before calling
if let Some(sz) = props.get("manifest_rewrite_target_size_bytes") {
if sz.parse::<u64>()? == 0 { return Err("manifest_rewrite_target_size_bytes must be > 0"); }
} Type guard
fn valid_target_size(v: Option<u64>) -> bool { v.map_or(true, |s| s > 0) } Prevention
- Keep manifest rewrite defaults unless tuned deliberately
- Validate all byte-size options are positive in config pipelines
- Document units (bytes) to avoid zero-fill mistakes
When it happens
Trigger: Building an Iceberg sink config with property `manifest_rewrite_target_size_bytes` set to `0` via the sink WITH options or `IcebergConfig::from_btreemap`.
Common situations: Tuning manifest rewrite behavior with a computed value that becomes 0; copy-paste of option names with wrong units; attempts to disable manifest rewrite by zeroing the target size.
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/3482c1b83a35e87d.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/iceberg/config.rs:679
return Err(SinkError::Config(anyhow!(
"`compaction.target_file_size_mb` must be greater than 0"
)));
}
if config.write_parquet_max_row_group_rows == Some(0) {
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!(View on GitHub (pinned to 6469eb736d)