From fd583501d7ad34258a81f35aa7b8f0c827293188 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 13 Apr 2023 17:07:44 +0200 Subject: [PATCH] Use non_free_pages_size instead of real_disk_size to check task db space taken --- index-scheduler/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 3bde39040..b0ecef0f3 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -822,7 +822,7 @@ impl IndexScheduler { // 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 > 50 + && (self.env.non_free_pages_size()? * 100) / self.env.map_size()? as u64 > 50 { return Err(Error::NoSpaceLeftInTaskQueue); }