{"record":{"id":"93f9879a47462ec2","repo":"risingwavelabs/risingwave","slug":"unsupported-task-type-in-iceberg-compaction-task","errorCode":null,"errorMessage":"Unsupported task type in iceberg compaction task: {task_type:?}","messagePattern":"Unsupported task type in iceberg compaction task: (.+?)","errorType":"exception","errorClass":"HummockError","httpStatus":null,"severity":"error","filePath":"src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs","lineNumber":131,"sourceCode":"\nimpl IcebergCompactionKind {\n    fn resolve(task_type: TaskType, iceberg_config: &IcebergConfig) -> HummockResult<Self> {\n        if should_enable_iceberg_cow(iceberg_config.r#type.as_str(), iceberg_config.write_mode) {\n            return match task_type {\n                TaskType::Auto => Ok(Self::CopyOnWriteAuto),\n                TaskType::Full => Ok(Self::CopyOnWrite),\n                _ => Err(HummockError::compaction_executor(anyhow::anyhow!(\n                    \"Unsupported task type for copy-on-write iceberg compaction: {task_type:?}\"\n                ))),\n            };\n        }\n\n        match task_type {\n            TaskType::Auto => Ok(Self::Auto),\n            TaskType::SmallFiles => Ok(Self::SmallFiles),\n            TaskType::Full => Ok(Self::Full),\n            TaskType::FilesWithDelete => Ok(Self::FilesWithDeletes),\n            _ => Err(HummockError::compaction_executor(anyhow::anyhow!(\n                \"Unsupported task type in iceberg compaction task: {task_type:?}\"\n            ))),\n        }\n    }\n\n    fn as_str(self) -> &'static str {\n        match self {\n            Self::Auto => \"auto\",\n            Self::SmallFiles => \"small-files\",\n            Self::Full => \"full\",\n            Self::FilesWithDeletes => \"files-with-delete\",\n            Self::CopyOnWriteAuto => \"copy-on-write-auto\",\n            Self::CopyOnWrite => \"copy-on-write\",\n        }\n    }\n\n    fn is_copy_on_write(self) -> bool {\n        matches!(self, Self::CopyOnWriteAuto | Self::CopyOnWrite)","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs#L113-L149","documentation":"IcebergCompactionKind::resolve maps a meta-assigned compaction TaskType (from the compact_task proto) to the internal iceberg compaction kind. Only Auto, SmallFiles, Full and FilesWithDelete are accepted in the non-copy-on-write path; any other TaskType (e.g. Manual, Dynamic, ValuesGC) reaches the catch-all arm and the runner refuses to execute the task. This is a defensive guard so iceberg compaction never silently runs with an unsupported strategy.","triggerScenarios":"A compaction task dispatched by the Hummock meta node to the iceberg compactor carries a TaskType outside {Auto, SmallFiles, Full, FilesWithDelete} (or outside {Auto, Full} when copy-on-write mode is enabled), e.g. a misrouted MOR/LSM compaction task (Manual, Dynamic) arriving at the iceberg compactor runner.","commonSituations":"Meta scheduler bug that routes regular LSM compaction tasks to iceberg sinks; a cluster upgraded/downgraded such that meta emits a task type the old/new storage binary doesn't recognize; enabling iceberg copy-on-write write mode while meta still picks SmallFiles/FilesWithDelete strategies for the sink.","solutions":["Check the write_mode in the iceberg sink config: with copy-on-write enabled only TaskType::Auto and TaskType::Full are valid; adjust the compaction strategy of the sink's compaction group or disable copy-on-write.","Verify meta and compute/storage versions match — an inconsistent rolling upgrade can make meta emit task types the storage node can't map.","Inspect the meta logs for the task creation of the iceberg sink to see why a non-iceberg TaskType (e.g. Dynamic, Manual) was assigned to this compaction group; fix the compaction group configuration.","If this persists on a supported config, file a bug with the task_type value printed in the message — it indicates a scheduler routing bug."],"exampleFix":"// before: sink configured with copy-on-write + small-files strategy\n// risingwave.toml / sink config\n[iceberg_compaction]\nwrite_mode = \"copy-on-write\"\n# meta picks TaskType::SmallFiles -> unsupported\n\n// after: use an auto or full strategy with copy-on-write\n// meta picker configured with TaskType::Auto for the iceberg compaction group","handlingStrategy":"validation","validationCode":"const SUPPORTED_MOR: &[TaskType] = &[TaskType::Auto, TaskType::SmallFiles, TaskType::Full, TaskType::FilesWithDelete];\nfn is_supported_mor_task(t: TaskType) -> bool { SUPPORTED_MOR.contains(&t) }","typeGuard":"fn is_iceberg_task_type(t: TaskType) -> bool {\n    matches!(t, TaskType::Auto | TaskType::SmallFiles | TaskType::Full | TaskType::FilesWithDelete)\n}","tryCatchPattern":"match IcebergCompactionKind::resolve(task_type, &cfg) {\n    Ok(kind) => run(kind),\n    Err(e) => { tracing::error!(?task_type, \"unsupported iceberg task type: {e:?}\"); alert_meta_routing_bug(); }\n}","preventionTips":["Keep meta's iceberg compaction group strategy aligned with the sink's write_mode (Auto/Full for COW).","Pin meta and compute/storage binaries to matching versions during rolling upgrades.","Alert on this error: it signals a scheduler routing bug, not user error."],"tags":["rust","iceberg","compaction","unsupported-operation"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}