fix: use the shared constant download buffer size (#6620)

Noticed that we had forgotten to use
`remote_timeline_client.rs::BUFFER_SIZE` in one instance.
This commit is contained in:
Joonas Koivunen
2024-02-05 14:10:08 +02:00
committed by GitHub
parent 01c57ec547
commit db89b13aaa

View File

@@ -471,7 +471,7 @@ pub(crate) async fn download_initdb_tar_zst(
Err(other) => Err(other)?,
};
let mut download = tokio_util::io::StreamReader::new(download.download_stream);
let mut writer = tokio::io::BufWriter::with_capacity(8 * 1024, file);
let mut writer = tokio::io::BufWriter::with_capacity(super::BUFFER_SIZE, file);
// TODO: this consumption of the response body should be subject to timeout + cancellation, but
// not without thinking carefully about how to recover safely from cancelling a write to