Skip to content

Commit d15730e

Browse files
authored
Fix deadlock in daemon (#1319)
Fix an issue with that the queue size of all daemon events was not big enough to deal with multiple event all exiting at the same time.
2 parents ac899ec + d70996d commit d15730e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

binaries/daemon/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ impl Daemon {
254254
let exit_when_done = spawn_command
255255
.nodes
256256
.values()
257+
.filter(|n| !n.kind.dynamic())
257258
.map(|n| (spawn_command.dataflow_id, n.id.clone()))
258259
.collect();
259260
let (reply_tx, reply_rx) = oneshot::channel();
@@ -337,7 +338,8 @@ impl Daemon {
337338
let zenoh_session = open_zenoh_session(coordinator_addr.map(|addr| addr.ip()))
338339
.await
339340
.wrap_err("failed to open zenoh session")?;
340-
let (dora_events_tx, dora_events_rx) = mpsc::channel(5);
341+
// Use a large channel capacity to prevent deadlock
342+
let (dora_events_tx, dora_events_rx) = mpsc::channel(1000);
341343
let daemon = Self {
342344
logger: Logger {
343345
destination: log_destination,

0 commit comments

Comments
 (0)