risingwavelabs/risingwave · error
trigger_manual_compaction No compactor is available. compact
Error message
trigger_manual_compaction No compactor is available. compaction_group {} What it means
trigger_manual_compaction requires an idle compactor to run the requested compaction task. When compactor_manager.next_compactor() returns None — no compactor is connected or idle — the request fails with this error naming the compaction group.
Source
Thrown at src/meta/src/hummock/manager/compaction/mod.rs:1088
self.try_send_compaction_request(compaction_group, compact_task::TaskType::Dynamic);
}
Ok(())
}
pub async fn trigger_manual_compaction(
&self,
compaction_group: CompactionGroupId,
manual_compaction_option: ManualCompactionOption,
) -> Result<ManualCompactionTriggerResult> {
let start_time = Instant::now();
let exclusive = manual_compaction_option.exclusive;
// 1. Get idle compactor.
let compactor = match self.compactor_manager.next_compactor() {
Some(compactor) => compactor,
None => {
tracing::warn!("trigger_manual_compaction No compactor is available.");
return Err(anyhow::anyhow!(
"trigger_manual_compaction No compactor is available. compaction_group {}",
compaction_group
)
.into());
}
};
// 2. Get manual compaction task.
let compact_task = self
.manual_get_compact_task_with_info(compaction_group, manual_compaction_option)
.await;
let (compact_task, blocked_by_pending) = match compact_task {
Ok((compact_task, blocked_by_pending)) => (compact_task, blocked_by_pending),
Err(err) => {
tracing::warn!(error = %err.as_report(), "Failed to get compaction task");
if matches!(err, Error::InvalidManualCompactionOption(_)) {
return Err(err);
}View on GitHub (pinned to 6469eb736d)
Solutions
- Ensure compactor processes are running and registered (`risectl hummock list-compactor` / check meta logs for compactor registration)
- Scale up compactor replicas or wait for running tasks to finish, then retry
- Check compactor-to-meta connectivity and advertise address configuration
- Retry the manual compaction after confirming an idle compactor is available
Example fix
// before risectl hummock manual-compaction --group 1 // fails: no compactor // after risedev d # or deploy a compactor so it registers with meta risectl hummock manual-compaction --group 1
Defensive patterns
Strategy: retry
Validate before calling
// Check compactor availability before issuing manual compaction
let compactors = risectl::hummock::list_compactors()?;
if compactors.is_empty() {
return Err(anyhow!("no compactor registered; start compactor first"));
}
Type guard
fn compactor_available(cm: &CompactorManager) -> bool { cm.next_compactor().is_some() }
Try / catch
match trigger_manual_compaction(group).await {
Err(e) if e.to_string().contains("No compactor is available") => {
tracing::warn!("no idle compactor; retrying in 10s");
tokio::time::sleep(Duration::from_secs(10));
// retry with backoff
}
other => other?,
}
Prevention
- Run enough compactor replicas and alert on zero registrations
- Check compactor→meta connectivity and advertise addresses
- Schedule manual compactions away from heavy automatic compaction windows
- Add retry-with-backoff around manual compaction triggers
When it happens
Trigger: Manual compaction issued (risectl/RPC) while no compactor workers are registered with the meta node, or all registered compactors are busy so next_compactor() has none available.
Common situations: Compactor deployment missing or crashed in the cluster; compactor unable to register (network/config); all compactors saturated by automatic compaction when a manual one is requested; scaling down compactor replicas to zero.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- invalid manual compaction option: {0}
- Unsupported task type for copy-on-write iceberg compaction:
- inconsistent hummock version: expected {}, actual {}
- state table {} is not registered to hummock
- job {} in database {} has tables with different table ids. {
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/250de6e1dba74f41.
Report an issue: GitHub.