diff --git a/src/meta/src/manager/catalog/mod.rs b/src/meta/src/manager/catalog/mod.rs index dabb6bcb7768..12c1596841f6 100644 --- a/src/meta/src/manager/catalog/mod.rs +++ b/src/meta/src/manager/catalog/mod.rs @@ -629,11 +629,12 @@ impl CatalogManager { .into_iter() .filter(|table| valid_table_name(&table.name)) .map(|table| StreamingJobId::new(table.id)) - .chain( - sources_to_drop - .iter() - .map(|source| StreamingJobId::new(source.id)), - ) + .chain(sources_to_drop.iter().filter_map(|source| { + source + .info + .as_ref() + .and_then(|info| info.is_shared().then(|| StreamingJobId::new(source.id))) + })) .chain( sinks_to_drop .into_iter()