{"record":{"id":"9252af6f478f45a1","repo":"risingwavelabs/risingwave","slug":"compactiongroup-error-0","errorCode":null,"errorMessage":"CompactionGroup error: {0}","messagePattern":"CompactionGroup error: (.+?)","errorType":"exception","errorClass":"HummockError","httpStatus":null,"severity":"error","filePath":"src/storage/src/hummock/error.rs","lineNumber":71,"sourceCode":"    #[error(\"Time-travel version expired: table {table_id}, epoch {epoch}\")]\n    TimeTravelVersionExpired { table_id: TableId, epoch: u64 },\n    #[error(\n        \"Committed epoch mismatch: table {table_id}, committed_epoch {committed_epoch}, read_epoch {read_epoch}\"\n    )]\n    CommittedEpochMismatch {\n        table_id: TableId,\n        committed_epoch: u64,\n        read_epoch: u64,\n    },\n    #[error(\"Barrier read is unavailable for now. Likely the cluster is recovering\")]\n    ReadCurrentEpoch,\n    #[error(\"CompactionExecutor error: {0}\")]\n    CompactionExecutor(String),\n    #[error(\"FileCache error: {0}\")]\n    FileCache(String),\n    #[error(\"SstObjectIdTracker error: {0}\")]\n    SstObjectIdTrackerError(String),\n    #[error(\"CompactionGroup error: {0}\")]\n    CompactionGroupError(String),\n    #[error(\"SstableUpload error: {0}\")]\n    SstableUploadError(String),\n    #[error(\"Read backup error: {0}\")]\n    ReadBackupError(String),\n    #[error(\"Foyer error: {0}\")]\n    FoyerError(#[from] foyer::Error),\n    #[error(\"Other error: {0}\")]\n    Other(String),\n}\n\nimpl HummockError {\n    pub fn invalid_format_version(v: u32) -> HummockError {\n        HummockErrorInner::InvalidFormatVersion(v).into()\n    }\n\n    pub fn invalid_block() -> HummockError {\n        HummockErrorInner::InvalidBlock.into()","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/error.rs#L53-L89","documentation":"HummockError::CompactionGroupError (src/storage/src/hummock/error.rs:71-72, constructor compaction_group_error at error.rs:165-167) wraps failures from the compaction-group subsystem, which manages which SSTables belong to which compaction/group configuration (e.g. groups registered with the meta service, ACL/worker-group filtering). It is thrown when group metadata lookup, registration, or update fails or is inconsistent.","triggerScenarios":"Looking up or updating a compaction group's config (member tables, compaction config) via the meta client fails; a table is mapped to a group that no longer exists; validating compaction-group state during compactor task scheduling.","commonSituations":"Objects belonging to a group deleted while a compaction task referencing them is still in flight; manual table/group manipulation or cleanup tools desynchronizing meta state; version upgrade changing group metadata schema.","solutions":["Verify the compaction group referenced in the error still exists in meta (query meta's compaction-group tables or metrics)","Re-trigger compaction or the table/group registration; transient meta desync often resolves on the next scheduling pass","Ensure cleanup/drop operations completed fully; if a group was manually deleted, restore it or recreate affected tables/materialized views","Upgrade all nodes to the same version if the error appeared after a rolling upgrade"],"exampleFix":"// before: compactor panics on missing group state\n// after: validate group existence before scheduling\nlet groups = hummock_manager.list_compaction_groups().await?;\nlet group_exists = groups.iter().any(|g| g.id == task.compaction_group_id);\nif !group_exists {\n    // skip/reschedule instead of surfacing CompactionGroup error\n    return Ok(CompactionStatus::Ignored);\n}","handlingStrategy":"try-catch","validationCode":"// before scheduling compaction for a task, confirm the group exists\nlet groups = hummock_manager.list_compaction_groups().await?;\nassert!(\n    groups.iter().any(|g| g.id == task.compaction_group_id),\n    \"compaction group {} no longer exists\",\n    task.compaction_group_id\n);","typeGuard":"fn is_compaction_group_err(e: &HummockError) -> bool {\n    e.to_report_string().starts_with(\"CompactionGroup error:\")\n}","tryCatchPattern":"match schedule_compaction(task).await {\n    Err(e) if is_compaction_group_err(&e) => {\n        warn!(error = %e.report(), group = task.compaction_group_id, \"group state invalid; rescheduling\");\n        CompactionStatus::Ignored // let scheduler re-derive group state\n    }\n    other => other,\n}","preventionTips":["Do not manually delete or edit compaction-group state in meta; use admin tooling","Ensure table drops complete before removing their compaction groups","Re-check group membership after rolling upgrades to a new version","Treat this as an internal-inconsistency signal: capture full report and escalate if persistent"],"tags":["storage","hummock","compaction","meta"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}