Make it run on Windows as we use a standard io::pipe

This commit is contained in:
Kerollmops
2025-11-03 18:19:54 +01:00
parent 6e0d0d306b
commit f7f68f81a4

View File

@@ -115,9 +115,6 @@ impl IndexScheduler {
Ok(secret_key),
) => {
let runtime = self.runtime.as_ref().expect("Runtime not initialized");
#[cfg(not(unix))]
panic!("Non-unix platform does not support S3 snapshotting");
#[cfg(unix)]
runtime.block_on(self.process_snapshot_to_s3(
progress,
bucket_url,
@@ -279,7 +276,6 @@ impl IndexScheduler {
Ok(tasks)
}
#[cfg(unix)]
#[allow(clippy::too_many_arguments)]
pub(super) async fn process_snapshot_to_s3(
&self,
@@ -302,10 +298,8 @@ impl IndexScheduler {
use tokio::task::JoinHandle;
const ONE_HOUR: Duration = Duration::from_secs(3600);
// default part size is 250MiB
// TODO use 375MiB
// It must be at least 2x5MiB
const PART_SIZE: usize = 10 * 1024 * 1024;
// Parts are 375MiB which enables databases of up to 3.5TiB. Must be at least 2x5MiB.
const PART_SIZE: usize = 375 * 1024 * 1024;
// The maximum number of parts that can be uploaded in parallel.
const S3_MAX_IN_FLIGHT_PARTS: &str = "MEILI_S3_MAX_IN_FLIGHT_PARTS";