risingwavelabs/risingwave · error

snapshot_backfill not enabled for table and source

Error message

snapshot_backfill not enabled for table and source

What it means

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.

Solutions

  1. Disable the snapshot_backfill option for Table/Source jobs.
  2. Only use snapshot_backfill with job types that support it (per current code, not Table/Source).
  3. Update automation/tooling to set the flag conditionally based on job kind.

Example fix

// before
CREATE SOURCE s WITH (snapshot_backfill = true, ...);
// after
CREATE SOURCE s WITH (...); // snapshot_backfill not supported for source
Defensive patterns

Strategy: validation

Validate before calling

// caller-side check before DDL
if opts.snapshot_backfill && matches!(job, StreamingJob::Table(..) | StreamingJob::Source(..)) {
    return Err("snapshot_backfill is not supported for table/source".into());
}

Try / catch

match create_streaming_job(..).await {
    Err(e) if e.to_string().contains("snapshot_backfill not enabled") => {
        // unset the option and retry
    }
    other => other?,
}

Prevention

When it happens

Trigger: Creating a streaming job (CREATE TABLE / CREATE SOURCE path, including MV/Sink/Index variants are excluded) with snapshot_backfill enabled in the job options.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/a024fe607a87628d. Report an issue: GitHub.

Appendix: source

Thrown at src/meta/src/rpc/ddl_controller.rs:1985

                    .upstream_mv_table_id_to_backfill_epoch
                    .contains_key(*id)
            })
            .cloned()
            .collect();

        let upstream_root_fragments = self
            .metadata_manager
            .get_upstream_root_fragments(&upstream_table_ids)
            .await?;

        if snapshot_backfill_info.is_some() {
            match stream_job {
                StreamingJob::MaterializedView(_)
                | StreamingJob::Sink(..)
                | StreamingJob::Index(_, _) => {}
                StreamingJob::Table(_, _, _) | StreamingJob::Source(_) => {
                    return Err(
                        anyhow!("snapshot_backfill not enabled for table and source").into(),
                    );
                }
            }
        }

        let complete_graph = CompleteStreamFragmentGraph::with_upstreams(
            fragment_graph,
            FragmentGraphUpstreamContext {
                upstream_root_fragments,
            },
            (&stream_job).into(),
        )?;
        let database_resource_group = self
            .metadata_manager
            .get_database_resource_group(stream_job.database_id())
            .await?;
        let is_serverless_backfill = matches!(
            &resource_type,

View on GitHub (pinned to 6469eb736d)