Skip to content

Commit b2c8816

Browse files
authored
Merge pull request #582 from swimos/downlink-stop-voting
Fixes early termination bug in downlink runtime.
2 parents 0244a17 + 02764b6 commit b2c8816

File tree

8 files changed

+463
-133
lines changed

8 files changed

+463
-133
lines changed

runtime/swim_runtime/src/agent/task/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use std::time::Duration;
2121
use crate::agent::store::StoreInitError;
2222
use crate::agent::task::links::TriggerUnlink;
2323
use crate::agent::task::sender::LaneSendError;
24-
use crate::agent::task::timeout_coord::VoteResult;
2524
use crate::agent::task::write_fut::SpecialAction;
2625
use crate::error::InvalidKey;
26+
use crate::timeout_coord::{self, VoteResult};
2727

2828
use self::external_links::{LinksTaskState, NoReport};
2929
use self::init::Initialization;
@@ -70,7 +70,6 @@ mod prune;
7070
mod receiver;
7171
mod remotes;
7272
mod sender;
73-
mod timeout_coord;
7473
mod uri_params;
7574
mod write_fut;
7675

@@ -486,7 +485,8 @@ where
486485
let (write_tx, write_rx) = mpsc::channel(config.attachment_queue_size.get());
487486
let (http_tx, http_rx) = mpsc::channel(config.attachment_queue_size.get());
488487
let (ext_link_tx, ext_link_rx) = mpsc::channel(config.attachment_queue_size.get());
489-
let (read_vote, write_vote, http_vote, vote_waiter) = timeout_coord::timeout_coordinator();
488+
let (read_vote, write_vote, http_vote, vote_waiter) =
489+
timeout_coord::agent_timeout_coordinator();
490490

491491
let (kill_switch_tx, kill_switch_rx) = trigger::trigger();
492492

runtime/swim_runtime/src/agent/task/tests/read.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ where
177177

178178
let agent = FakeAgent::new(endpoints_rx, coord_rx, stop_rx.clone(), event_tx);
179179

180-
let (vote1, vote2, vote3, vote_rx) = timeout_coord::timeout_coordinator();
180+
let (vote1, vote2, vote3, vote_rx) = timeout_coord::agent_timeout_coordinator();
181181

182182
let read = read_task(
183183
config,

runtime/swim_runtime/src/agent/task/tests/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ where
328328

329329
let (endpoints_tx, endpoints_rx) = endpoints.into_iter().map(LaneEndpoint::split).unzip();
330330
let (instr_tx, instr_rx) = mpsc::unbounded_channel();
331-
let (vote1, vote2, vote3, vote_rx) = timeout_coord::timeout_coordinator();
331+
let (vote1, vote2, vote3, vote_rx) = timeout_coord::agent_timeout_coordinator();
332332
let (messages_tx, messages_rx) = mpsc::channel(QUEUE_SIZE.get());
333333

334334
let fake_agent = FakeAgent::new(endpoints_tx, fake_stores, stop_rx.clone(), instr_rx);

0 commit comments

Comments
 (0)