{"record":{"id":"3aea8ec3e9fe5811","repo":"risingwavelabs/risingwave","slug":"no-iceberg-compactor-available","errorCode":null,"errorMessage":"No iceberg compactor available","messagePattern":"No iceberg compactor available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/manager/iceberg_compaction/manual.rs","lineNumber":59,"sourceCode":"                    report.task_id,\n                    report.sink_id,\n                    message\n                )\n                .into())\n            }\n        };\n\n        let _ = waiter.send(result);\n    }\n\n    pub async fn trigger_manual_compaction(\n        &self,\n        sink_id: SinkId,\n    ) -> MetaResult<IcebergCompactionTaskId> {\n        // Fast-fail before registering a waiter when no compactor can pull the\n        // scheduler task.\n        if self.iceberg_compactor_manager.compactor_num() == 0 {\n            return Err(anyhow!(\"No iceberg compactor available\").into());\n        }\n\n        let waiter = self.start_manual_compaction(sink_id).await?;\n        let cleanup_guard = scopeguard::guard(sink_id, |sink_id| {\n            self.cancel_manual_compaction_waiter(sink_id)\n        });\n\n        tracing::info!(\n            \"Manual compaction requested for sink {}, waiting for completion...\",\n            sink_id\n        );\n\n        match waiter.await {\n            Ok(result) => {\n                let _ = scopeguard::ScopeGuard::into_inner(cleanup_guard);\n                result\n            }\n            Err(_) => {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/manager/iceberg_compaction/manual.rs#L41-L77","documentation":"Manual Iceberg compaction requires at least one registered Iceberg compactor worker. trigger_manual_compaction fast-fails before scheduling when iceberg_compactor_manager.compactor_num() == 0, instead of letting the request hang on a waiter no compactor would ever complete.","triggerScenarios":"Calling trigger_manual_compaction(sink_id) when no compactor worker is connected to the meta (compactor_num() returns 0).","commonSituations":"Compactor process not started (or crashed) in the deployment; running a meta-only profile without the compactor component; network partitions disconnecting all compactor workers.","solutions":["Start or restart the compactor component so it registers with the meta node.","Check compactor logs/health for registration failures (ports, advertise address).","Retry trigger_manual_compaction once compactor_num() > 0.","In dev, use a risedev profile that includes the compactor."],"exampleFix":"// before: manual compaction without a running compactor\n./risedev psql -c \"CALL rw_iceberg_compaction('sink')\"; // No iceberg compactor available\n// after: launch profile with compactor\n./risedev d # profile includes compactor node\n./risedev psql -c \"CALL rw_iceberg_compaction('sink')\";","handlingStrategy":"validation","validationCode":"// Caller-side pre-check via meta metrics/logs or expose compactor_num\nif meta.iceberg_compactor_count() == 0 {\n    return Err(\"no iceberg compactor registered; start the compactor component first\".into());\n}","typeGuard":null,"tryCatchPattern":"match trigger_manual_compaction(sink_id).await {\n    Err(e) if e.to_string().contains(\"No iceberg compactor available\") => {\n        // start/scale compactor workers, then retry\n        ensure_compactor_running().await?;\n        retry(|| trigger_manual_compaction(sink_id)).await\n    }\n    other => other,\n}","preventionTips":["Run the compactor component in every production profile.","Monitor compactor registration count and alert when it hits 0.","Add readiness checks that block compaction APIs until a compactor registers."],"tags":["rust","meta-service","iceberg","compaction","worker-availability"],"backgroundTag":"resource-not-found","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"}