{"record":{"id":"7f337518e809fb8b","repo":"risingwavelabs/risingwave","slug":"manifest-rewrite-min-count-to-merge-must-be-grea","errorCode":null,"errorMessage":"`manifest_rewrite_min_count_to_merge` must be greater than 0","messagePattern":"`manifest_rewrite_min_count_to_merge` must be greater than 0","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/config.rs","lineNumber":685,"sourceCode":"            return Err(SinkError::Config(anyhow!(\n                \"`compaction.write_parquet_max_row_group_rows` must be greater than 0\"\n            )));\n        }\n\n        if config.write_parquet_max_row_group_bytes == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`compaction.write_parquet_max_row_group_bytes` must be greater than 0\"\n            )));\n        }\n\n        if config.manifest_rewrite_target_size_bytes == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`manifest_rewrite_target_size_bytes` must be greater than 0\"\n            )));\n        }\n\n        if config.manifest_rewrite_min_count_to_merge == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`manifest_rewrite_min_count_to_merge` must be greater than 0\"\n            )));\n        }\n\n        // Validate table identifier (e.g., database.name should not contain dots)\n        config\n            .table\n            .validate()\n            .map_err(|e| SinkError::Config(anyhow!(e)))?;\n\n        if config.write_parquet_max_row_group_rows.is_some() {\n            tracing::warn!(\n                \"`compaction.write_parquet_max_row_group_rows` is deprecated and ignored; use `compaction.write_parquet_max_row_group_bytes` instead\"\n            );\n        }\n\n        Ok(config)\n    }","sourceCodeStart":667,"sourceCodeEnd":703,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/config.rs#L667-L703","documentation":"`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.","triggerScenarios":"Creating an Iceberg sink config whose properties include `manifest_rewrite_min_count_to_merge = 0`.","commonSituations":"Tuning compaction aggressiveness with zero to 'always merge', or config generators producing 0 for unset numeric fields.","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."],"exampleFix":"// before\nprops.insert(\"manifest_rewrite_min_count_to_merge\".to_string(), \"0\".to_string());\n// after\nprops.insert(\"manifest_rewrite_min_count_to_merge\".to_string(), \"100\".to_string());","handlingStrategy":"validation","validationCode":"if let Some(n) = props.get(\"manifest_rewrite_min_count_to_merge\") {\n    if n.parse::<u64>()? == 0 { return Err(\"manifest_rewrite_min_count_to_merge must be > 0\"); }\n}","typeGuard":"fn valid_min_count(v: Option<u64>) -> bool { v.map_or(true, |n| n > 0) }","tryCatchPattern":null,"preventionTips":["Treat 0 as invalid for all *_min_count options","Add a shared preflight validator for sink properties","Avoid zero-fill defaults in config generators"],"tags":["iceberg","config","sink"],"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"}