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) = compactor

View on GitHub (pinned to 6469eb736d)

Solutions

  1. No-op is fine: the group has nothing eligible to compact; skip the call.
  2. If compaction is expected, verify SST layout and compaction config (levels, thresholds) for the compaction group.
  3. 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

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


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/0deb8af212eff324. Report an issue: GitHub.