risingwavelabs/risingwave · error · HummockError
Unsupported task type in iceberg compaction task: {task_type
Error message
Unsupported task type in iceberg compaction task: {task_type:?} What it means
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.
Source
Thrown at src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs:131
impl IcebergCompactionKind {
fn resolve(task_type: TaskType, iceberg_config: &IcebergConfig) -> HummockResult<Self> {
if should_enable_iceberg_cow(iceberg_config.r#type.as_str(), iceberg_config.write_mode) {
return match task_type {
TaskType::Auto => Ok(Self::CopyOnWriteAuto),
TaskType::Full => Ok(Self::CopyOnWrite),
_ => Err(HummockError::compaction_executor(anyhow::anyhow!(
"Unsupported task type for copy-on-write iceberg compaction: {task_type:?}"
))),
};
}
match task_type {
TaskType::Auto => Ok(Self::Auto),
TaskType::SmallFiles => Ok(Self::SmallFiles),
TaskType::Full => Ok(Self::Full),
TaskType::FilesWithDelete => Ok(Self::FilesWithDeletes),
_ => Err(HummockError::compaction_executor(anyhow::anyhow!(
"Unsupported task type in iceberg compaction task: {task_type:?}"
))),
}
}
fn as_str(self) -> &'static str {
match self {
Self::Auto => "auto",
Self::SmallFiles => "small-files",
Self::Full => "full",
Self::FilesWithDeletes => "files-with-delete",
Self::CopyOnWriteAuto => "copy-on-write-auto",
Self::CopyOnWrite => "copy-on-write",
}
}
fn is_copy_on_write(self) -> bool {
matches!(self, Self::CopyOnWriteAuto | Self::CopyOnWrite)View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before: sink configured with copy-on-write + small-files strategy // risingwave.toml / sink config [iceberg_compaction] write_mode = "copy-on-write" # meta picks TaskType::SmallFiles -> unsupported // after: use an auto or full strategy with copy-on-write // meta picker configured with TaskType::Auto for the iceberg compaction group
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_MOR: &[TaskType] = &[TaskType::Auto, TaskType::SmallFiles, TaskType::Full, TaskType::FilesWithDelete];
fn is_supported_mor_task(t: TaskType) -> bool { SUPPORTED_MOR.contains(&t) } Type guard
fn is_iceberg_task_type(t: TaskType) -> bool {
matches!(t, TaskType::Auto | TaskType::SmallFiles | TaskType::Full | TaskType::FilesWithDelete)
} Try / catch
match IcebergCompactionKind::resolve(task_type, &cfg) {
Ok(kind) => run(kind),
Err(e) => { tracing::error!(?task_type, "unsupported iceberg task type: {e:?}"); alert_meta_routing_bug(); }
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Manual iceberg compaction task {} for sink {} failed: {}
- No iceberg compactor available
- Manual iceberg compaction waiter dropped unexpectedly for si
- Iceberg compaction task failed before dispatch for sink {}
- manual iceberg compaction is already waiting for sink {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/93f9879a47462ec2.
Report an issue: GitHub.