{"record":{"id":"6f5a3c53289022e7","repo":"risingwavelabs/risingwave","slug":"must-be-either-all-snapshot-backfill-or-no-snapsho","errorCode":null,"errorMessage":"must be either all snapshot_backfill or no snapshot_backfill. Curr: {stream_scan:?} Prev: {prev_stream_scan:?}","messagePattern":"must be either all snapshot_backfill or no snapshot_backfill\\. Curr: (.+?) Prev: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/stream/stream_graph/fragment.rs","lineNumber":1271,"sourceCode":"                        }\n                        _ => false,\n                    };\n\n                    match &mut prev_stream_scan {\n                        Some((prev_snapshot_backfill_info, prev_stream_scan)) => {\n                            match (prev_snapshot_backfill_info, is_snapshot_backfill) {\n                                (Some(prev_snapshot_backfill_info), true) => {\n                                    prev_snapshot_backfill_info\n                                        .upstream_mv_table_id_to_backfill_epoch\n                                        .insert(\n                                            stream_scan.table_id,\n                                            stream_scan.snapshot_backfill_epoch,\n                                        );\n                                    true\n                                }\n                                (None, false) => true,\n                                (_, _) => {\n                                    result = Err(anyhow!(\"must be either all snapshot_backfill or no snapshot_backfill. Curr: {stream_scan:?} Prev: {prev_stream_scan:?}\").into());\n                                    false\n                                }\n                            }\n                        }\n                        None => {\n                            prev_stream_scan = Some((\n                                if is_snapshot_backfill {\n                                    Some(SnapshotBackfillInfo {\n                                        upstream_mv_table_id_to_backfill_epoch: HashMap::from_iter(\n                                            [(\n                                                stream_scan.table_id,\n                                                stream_scan.snapshot_backfill_epoch,\n                                            )],\n                                        ),\n                                    })\n                                } else {\n                                    None\n                                },","sourceCodeStart":1253,"sourceCodeEnd":1289,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/stream_graph/fragment.rs#L1253-L1289","documentation":"`collect_snapshot_backfill_info_impl` walks all StreamScan nodes across fragments and requires them to be uniformly either all snapshot-backfill scans or all non-snapshot-backfill scans. A mix (one scan has snapshot backfill info, another doesn't, or vice versa) makes epoch filling ambiguous, so it errors, naming the current and previous conflicting scans.","triggerScenarios":"Building/refreshing a graph where some fragments contain StreamScan nodes of type SnapshotBackfill and others contain plain StreamScan nodes over MVs — e.g. a job mixing snapshot-backfill MV scans with regular MV scans.","commonSituations":"Creating MVs that chain over other MVs where only some upstreams were created with snapshot backfill enabled; inconsistent stream_scan_type after plan changes or version upgrades.","solutions":["Make all MV scans in the job consistent: either all snapshot backfill or none (recreate the offending MV).","Check each upstream MV's stream_scan_type and align creation settings (snapshot backfill config) across the chain.","If a version upgrade changed scan types, recreate dependent MVs so the graph is uniform."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure all upstream MV scans in the chain use a uniform snapshot-backfill setting\n// before creating dependent MVs.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create MVs in a chain with consistent snapshot-backfill configuration.","Audit upstream MV scan types before adding a dependent MV.","Recreate mixed chains so all scans are uniform."],"tags":["meta-service","snapshot-backfill","streaming-graph","internal-inconsistency"],"backgroundTag":"invalid-state-transition","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"}