Fix number of deleted tasks details after duplicate task deletion

This commit is contained in:
Loïc Lecrenier 2022-10-17 12:58:20 +02:00 committed by Clément Renault
parent 8defad6c38
commit 8954b1bd1d
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 20 additions and 21 deletions

View file

@ -262,18 +262,7 @@ impl IndexScheduler {
let rtxn = self.env.read_txn()?;
// This is the list of all the tasks.
let mut tasks = {
let mut all_tasks = RoaringBitmap::new();
for status in [
Status::Enqueued,
Status::Processing,
Status::Succeeded,
Status::Failed,
] {
all_tasks |= self.get_status(&rtxn, status)?;
}
all_tasks
};
let mut tasks = self.all_task_ids(&rtxn)?;
if let Some(uids) = &query.uid {
tasks &= RoaringBitmap::from_iter(uids);
@ -827,8 +816,6 @@ mod tests {
for _ in 0..2 {
handle.wait_till(Breakpoint::AfterProcessing);
}
// The three deletion tasks are marked as succeeded, and all their details say that one
// task has been deleted. Is this the correct behaviour? Probably not!
snapshot!(snapshot_index_scheduler(&index_scheduler), name: "task_deletion_processed");
}