Skip to content

Commit

Permalink
Start base node recoveries in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmartin committed Oct 22, 2017
1 parent 60314f2 commit 62cc763
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/flow/mod.rs
Expand Up @@ -9,12 +9,11 @@ use std::net::SocketAddr;
use std::sync::{Arc, Mutex};
use std::sync::mpsc;
use std::net::IpAddr;

use mio::net::TcpListener;

use std::time;
use std::fmt;

use mio::net::TcpListener;

use slog;
use petgraph;
use petgraph::visit::Bfs;
Expand Down Expand Up @@ -305,9 +304,13 @@ impl Blender {
.map(|&(_input, ref node)| node.domain())
.collect::<Vec<_>>();

for index in indices {
for index in indices.clone() {
let domain = self.domains.get_mut(&index).unwrap();
domain.send(box payload::Packet::StartRecovery).unwrap();
}

for index in indices {
let domain = self.domains.get_mut(&index).unwrap();
domain.wait_for_ack().unwrap();
}
}
Expand Down

0 comments on commit 62cc763

Please sign in to comment.