{"record":{"id":"8bb690d9114d90c7","repo":"risingwavelabs/risingwave","slug":"unsupported-job-type-for-replacement-job-type","errorCode":null,"errorMessage":"unsupported job type for replacement: {job_type:?}","messagePattern":"unsupported job type for replacement: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/stream/stream_graph/fragment.rs","lineNumber":1980,"sourceCode":"\n                    StreamingJobType::Source => {\n                        let source_node = nodes.get_node_body().unwrap().as_source().unwrap();\n                        let all_columns = source_node.column_descs().unwrap();\n                        let output_mapping = gen_output_mapping(&output_columns, &all_columns)\n                            .ok_or_else(|| {\n                                MetaError::invalid_parameter(\n                                    \"unable to drop the column due to \\\n                                     being referenced by downstream materialized views or sinks\",\n                                )\n                            })?;\n                        assert_eq!(*dispatcher_type, DispatcherType::NoShuffle);\n                        (\n                            vec![], // not used for `NoShuffle`\n                            output_mapping,\n                        )\n                    }\n\n                    _ => bail!(\"unsupported job type for replacement: {job_type:?}\"),\n                };\n\n                let edge = StreamFragmentEdge {\n                    id: EdgeId::DownstreamExternal(DownstreamExternalEdgeId {\n                        original_upstream_fragment_id: original_table_fragment_id,\n                        downstream_fragment_id: id,\n                    }),\n                    dispatch_strategy: DispatchStrategy {\n                        r#type: *dispatcher_type as i32,\n                        output_mapping: Some(output_mapping),\n                        dist_key_indices,\n                    },\n                };\n\n                extra_downstreams\n                    .entry(table_fragment_id)\n                    .or_insert_with(HashMap::new)\n                    .try_insert(id, edge.clone())","sourceCodeStart":1962,"sourceCodeEnd":1998,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/stream_graph/fragment.rs#L1962-L1998","documentation":"When building the replacement graph for a schema change, the builder only supports a fixed set of job types for wiring external downstream edges. Any other `StreamingJobType` falls into the `_` catch-all arm and bails. It indicates the replacement planner encountered a job type it has no replacement graph strategy for.","triggerScenarios":"Running a schema-change/replacement pipeline (`format_step`/`run_pipeline`) on a streaming job whose `StreamingJobType` is not one of the explicitly handled variants in the match at src/meta/src/stream/stream_graph/fragment.rs:1980.","commonSituations":"ALTER of a newer/less-common job kind (e.g. unusual sink or source variants) added before the meta replacement graph supported it; version skew where a frontend submits a job type the meta node doesn't handle.","solutions":["Check the job type being replaced; only supported job types can go through this replacement path — alter the pipeline or add a match arm for the new job type.","Align frontend and meta versions (upgrade meta node) so the job type is recognized.","As a workaround, recreate the job with the new schema instead of in-place replacement."],"exampleFix":"// before\n_ => bail!(\"unsupported job type for replacement: {job_type:?}\"),\n// after\nStreamingJobType::Sink => { /* handle sink replacement like existing arms */ }\n_ => bail!(\"unsupported job type for replacement: {job_type:?}\"),","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[StreamingJobType] = &[/* variants handled by replacement graph */];\nif !SUPPORTED.contains(&job_type) {\n    return Err(format!(\"job type {:?} cannot be replaced in place\", job_type));\n}","typeGuard":"fn is_replaceable(job_type: &StreamingJobType) -> bool {\n    // mirror the match arms in build_replace_graph\n    !matches!(job_type, StreamingJobType::Unsupported | _ /* unhandled variants */)\n}","tryCatchPattern":"match alter_job(...) {\n    Err(e) if e.to_string().starts_with(\"unsupported job type for replacement\") => {\n        // fall back to recreate-with-new-schema\n    }\n    other => other?,\n}","preventionTips":["Only ALTER job types known to be supported for in-place replacement","Recreate the job when its type is not supported by the replacement pipeline","Keep frontend/meta versions aligned so job types are recognized"],"tags":["meta","schema-change","unsupported"],"backgroundTag":"unsupported-operation","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"}