{"record":{"id":"a024fe607a87628d","repo":"risingwavelabs/risingwave","slug":"snapshot-backfill-not-enabled-for-table-and-source","errorCode":null,"errorMessage":"snapshot_backfill not enabled for table and source","messagePattern":"snapshot_backfill not enabled for table and source","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/rpc/ddl_controller.rs","lineNumber":1985,"sourceCode":"                    .upstream_mv_table_id_to_backfill_epoch\n                    .contains_key(*id)\n            })\n            .cloned()\n            .collect();\n\n        let upstream_root_fragments = self\n            .metadata_manager\n            .get_upstream_root_fragments(&upstream_table_ids)\n            .await?;\n\n        if snapshot_backfill_info.is_some() {\n            match stream_job {\n                StreamingJob::MaterializedView(_)\n                | StreamingJob::Sink(..)\n                | StreamingJob::Index(_, _) => {}\n                StreamingJob::Table(_, _, _) | StreamingJob::Source(_) => {\n                    return Err(\n                        anyhow!(\"snapshot_backfill not enabled for table and source\").into(),\n                    );\n                }\n            }\n        }\n\n        let complete_graph = CompleteStreamFragmentGraph::with_upstreams(\n            fragment_graph,\n            FragmentGraphUpstreamContext {\n                upstream_root_fragments,\n            },\n            (&stream_job).into(),\n        )?;\n        let database_resource_group = self\n            .metadata_manager\n            .get_database_resource_group(stream_job.database_id())\n            .await?;\n        let is_serverless_backfill = matches!(\n            &resource_type,","sourceCodeStart":1967,"sourceCodeEnd":2003,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/rpc/ddl_controller.rs#L1967-L2003","documentation":"The snapshot_backfill flag is only supported for certain streaming job kinds. build_stream_job rejects jobs that enable snapshot_backfill while the job is a Table or Source, since that backfill mode is not implemented for those types.","triggerScenarios":"Creating a streaming job (CREATE TABLE / CREATE SOURCE path, including MV/Sink/Index variants are excluded) with snapshot_backfill enabled in the job options.","commonSituations":"Users enabling snapshot backfill options on regular tables or sources expecting shared-log/backfill optimizations; tooling that blanket-sets the flag for all DDL; feature flags left on after experiments.","solutions":["Disable the snapshot_backfill option for Table/Source jobs.","Only use snapshot_backfill with job types that support it (per current code, not Table/Source).","Update automation/tooling to set the flag conditionally based on job kind."],"exampleFix":"// before\nCREATE SOURCE s WITH (snapshot_backfill = true, ...);\n// after\nCREATE SOURCE s WITH (...); // snapshot_backfill not supported for source","handlingStrategy":"validation","validationCode":"// caller-side check before DDL\nif opts.snapshot_backfill && matches!(job, StreamingJob::Table(..) | StreamingJob::Source(..)) {\n    return Err(\"snapshot_backfill is not supported for table/source\".into());\n}","typeGuard":null,"tryCatchPattern":"match create_streaming_job(..).await {\n    Err(e) if e.to_string().contains(\"snapshot_backfill not enabled\") => {\n        // unset the option and retry\n    }\n    other => other?,\n}","preventionTips":["Only set snapshot_backfill for supported job kinds","Audit DDL tooling that sets backfill flags globally","Read feature docs to confirm supported job types"],"tags":["backfill","config","validation"],"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"}