From f58507379aaab938fa52e5a7d1c17ec31ce92342 Mon Sep 17 00:00:00 2001 From: ad hoc Date: Wed, 25 May 2022 14:50:14 +0200 Subject: [PATCH] fix dump priority in scheduler --- meilisearch-lib/src/tasks/scheduler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-lib/src/tasks/scheduler.rs b/meilisearch-lib/src/tasks/scheduler.rs index cf3b14cd4..8d44a5859 100644 --- a/meilisearch-lib/src/tasks/scheduler.rs +++ b/meilisearch-lib/src/tasks/scheduler.rs @@ -110,8 +110,8 @@ impl Ord for TaskList { (Some(lhs), Some(rhs)) => lhs.cmp(rhs), } } - (TaskListIdentifier::Index(_), TaskListIdentifier::Dump) => Ordering::Greater, - (TaskListIdentifier::Dump, TaskListIdentifier::Index(_)) => Ordering::Less, + (TaskListIdentifier::Index(_), TaskListIdentifier::Dump) => Ordering::Less, + (TaskListIdentifier::Dump, TaskListIdentifier::Index(_)) => Ordering::Greater, (TaskListIdentifier::Dump, TaskListIdentifier::Dump) => { unreachable!("There should be only one Dump task list") }