Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions binaries/daemon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ pub struct RunningDataflow {
pending_drop_tokens: HashMap<DropToken, DropTokenInformation>,

/// Keep handles to all timer tasks of this dataflow to cancel them on drop.
_timer_handles: Vec<futures::future::RemoteHandle<()>>,
_timer_handles: BTreeMap<Duration, futures::future::RemoteHandle<()>>,
stop_sent: bool,

/// Used in `open_inputs`.
Expand Down Expand Up @@ -2458,7 +2458,7 @@ impl RunningDataflow {
dynamic_nodes: BTreeSet::new(),
open_external_mappings: Default::default(),
pending_drop_tokens: HashMap::new(),
_timer_handles: Vec::new(),
_timer_handles: BTreeMap::new(),
stop_sent: false,
empty_set: BTreeSet::new(),
cascading_error_causes: Default::default(),
Expand All @@ -2476,6 +2476,9 @@ impl RunningDataflow {
clock: &Arc<HLC>,
) -> eyre::Result<()> {
for interval in self.timers.keys().copied() {
if self._timer_handles.get(&interval).is_some() {
continue;
}
let events_tx = events_tx.clone();
let dataflow_id = self.id;
let clock = clock.clone();
Expand Down Expand Up @@ -2519,7 +2522,7 @@ impl RunningDataflow {
};
let (task, handle) = task.remote_handle();
tokio::spawn(task);
self._timer_handles.push(handle);
self._timer_handles.insert(interval, handle);
}

Ok(())
Expand Down
Loading