src/api2/admin/datastore/backup.rs: use smaller window sizes
This commit is contained in:
parent
174ad378d8
commit
771953f9eb
@ -104,8 +104,9 @@ fn upgrade_to_backup_protocol(
|
|||||||
let mut http = hyper::server::conn::Http::new();
|
let mut http = hyper::server::conn::Http::new();
|
||||||
http.http2_only(true);
|
http.http2_only(true);
|
||||||
// increase window size: todo - find optiomal size
|
// increase window size: todo - find optiomal size
|
||||||
http.http2_initial_stream_window_size( (1 << 31) - 2);
|
let window_size = 32*1024*1024; // max = (1 << 31) - 2
|
||||||
http.http2_initial_connection_window_size( (1 << 31) - 2);
|
http.http2_initial_stream_window_size(window_size);
|
||||||
|
http.http2_initial_connection_window_size(window_size);
|
||||||
|
|
||||||
http.serve_connection(conn, service)
|
http.serve_connection(conn, service)
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
|
@ -506,7 +506,7 @@ impl BackupClient {
|
|||||||
mpsc::Sender<(MergedChunkInfo, Option<h2::client::ResponseFuture>)>,
|
mpsc::Sender<(MergedChunkInfo, Option<h2::client::ResponseFuture>)>,
|
||||||
sync::oneshot::Receiver<Result<(), Error>>
|
sync::oneshot::Receiver<Result<(), Error>>
|
||||||
) {
|
) {
|
||||||
let (verify_queue_tx, verify_queue_rx) = mpsc::channel(100);
|
let (verify_queue_tx, verify_queue_rx) = mpsc::channel(64);
|
||||||
let (verify_result_tx, verify_result_rx) = sync::oneshot::channel();
|
let (verify_result_tx, verify_result_rx) = sync::oneshot::channel();
|
||||||
|
|
||||||
let h2_2 = h2.clone();
|
let h2_2 = h2.clone();
|
||||||
@ -521,7 +521,7 @@ impl BackupClient {
|
|||||||
response
|
response
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
.and_then(H2Client::h2api_response)
|
.and_then(H2Client::h2api_response)
|
||||||
.and_then(move |result| {
|
.and_then(move |_result| {
|
||||||
Ok(MergedChunkInfo::Known(list))
|
Ok(MergedChunkInfo::Known(list))
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user