{"record":{"id":"df9ec48a40ce3b00","repo":"risingwavelabs/risingwave","slug":"compaction-write-parquet-max-row-group-bytes-mus","errorCode":null,"errorMessage":"`compaction.write_parquet_max_row_group_bytes` must be greater than 0","messagePattern":"`compaction\\.write_parquet_max_row_group_bytes` must be greater than 0","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/config.rs","lineNumber":673,"sourceCode":"            return Err(SinkError::Config(anyhow!(\n                \"`compaction.delete_files_count_threshold` must be greater than 0\"\n            )));\n        }\n\n        if config.target_file_size_mb == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`compaction.target_file_size_mb` must be greater than 0\"\n            )));\n        }\n\n        if config.write_parquet_max_row_group_rows == Some(0) {\n            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","sourceCodeStart":655,"sourceCodeEnd":691,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/config.rs#L655-L691","documentation":"Iceberg sink configuration validation in `from_btreemap` rejects `compaction.write_parquet_max_row_group_bytes` set to 0, because a Parquet row group must hold at least some bytes for the writer to function. The value is optional (`Option<u64>`), so only an explicit `Some(0)` is rejected; unset uses the default.","triggerScenarios":"Creating an Iceberg sink (CREATE SINK ... WITH options) or programmatically building sink config via `IcebergConfig::from_btreemap` with property `compaction.write_parquet_max_row_group_bytes` equal to `0`.","commonSituations":"Developers experimenting with row-group tuning set the value to 0 to 'disable' the limit, or templating scripts interpolate a computed value that evaluates to 0.","solutions":["Set `compaction.write_parquet_max_row_group_bytes` to a positive byte value (e.g. 134217728 for 128MB).","Remove the property entirely to use the library default.","Check the SQL WITH clause or properties btreemap for a 0 value coming from an env variable or template.","If the intent is to disable compaction tuning, use the dedicated toggle instead of a 0 byte limit."],"exampleFix":"// before\nlet mut props = BTreeMap::new();\nprops.insert(\"compaction.write_parquet_max_row_group_bytes\".to_string(), \"0\".to_string());\n// after\nprops.insert(\"compaction.write_parquet_max_row_group_bytes\".to_string(), \"134217728\".to_string());","handlingStrategy":"validation","validationCode":"if let Some(bytes) = props.get(\"compaction.write_parquet_max_row_group_bytes\") {\n    if bytes.parse::<u64>().map_err(|_| \"invalid int\")? == 0 {\n        return Err(\"write_parquet_max_row_group_bytes must be > 0\");\n    }\n}","typeGuard":"fn valid_row_group_bytes(v: Option<u64>) -> bool { v.map_or(true, |b| b > 0) }","tryCatchPattern":null,"preventionTips":["Never set compaction sizes to 0 to disable features; unset them instead","Lint sink WITH options before submitting CREATE SINK","Guard templated values with max(1, computed)"],"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"}