{"record":{"id":"3d8b933f60a3827a","repo":"risingwavelabs/risingwave","slug":"job-has-inconsistent-snapshot-epochs-for-upstre","errorCode":null,"errorMessage":"job {} has inconsistent snapshot epochs for upstream table {}","messagePattern":"job (.+?) has inconsistent snapshot epochs for upstream table (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/controller/streaming_job.rs","lineNumber":327,"sourceCode":"                        Ok(scan_type) => scan_type,\n                        Err(err) => {\n                            collection_error = Some(anyhow::Error::new(err).context(format!(\n                                \"invalid persisted stream scan type {} in job {} fragment {}\",\n                                stream_scan.stream_scan_type, fragment.job_id, fragment.fragment_id\n                            )));\n                            return;\n                        }\n                    };\n                    if scan_type != StreamScanType::SnapshotBackfill {\n                        return;\n                    }\n                    match info\n                        .upstream_table_snapshot_epochs\n                        .entry(stream_scan.table_id)\n                    {\n                        std::collections::hash_map::Entry::Occupied(entry) => {\n                            if entry.get() != &stream_scan.snapshot_backfill_epoch {\n                                collection_error = Some(anyhow!(\n                                    \"job {} has inconsistent snapshot epochs for upstream table {}\",\n                                    fragment.job_id,\n                                    stream_scan.table_id\n                                ));\n                            }\n                        }\n                        std::collections::hash_map::Entry::Vacant(entry) => {\n                            entry.insert(stream_scan.snapshot_backfill_epoch);\n                        }\n                    }\n                });\n                if let Some(err) = collection_error {\n                    return Err(err.into());\n                }\n            }\n        }\n        let independent_jobs = job_info\n            .into_values()","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/controller/streaming_job.rs#L309-L345","documentation":"Within one streaming job, multiple fragments that scan the same upstream table (snapshot backfill scans) recorded different snapshot backfill epochs. The job's persisted fragments must agree on a single snapshot epoch per upstream table; disagreement is an internal invariant violation detected while computing change-log truncate info.","triggerScenarios":"Calling get_table_change_log_truncate_info when two fragments of the same job have StreamScan nodes for the same table_id with differing snapshot_backfill_epoch values.","commonSituations":"Corrupted or partially-updated persisted fragment graph, buggy snapshot backfill scheduling, or version-skew during upgrades.","solutions":["Drop and recreate the affected streaming job listed in the error.","Check for known snapshot-backfill bugs in your RisingWave version and upgrade to a patched release.","Restore metadata store from a backup taken before the inconsistency appeared.","Report to maintainers with job_id and fragment ids; this indicates an internal bug."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match get_table_change_log_truncate_info().await {\n    Err(e) if e.to_string().contains(\"inconsistent snapshot epochs\") => /* recreate the job or restore metadata; do not blindly retry */,\n    other => other?,\n}","preventionTips":["Upgrade to a version with fixed snapshot backfill scheduling","Avoid killing the meta node during backfill","Monitor job fragment consistency after recovery events"],"tags":["meta","snapshot-backfill","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-23T08:17:48.524Z"}