risingwavelabs/risingwave · error
missing source id in source fragment {}
Error message
missing source id in source fragment {} What it means
When the ensemble has a source entry fragment, render_actors_with_allocator requires a source ID recorded in fragment_source_ids for that fragment (needed to attach source splits to the rendered actors). If the mapping is missing, this error names the fragment ID.
Source
Thrown at src/meta/src/controller/scale.rs:1009
}
mask.contains(FragmentTypeFlag::Source) && !mask.contains(FragmentTypeFlag::Dml)
});
let actor_template = EnsembleActorTemplate::render_new(
job,
worker_map,
entry_fragment_parallelism,
database_resource_group,
distribution_type,
vnode_count,
)?;
let source_splits = match source_entry_fragment {
Some(entry_fragment) => {
let source_id = fragment_source_ids
.get(&entry_fragment.fragment_id)
.ok_or_else(|| {
anyhow!(
"missing source id in source fragment {}",
entry_fragment.fragment_id
)
})?;
let entry_fragment_id = entry_fragment.fragment_id;
let splits = fragment_splits_map
.get(&entry_fragment_id)
.cloned()
.unwrap_or_default();
let splits: std::collections::BTreeMap<_, _> =
splits.into_iter().map(|s| (s.id(), s)).collect();
let splits = actor_template.assign_splits(entry_fragment_id, splits);
Some((splits, *source_id))
}
None => None,View on GitHub (pinned to 6469eb736d)
Solutions
- Check the catalog's source-fragment mapping for the reported fragment_id and restore/repair the mapping if the source still exists.
- Exclude the stale source fragment or re-create the source so the mapping is regenerated.
- Reload the context freshly after any DDL completes.
- Report a bug if the mapping is missing with no history of source DDL.
Defensive patterns
Strategy: validation
Validate before calling
for frag in source_entry_fragments {
assert!(ctx.fragment_source_ids.contains_key(&frag.fragment_id),
"source fragment {} lacks source id", frag.fragment_id);
} Type guard
fn has_source_mapping(ctx: &LoadedFragmentContext, frag_id: FragmentId) -> bool {
ctx.fragment_source_ids.contains_key(&frag_id)
} Try / catch
let Some(source_id) = ctx.fragment_source_ids.get(&entry_fragment.fragment_id) else {
warn!("source fragment {} has no source mapping; skipping source splits", entry_fragment.fragment_id);
return render_without_source_splits();
}; Prevention
- Never drop a source row while its fragment remains
- Regenerate fragment-to-source mappings after connector DDL
- Reload context after any source ALTER/DROP
- Check mapping completeness for source fragments before rescale
When it happens
Trigger: An ensemble includes a source entry fragment but the load stage did not populate fragment_source_ids for it — e.g. the fragment is classified as a source fragment yet has no corresponding source row, or the fragment-to-source mapping was lost in the catalog.
Common situations: Dropped/modified source connectors while fragment rows persist; jobs whose source fragments were rebuilt by an interrupted replace; version skew where older fragments lack source mapping metadata.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- entry fragments {:?} have inconsistent parallelism settings
- fragments {:?} not found
- Multiple jobs found in no-shuffle ensemble
- streaming job {job_id} not found
- streaming job {job_id} not found in streaming_job_databases
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/852589a261c8fea5.
Report an issue: GitHub.