Use non_free_pages_size instead of real_disk_size to check task db space taken

This commit is contained in:
Louis Dureuil 2023-04-13 17:07:44 +02:00
parent bff4bde0ce
commit fd583501d7
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}