{"record":{"id":"f111e03ce5f39f93","repo":"risingwavelabs/risingwave","slug":"upstream-table-id-not-set","errorCode":null,"errorMessage":"upstream table id not set: {}","messagePattern":"upstream table id not set: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/stream/stream_graph/fragment.rs","lineNumber":1623,"sourceCode":"    visit_stream_node_cont_mut(node, |node| {\n        if let Some(NodeBody::StreamScan(stream_scan)) = node.node_body.as_mut()\n            && (stream_scan.stream_scan_type == StreamScanType::SnapshotBackfill as i32\n                || stream_scan.stream_scan_type == StreamScanType::CrossDbSnapshotBackfill as i32)\n        {\n            result = try {\n                let table_id = stream_scan.table_id;\n                let snapshot_epoch = cross_db_snapshot_backfill_info\n                    .upstream_mv_table_id_to_backfill_epoch\n                    .get(&table_id)\n                    .or_else(|| {\n                        snapshot_backfill_info.and_then(|snapshot_backfill_info| {\n                            snapshot_backfill_info\n                                .upstream_mv_table_id_to_backfill_epoch\n                                .get(&table_id)\n                        })\n                    })\n                    .ok_or_else(|| anyhow!(\"upstream table id not covered: {}\", table_id))?\n                    .ok_or_else(|| anyhow!(\"upstream table id not set: {}\", table_id))?;\n                if let Some(prev_snapshot_epoch) =\n                    stream_scan.snapshot_backfill_epoch.replace(snapshot_epoch)\n                {\n                    Err(anyhow!(\n                        \"snapshot backfill epoch set again: {} {} {}\",\n                        table_id,\n                        prev_snapshot_epoch,\n                        snapshot_epoch\n                    ))?;\n                }\n                applied = true;\n            };\n            result.is_ok()\n        } else {\n            true\n        }\n    });\n    result.map_err(MetaError::from).map(|_| applied)","sourceCodeStart":1605,"sourceCodeEnd":1641,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/stream_graph/fragment.rs#L1605-L1641","documentation":"Same lookup as 'upstream table id not covered', but here the table id exists in the map while its Option<u64> epoch value is None — i.e. the source scan's snapshot_backfill_epoch was never assigned when the info was collected. The function refuses to propagate a None epoch into the downstream scan.","triggerScenarios":"fill_snapshot_backfill_epoch encountering a scan whose upstream entry maps to None — the upstream StreamScan had snapshot_backfill_epoch = None during collect_snapshot_backfill_info_impl (epoch not yet fitted, e.g. in madsim/test paths or a missing fit_snapshot_backfill_epochs call).","commonSituations":"Graphs where fit_snapshot_backfill_epochs was skipped or operator ids didn't match, leaving epochs unset before collection; test tooling that builds snapshots without assigning backfill epochs.","solutions":["Ensure fit_snapshot_backfill_epochs runs (with correct operator ids) before collecting the info.","Verify the upstream snapshot-backfill scan's epoch was set at creation; recreate the MV if it was created without one.","If running tests, set snapshot_backfill_epoch explicitly on the StreamScan nodes before calling fill."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure every snapshot-backfill scan has an epoch before collecting info:\n// scan.snapshot_backfill_epoch.is_some() for all SnapshotBackfill scans.","typeGuard":"fn epoch_set(s: &StreamScanNode) -> bool { s.snapshot_backfill_epoch.is_some() }","tryCatchPattern":null,"preventionTips":["Call fit_snapshot_backfill_epochs before collecting info.","In tests, always assign snapshot_backfill_epoch when constructing SnapshotBackfill scans.","Check operator-id matching between fit and collect phases."],"tags":["meta-service","snapshot-backfill","streaming-graph","missing-value"],"backgroundTag":"missing-required-config-field","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"}