{"record":{"id":"c591c4a0f14c8d02","repo":"risingwavelabs/risingwave","slug":"compaction-group-error-0","errorCode":null,"errorMessage":"compaction group error: {0}","messagePattern":"compaction group error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/meta/src/hummock/error.rs","lineNumber":44,"sourceCode":"#[derive(Error, Debug)]\npub enum Error {\n    #[error(\"invalid hummock context {0}\")]\n    InvalidContext(HummockContextId),\n    #[error(\"failed to access meta store\")]\n    MetaStore(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(transparent)]\n    ObjectStore(\n        #[from]\n        #[backtrace]\n        ObjectError,\n    ),\n    #[error(\"compactor {0} is disconnected\")]\n    CompactorUnreachable(HummockContextId),\n    #[error(\"compaction group error: {0}\")]\n    CompactionGroup(String),\n    #[error(\"SST {0} is invalid\")]\n    InvalidSst(HummockSstableObjectId),\n    #[error(\"invalid manual compaction option: {0}\")]\n    InvalidManualCompactionOption(String),\n    #[error(\"invalid epoch range: {start_epoch}..={end_epoch}\")]\n    InvalidEpochRange { start_epoch: u64, end_epoch: u64 },\n    #[error(\"time-travel version expired: table {table_id}, epoch {epoch}\")]\n    TimeTravelVersionExpired { table_id: TableId, epoch: u64 },\n    #[error(\"time travel\")]\n    TimeTravel(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(transparent)]\n    Internal(\n        #[from]","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/hummock/error.rs#L26-L62","documentation":"hummock::Error::CompactionGroup(String) carries a failure from the compaction-group subsystem: partitioning SSTables/tables into compaction groups and managing their configurations. The payload string describes the specific problem (e.g. invalid group membership, missing group config, illegal operation on a compaction group) returned by the compaction group manager used by Hummock meta.","triggerScenarios":"Updating or creating compaction group configs via the compaction group manager (e.g. `CompactionGroupManager::try_update_compaction_group` on table creation/drop); requesting a compaction group that does not exist; conflicting group settings for a table id; internal invariant checks inside the group manager failing.","commonSituations":"Tuning compaction via ALTER TABLE/compaction config with invalid settings; tables referencing groups removed after cleanup; races between table drop and compaction group membership updates; upgrades changing compaction-group config format.","solutions":["Read the payload string to see the exact compaction-group failure","Verify the table/SST's compaction group membership and that the target group exists","Re-check the compaction config values used (invalid ones feed into this error path)","Retry the group update after transient DDL races settle","Reset the affected table's compaction settings to defaults and reapply"],"exampleFix":"// before\nlet group_id = group_manager.get_group_of(table_id).unwrap(); // panics if missing\n// after\nmatch group_manager.get_group_of(table_id) {\n    Some(group_id) => Ok(group_id),\n    None => Err(hummock::Error::CompactionGroup(format!(\n        \"table {table_id} has no compaction group; assign default\"\n    ))),\n}","handlingStrategy":"validation","validationCode":"// Validate compaction group config before applying\nfn validate_group_update(table_id: TableId, cfg: &TableOption) -> Result<(), String> {\n    if cfg.target_group.is_some() && cfg.is_index() {\n        return Err(\"index tables cannot be moved to a custom compaction group\".into());\n    }\n    Ok(())\n}","typeGuard":"fn is_compaction_group_error(e: &hummock::Error) -> Option<&str> {\n    match e { hummock::Error::CompactionGroup(msg) => Some(msg.as_str()), _ => None }\n}","tryCatchPattern":"match update_result {\n    Err(hummock::Error::CompactionGroup(msg)) => {\n        tracing::error!(\"compaction group update rejected: {msg}\");\n        // fall back to default compaction settings for the table\n    }\n    other => other?,\n}","preventionTips":["Validate compaction config values before ALTER TABLE/CREATE statements","Keep table drop and compaction-group updates serialized to avoid races","Re-check group membership after upgrades that change config formats","Use default compaction settings unless a specific workload demands tuning"],"tags":["compaction","compaction-group","hummock"],"backgroundTag":"invalid-argument-value","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"}