{"record":{"id":"42ea6836ca4fab7f","repo":"risingwavelabs/risingwave","slug":"compaction-small-files-threshold-mb-must-be-grea","errorCode":null,"errorMessage":"`compaction.small_files_threshold_mb` must be greater than 0","messagePattern":"`compaction\\.small_files_threshold_mb` must be greater than 0","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/config.rs","lineNumber":649,"sourceCode":"            return Err(SinkError::Config(anyhow!(\n                \"`compaction_interval_sec` must be greater than 0\"\n            )));\n        }\n\n        if config.trigger_snapshot_count == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`compaction.trigger_snapshot_count` must be greater than 0\"\n            )));\n        }\n\n        if config.max_snapshots_num_before_compaction == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`compaction.max_snapshots_num` must be greater than 0\"\n            )));\n        }\n\n        if config.small_files_threshold_mb == Some(0) {\n            return Err(SinkError::Config(anyhow!(\n                \"`compaction.small_files_threshold_mb` must be greater than 0\"\n            )));\n        }\n\n        if config.delete_files_count_threshold == Some(0) {\n            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!(","sourceCodeStart":631,"sourceCodeEnd":667,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/config.rs#L631-L667","documentation":"Raised when `small_files_threshold_mb` is Some(0). This compaction option defines the size threshold (MB) below which files are considered small; it must be greater than 0 and is validated in from_btreemap.","triggerScenarios":"CREATE SINK with `compaction.small_files_threshold_mb = 0` in the WITH options of an Iceberg sink.","commonSituations":"Zero placeholder in generated configs; users trying to disable small-file compaction by zeroing the threshold; typo where the unit was omitted.","solutions":["Set `small_files_threshold_mb` to a positive integer, e.g. 16.","Remove the option to use the default threshold."],"exampleFix":"// before\nWITH (connector = 'iceberg', small_files_threshold_mb = 0)\n// after\nWITH (connector = 'iceberg', small_files_threshold_mb = 16)","handlingStrategy":"validation","validationCode":"if (opts.small_files_threshold_mb != null && Number(opts.small_files_threshold_mb) <= 0) {\n  throw new Error('`compaction.small_files_threshold_mb` must be greater than 0');\n}","typeGuard":"function isValidOptionalPositive(v) {\n  return v == null || (Number.isInteger(v) && v > 0);\n}","tryCatchPattern":"try {\n  await createIcebergSink(opts);\n} catch (e) {\n  if (String(e).includes('small_files_threshold_mb')) {\n    delete opts.small_files_threshold_mb;\n    return createIcebergSink(opts);\n  }\n  throw e;\n}","preventionTips":["Validate MB thresholds are positive integers.","Avoid 0 placeholders in generated configs.","Use defaults by omitting the option when unsure."],"tags":["iceberg","sink","config-validation","compaction"],"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-14T16:17:12.679Z"}