risingwavelabs/risingwave · error · HummockError
bounded compaction is not supported for copy-on-write tasks
Error message
bounded compaction is not supported for copy-on-write tasks
What it means
create_task_execution rejects bounded iceberg compaction (a request carrying max_file_sequence_number) when the resolved compaction kind is copy-on-write, or when the task is pk-index coordinated. Bounded compaction relies on append/sequence-number semantics that COW publishes cannot honor, since each COW plan rewrites and publishes whole table state.
Source
Thrown at src/storage/src/hummock/compactor/iceberg_compaction/iceberg_compactor_runner.rs:946
let iceberg_config = IcebergConfig::from_btreemap(BTreeMap::from_iter(props))
.map_err(|e| HummockError::compaction_executor(e.as_report()))?;
let catalog = iceberg_config
.create_catalog()
.await
.map_err(|e| HummockError::compaction_executor(e.as_report()))?;
let table_ident = iceberg_config
.full_table_name()
.map_err(|e| HummockError::compaction_executor(e.as_report()))?;
let parsed_task_type = TaskType::try_from(task_type)
.map_err(|e| HummockError::compaction_executor(e.as_report()))?;
let compaction_kind = IcebergCompactionKind::resolve(parsed_task_type, &iceberg_config)?;
if max_file_sequence_number.is_some()
&& (pk_index_coordinated || compaction_kind.is_copy_on_write())
{
return Err(HummockError::compaction_executor(anyhow::anyhow!(
"bounded compaction is not supported for copy-on-write tasks"
)));
}
let branch = commit_branch(iceberg_config.r#type.as_str(), iceberg_config.write_mode);
let table = catalog
.load_table(&table_ident)
.await
.map_err(|e| HummockError::compaction_executor(e.as_report()))?;
if let Some(boundary) = max_file_sequence_number {
// An empty bounded plan is reported as `Drained`, so fail closed unless
// the loaded branch can prove that this fixed boundary is meaningful.
if table.metadata().format_version() < FormatVersion::V2 {
return Err(HummockError::compaction_executor(anyhow::anyhow!(
"bounded compaction requires Iceberg format V2 or V3"
)));View on GitHub (pinned to 6469eb736d)
Solutions
- Remove max_file_sequence_number from the compaction request so it runs as an unbounded task.
- Switch the iceberg table write_mode from copy-on-write to merge-on-read if bounded (incremental) compaction is required.
- Re-issue the request without a sequence boundary when using pk-index coordinated compaction.
- Align the client/tooling generating the request with the table's current write mode.
Example fix
// before // request with max_file_sequence_number = 42 against write_mode = "copy-on-write" // after: either drop the boundary // max_file_sequence_number = null // or change table config [iceberg_compaction] write_mode = "merge-on-read"
Defensive patterns
Strategy: validation
Validate before calling
fn is_bounded(req: &CompactionRequest) -> bool { req.max_file_sequence_number.is_some() }
// reject before submitting:
if is_bounded(req) && write_mode == WriteMode::CopyOnWrite { return Err("bounded compaction unsupported for COW"); } Prevention
- Only send max_file_sequence_number for merge-on-read iceberg tables.
- Keep coordinator-side request builders aware of each table's write_mode.
- Re-validate in-flight requests after switching a table's write mode.
When it happens
Trigger: start_iceberg_compactor receives a task with max_file_sequence_number set while the resolved IcebergCompactionKind is CopyOnWrite/CopyOnWriteAuto (COW write mode), or pk_index_coordinated is true with a sequence-number boundary.
Common situations: A user or tooling submits a bounded/incremental compaction request against an iceberg sink configured with write_mode = copy-on-write; meta sends a sequence-number-bounded task to a COW table after a config switch mid-flight.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- No snapshot found with ID {snapshot_id} while publishing COW
- COW compaction must produce at most one table-scoped plan, g
- Iceberg metadata relations are not supported in streaming qu
- Manual iceberg compaction task {} for sink {} failed: {}
- No iceberg compactor available
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/63b08d18daf8185e.
Report an issue: GitHub.