{"record":{"id":"3012df457112633d","repo":"risingwavelabs/risingwave","slug":"job-in-database-has-tables-with-different-ta","errorCode":null,"errorMessage":"job {} in database {} has tables with different table ids. {}:{}, {}:{}","messagePattern":"job (.+?) in database (.+?) has tables with different table ids\\. (.+?):(.+?), (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/meta/src/barrier/mod.rs","lineNumber":209,"sourceCode":"                let mut committed_epochs =\n                    InflightFragmentInfo::existing_table_ids(fragments.values()).map(|table_id| {\n                        (\n                            table_id,\n                            *state_table_committed_epochs\n                                .get(&table_id)\n                                .expect(\"checked exist\"),\n                        )\n                    });\n                let (first_table, first_epoch) = committed_epochs.next().ok_or_else(|| {\n                    anyhow!(\n                        \"job {} in database {} has no state table after recovery\",\n                        job_id,\n                        database_id\n                    )\n                })?;\n                for (table_id, epoch) in committed_epochs {\n                    if epoch != first_epoch {\n                        return Err(anyhow!(\n                            \"job {} in database {} has tables with different table ids. {}:{}, {}:{}\",\n                            job_id,\n                            database_id,\n                            first_table,\n                            first_epoch,\n                            table_id,\n                            epoch\n                        )\n                        .into());\n                    }\n                }\n            }\n        }\n        Ok(())\n    }\n}\n\n#[derive(Debug)]","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/barrier/mod.rs#L191-L227","documentation":"validate_database_info requires all state tables of a streaming job to share the same committed epoch, ensuring the job's tables are consistent at a single recovery point. If a table's epoch differs from the first table's epoch, recovery aborts with this error listing both (table, epoch) pairs. Note: the message says 'different table ids' but the values compared are epochs — a message wording quirk.","triggerScenarios":"Recovery where job state tables were committed at different epochs — e.g. some tables advanced in a barrier while others did not, indicating a partially-committed barrier or inconsistent Hummock version pinning.","commonSituations":"Crash/failover mid-barrier leaving tables at divergent epochs; bugs in barrier commit atomicity across state tables; restored version checkpoints that are partially applied.","solutions":["Retry recovery from a consistent Hummock version snapshot where all tables share one epoch","Investigate barrier commit logs to find where table epochs diverged and repair metadata","Rebuild the affected job (recreate the MV/sink) if its table epochs cannot be reconciled","File a bug; cross-table epoch atomicity should be guaranteed by barrier commits"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"let epochs: HashSet<_> = job.state_tables()\n    .map(|(t, e)| e)\n    .collect();\nif epochs.len() > 1 { return Err(\"state tables at divergent epochs; recovery would be inconsistent\"); }","typeGuard":null,"tryCatchPattern":"match validate_database_info(...) {\n    Err(e) if e.to_string().contains(\"different table ids\") => {\n        restore_consistent_hummock_snapshot().await; // roll back to a single-epoch version\n        retry_recovery().await;\n    }\n    r => r,\n}","preventionTips":["Commit all state tables of a job atomically within one barrier","Never restore partial Hummock version checkpoints","Add cross-table epoch consistency assertions in barrier commit tests"],"tags":["rust","meta","recovery","hummock","epoch","consistency"],"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"}