Skip to content

Commit c423544

Browse files
committed
adapter: Prevent orphaned compute sinks when implement_copy_to's dataflow creation fails
1 parent c7e4fd0 commit c423544

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/adapter/src/coord/peek.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,10 @@ impl crate::coord::Coordinator {
13391339
.await
13401340
.map_err(AdapterError::concurrent_dependency_drop_from_dataflow_creation_error)
13411341
{
1342+
// Clean up the active compute sink that was added above, since the dataflow was never
1343+
// created. If we don't do this, the sink_id remains in drop_sinks but no collection
1344+
// exists in the compute controller, causing a panic when the connection terminates.
1345+
self.remove_active_compute_sink(sink_id).await;
13421346
let _ = tx.send(Err(e));
13431347
return;
13441348
}

0 commit comments

Comments
 (0)