Skip to content

Commit 4d63825

Browse files
committed
adapter: fix compute dependency collection for MVs
For compute collections, it is wrong to assume that all GlobalIds associated with a catalog entry (specifically an MV catalog entry) also map to live compute collections. Instead, only the "write GlobalId" has a live compute collection. Compute collections that were previously maintaining the catalog item have likely been dropped already.
1 parent aff3263 commit 4d63825

File tree

1 file changed

+3
-1
lines changed
  • src/adapter/src/coord/sequencer/inner

1 file changed

+3
-1
lines changed

src/adapter/src/coord/sequencer/inner/peek.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,10 @@ impl Coordinator {
863863
CatalogItem::Table(_) | CatalogItem::Source(_) => {
864864
transitive_storage_deps.extend(entry.global_ids());
865865
}
866+
// Each catalog item is computed by at most one compute collection at a time,
867+
// which is also the most recent one.
866868
CatalogItem::MaterializedView(_) | CatalogItem::Index(_) => {
867-
transitive_compute_deps.extend(entry.global_ids());
869+
transitive_compute_deps.insert(entry.latest_global_id());
868870
}
869871
_ => {}
870872
}

0 commit comments

Comments
 (0)