{"record":{"id":"5d08a228dd137f57","repo":"risingwavelabs/risingwave","slug":"manual-iceberg-compaction-task-for-sink-fail","errorCode":null,"errorMessage":"Manual iceberg compaction task {} for sink {} failed: {}","messagePattern":"Manual iceberg compaction task (.+?) for sink (.+?) failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/manager/iceberg_compaction/manual.rs","lineNumber":39,"sourceCode":"use super::*;\n\nimpl IcebergCompactionManager {\n    pub(super) fn complete_manual_task_waiter(\n        waiter: ManualCompactionWaiter,\n        report: &IcebergReportTask,\n    ) {\n        let status = IcebergReportTaskStatus::try_from(report.status)\n            .unwrap_or(IcebergReportTaskStatus::Unspecified);\n        let result = match status {\n            IcebergReportTaskStatus::Success => Ok(report.task_id),\n            IcebergReportTaskStatus::Drained\n            | IcebergReportTaskStatus::Failed\n            | IcebergReportTaskStatus::Unspecified => {\n                let message = report\n                    .error_message\n                    .clone()\n                    .unwrap_or_else(|| \"manual iceberg compaction failed\".to_owned());\n                Err(anyhow!(\n                    \"Manual iceberg compaction task {} for sink {} failed: {}\",\n                    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.","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/manager/iceberg_compaction/manual.rs#L21-L57","documentation":"The meta tracks manual Iceberg compaction tasks; when the compactor reports Failed (or Unspecified) status, complete_manual_task_waiter converts the report into an error carrying the task id, sink id and the compactor-provided error message (or a generic fallback).","triggerScenarios":"trigger_manual_compaction is waiting on the task result and the compactor reports IcebergReportTaskStatus::Failed or Unspecified for the dispatched task.","commonSituations":"Compactor node crashed or lost connection mid-task; the compactor failed to open/write the Iceberg table (credentials, permissions, catalog errors); the reported error_message field carries the root cause.","solutions":["Read the `message` suffix of this error (from report.error_message) for the compactor-side root cause.","Check the compactor node's logs for the matching task_id.","Fix the underlying cause (catalog/credentials/permissions) and re-trigger manual compaction.","If the compactor restarted, ensure it reports status for in-flight tasks or the meta will surface this generic failure."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match trigger_manual_compaction(sink_id).await {\n    Err(e) if e.to_string().contains(\"Manual iceberg compaction task\") => {\n        // surface the embedded compactor message to operators, then retry after fixing cause\n        let cause = e.to_string();\n        log::error!(\"compaction failed: {cause}\");\n    }\n    other => other?,\n}","preventionTips":["Keep compactor workers healthy and connected to avoid spurious Failed reports.","Pre-validate Iceberg catalog credentials/permissions before triggering.","Alert on IcebergReportTaskStatus::Failed reports and include task_id in alerts."],"tags":["rust","meta-service","iceberg","compaction","distributed-task"],"backgroundTag":"upstream-api-error","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"}