Coalesce gossip pull requests and serve them in batches (#5501)

* Coalesce gossip pull requests and serve them in batches

* batch all filters and immediately respond to messages in gossip

* Fix tests

* make download_from_replicator perform a greedy recv
This commit is contained in:
Sagar Dhawan
2019-08-15 17:04:45 -07:00
committed by GitHub
parent d5fb493aa4
commit 4ee212ae4c
5 changed files with 187 additions and 163 deletions

View File

@@ -846,7 +846,10 @@ impl Replicator {
}
}
let res = r_reader.recv_timeout(Duration::new(1, 0));
if let Ok(blobs) = res {
if let Ok(mut blobs) = res {
while let Ok(mut more) = r_reader.try_recv() {
blobs.append(&mut more);
}
window_service::process_blobs(&blobs, blocktree)?;
}
// check if all the slots in the segment are complete