{"record":{"id":"512ee3445d0a9d87","repo":"risingwavelabs/risingwave","slug":"failed-to-build-iceberg-compaction-execution-confi","errorCode":null,"errorMessage":"failed to build iceberg compaction execution config","messagePattern":"failed to build iceberg compaction execution config","errorType":"exception","errorClass":"HummockError","httpStatus":null,"severity":"error","filePath":"src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs","lineNumber":429,"sourceCode":"\n        // Build writer properties from sink configuration\n        let write_parquet_properties = WriterProperties::builder()\n            .set_compression(iceberg_config.get_parquet_compression())\n            .set_max_row_group_bytes(iceberg_config.write_parquet_max_row_group_bytes())\n            .set_created_by(concat!(\"risingwave version \", env!(\"CARGO_PKG_VERSION\")).to_owned())\n            .build();\n\n        let compaction_execution_config = CompactionExecutionConfigBuilder::default()\n            .enable_validate_compaction(config.enable_validate_compaction)\n            .max_record_batch_rows(config.max_record_batch_rows)\n            .write_parquet_properties(write_parquet_properties)\n            .target_file_size_bytes(iceberg_config.target_file_size_mb() * 1024 * 1024)\n            .max_concurrent_closes(config.max_concurrent_closes)\n            .enable_prefetch(config.enable_prefetch)\n            .build()\n            .map_err(|e| {\n                HummockError::compaction_executor(\n                    anyhow::Error::new(e)\n                        .context(\"failed to build iceberg compaction execution config\"),\n                )\n            })?;\n\n        tracing::info!(\n            iceberg_component = \"compaction_worker\",\n            iceberg_operation = \"execute_plan\",\n            task_id = %task_id,\n            plan_index = plan_index,\n            task_type = ?compaction_kind,\n            table = %table_ident,\n            branch = %branch,\n            input_parallelism = compaction_plan.recommended_executor_parallelism(),\n            output_parallelism = compaction_plan.recommended_output_parallelism(),\n            memory_reservation_bytes,\n            statistics = ?statistics,\n            \"iceberg_compaction_plan_started\",\n        );","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs#L411-L447","documentation":"During iceberg compaction the runner builds an icebx/parquet writer ExecutionConfig via a typed builder (writer properties, target file size, concurrency, prefetch). If the builder's validation fails, the error is wrapped with this context and surfaced as a HummockError::compaction_executor. It means the local compaction parameters assembled from IcebergConfig/runner config were rejected, not that compaction itself failed.","triggerScenarios":"IcebergCompactionExecutionConfig builder validation fails after applying iceberg_config.target_file_size_mb()*1024*1024, max_concurrent_closes, and enable_prefetch — typically a zero/out-of-range target_file_size_mb or invalid concurrency setting from config.","commonSituations":"A hand-edited risingwave.toml (or corrupted cluster parameter) sets iceberg target_file_size_mb to 0 or an absurd value; a user overrides internal config via system parameters with a wrong type; a bug in a config migration produces an invalid combination of writer options.","solutions":["Inspect the underlying error chained after this context message in the logs — it names the exact violated builder invariant.","Check the iceberg compaction config values (target_file_size_mb, max_concurrent_closes, enable_prefetch) in risingwave.toml / system parameters and reset them to valid positive values.","Re-apply default configuration (remove overrides for iceberg compaction keys) and restart the compactor.","If defaults themselves fail to build, this is an internal bug — report it with the full error report."],"exampleFix":"// before\niceberg_compaction_target_file_size_mb = 0   # invalid\n\n// after\niceberg_compaction_target_file_size_mb = 256  # positive, within allowed range","handlingStrategy":"validation","validationCode":"fn validate_iceberg_compaction_config(cfg: &IcebergCompactorRunnerConfig) -> Result<(), String> {\n    if cfg.target_file_size_mb == 0 { return Err(\"target_file_size_mb must be > 0\".into()); }\n    if cfg.max_concurrent_closes == 0 { return Err(\"max_concurrent_closes must be > 0\".into()); }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match build_execution_config(&cfg) {\n    Ok(c) => c,\n    Err(e) => { tracing::error!(root = ?e.root_cause(), \"iceberg execution config rejected\"); return Err(e); }\n}","preventionTips":["Never set target_file_size_mb or max_concurrent_closes to 0 via config overrides.","Validate config after edits with the documented ranges before applying to a running cluster.","Read the chained root cause in the report to identify the violated builder invariant quickly."],"tags":["rust","iceberg","compaction","configuration","builder"],"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"}