risingwavelabs/risingwave · warning
trigger_manual_compaction No compaction_task is available. c
Error message
trigger_manual_compaction No compaction_task is available. compaction_group {} What it means
The compaction task selector returned no task for the requested compaction group, so manual compaction cannot proceed. If the request was exclusive and a pending (not yet committed) compaction blocks progress, the manager returns Ok(Retry) instead of this error; this error is only raised when there is genuinely nothing to compact or no eligible task.
Source
Thrown at src/meta/src/hummock/manager/compaction/mod.rs:1123
return Err(err);
}
return Err(anyhow::anyhow!(err)
.context(format!(
"Failed to get compaction task for compaction_group {}",
compaction_group,
))
.into());
}
};
let compact_task = match compact_task {
Some(compact_task) => compact_task,
None => {
if exclusive && blocked_by_pending {
return Ok(ManualCompactionTriggerResult::Retry);
}
// No compaction task available.
return Err(anyhow::anyhow!(
"trigger_manual_compaction No compaction_task is available. compaction_group {}",
compaction_group
)
.into());
}
};
// 3. send task to compactor
let task_id = compact_task.task_id;
let compact_task_string = compact_task_to_string(&compact_task);
tracing::info!(
compact_task_string,
duration = ?start_time.elapsed(),
"Triggered manual compaction task."
);
let report_rx = self.register_compaction_task_report_waiter(task_id);
if let Err(err) = compactorView on GitHub (pinned to 6469eb736d)
Solutions
- No-op is fine: the group has nothing eligible to compact; skip the call.
- If compaction is expected, verify SST layout and compaction config (levels, thresholds) for the compaction group.
- If the request is exclusive and returns Retry, re-issue the trigger after the pending compaction commits.
Example fix
// before
let task = get_compact_task(group).ok_or_else(|| anyhow!("No compaction_task is available. compaction_group {}", group))?;
// after
match get_compact_task(group) {
Some(task) => proceed(task),
None => info!(group, "nothing to compact"), // treat as success/no-op
} Defensive patterns
Strategy: retry
Validate before calling
// skip triggering when the group was recently compacted and nothing is eligible
if group_has_pending_compaction(group) { return Ok(SkipReason::Pending); } Try / catch
match trigger_manual_compaction(opt).await {
Err(e) if e.to_string().contains("No compaction_task is available") => {
// treat as benign no-op; schedule a later retry
},
other => other?,
} Prevention
- Treat this error as a no-op signal, not a failure
- Only trigger manual compaction when the group actually has eligible SSTs
- Use exclusive mode + Retry semantics when coordinating concurrent triggers
When it happens
Trigger: Calling trigger_manual_compaction when the selector picks None: e.g. the group has no SSTs needing compaction, all candidate levels are below the configured compaction threshold, or non-exclusive mode with no eligible task and not blocked by a pending task.
Common situations: Running manual compaction on an already-compact or nearly empty table/group; running it twice concurrently where the first has already compacted everything; misconfigured level thresholds making the group ineligible.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- compactor {0} is disconnected
- compaction group error: {0}
- invalid manual compaction option: {0}
- trigger_manual_compaction No compactor is available. compact
- Failed to get compaction task for compaction_group {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/0deb8af212eff324.
Report an issue: GitHub.