mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Add task deletion tests where the same task is deleted twice
This commit is contained in:
parent
f32b973945
commit
8defad6c38
5 changed files with 124 additions and 0 deletions
|
@ -830,6 +830,10 @@ impl IndexScheduler {
|
|||
|
||||
let processing_tasks = &self.processing_tasks.read().unwrap().1;
|
||||
|
||||
// TODO: Lo: Take the intersection of `matched_tasks` and `all_tasks` first,
|
||||
// so that we end up with the correct count for `deleted_tasks` (the value returned
|
||||
// by this function). Related snapshot test:
|
||||
// `task_deletion_delete_same_task_twice/task_deletion_processed.snap`
|
||||
let mut to_delete_tasks = matched_tasks - processing_tasks;
|
||||
to_delete_tasks -= enqueued_tasks;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue