diff --git a/index-scheduler/src/error.rs b/index-scheduler/src/error.rs index 14623871b..7b884e0a4 100644 --- a/index-scheduler/src/error.rs +++ b/index-scheduler/src/error.rs @@ -61,7 +61,7 @@ pub enum Error { SwapDuplicateIndexesFound(Vec), #[error("Index `{0}` not found.")] SwapIndexNotFound(String), - #[error("No space left in database. Free some space by deleting tasks.")] + #[error("Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations.")] NoSpaceLeftInTaskQueue, #[error( "Indexes {} not found.", diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 692888404..9c52b008d 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -820,9 +820,9 @@ impl IndexScheduler { pub fn register(&self, kind: KindWithContent) -> Result { let mut wtxn = self.env.write_txn()?; - // if the task doesn't delete anything and 90% of the task queue is full, we must refuse to enqueue the incomming task + // if the task doesn't delete anything and 50% of the task queue is full, we must refuse to enqueue the incomming task if !matches!(&kind, KindWithContent::TaskDeletion { tasks, .. } if !tasks.is_empty()) - && (self.env.real_disk_size()? * 100) / self.env.map_size()? as u64 > 90 + && (self.env.real_disk_size()? * 100) / self.env.map_size()? as u64 > 50 { return Err(Error::NoSpaceLeftInTaskQueue); } diff --git a/meilisearch/src/option.rs b/meilisearch/src/option.rs index d419e0875..563bc3496 100644 --- a/meilisearch/src/option.rs +++ b/meilisearch/src/option.rs @@ -68,7 +68,7 @@ const DEFAULT_LOG_EVERY_N: usize = 100_000; // The actual size of the virtual address space is computed at startup to determine how many 2TiB indexes can be // opened simultaneously. pub const INDEX_SIZE: u64 = 2 * 1024 * 1024 * 1024 * 1024; // 2 TiB -pub const TASK_DB_SIZE: u64 = 11 * 1024 * 1024 * 1024; // 11 GiB +pub const TASK_DB_SIZE: u64 = 20 * 1024 * 1024 * 1024; // 20 GiB #[derive(Debug, Default, Clone, Copy, Serialize, Deserialize)] #[serde(rename_all = "UPPERCASE")] diff --git a/meilisearch/tests/tasks/mod.rs b/meilisearch/tests/tasks/mod.rs index a9ed5c00f..27e212f39 100644 --- a/meilisearch/tests/tasks/mod.rs +++ b/meilisearch/tests/tasks/mod.rs @@ -1042,7 +1042,7 @@ async fn test_task_queue_is_full() { snapshot!(code, @"422 Unprocessable Entity"); snapshot!(json_string!(result), @r###" { - "message": "No space left in database. Free some space by deleting tasks.", + "message": "Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations.", "code": "no_space_left_on_device", "type": "system", "link": "https://docs.meilisearch.com/errors#no_space_left_on_device" @@ -1081,7 +1081,7 @@ async fn test_task_queue_is_full() { snapshot!(code, @"422 Unprocessable Entity"); snapshot!(json_string!(result), @r###" { - "message": "No space left in database. Free some space by deleting tasks.", + "message": "Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations.", "code": "no_space_left_on_device", "type": "system", "link": "https://docs.meilisearch.com/errors#no_space_left_on_device"