diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 31c338bb5..85b9b41d4 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1187,6 +1187,7 @@ impl IndexScheduler { let mut affected_indexes = HashSet::new(); let mut affected_statuses = HashSet::new(); let mut affected_kinds = HashSet::new(); + let mut affected_canceled_by = RoaringBitmap::new(); for task_id in to_delete_tasks.iter() { let task = self.get_task(wtxn, task_id)?.ok_or(Error::CorruptedTaskQueue)?; @@ -1205,6 +1206,9 @@ impl IndexScheduler { if let Some(finished_at) = task.finished_at { utils::remove_task_datetime(wtxn, self.finished_at, finished_at, task.uid)?; } + if let Some(canceled_by) = task.canceled_by { + affected_canceled_by.insert(canceled_by); + } } for index in affected_indexes { @@ -1222,6 +1226,17 @@ impl IndexScheduler { for task in to_delete_tasks.iter() { self.all_tasks.delete(wtxn, &BEU32::new(task))?; } + for canceled_by in affected_canceled_by { + let canceled_by = BEU32::new(canceled_by); + if let Some(mut tasks) = self.canceled_by.get(wtxn, &canceled_by)? { + tasks -= &to_delete_tasks; + if tasks.is_empty() { + self.canceled_by.delete(wtxn, &canceled_by)?; + } else { + self.canceled_by.put(wtxn, &canceled_by, &tasks)?; + } + } + } Ok(to_delete_tasks.len()) } @@ -1259,6 +1274,7 @@ impl IndexScheduler { task.finished_at = Some(now); self.update_task(wtxn, &task)?; } + self.canceled_by.put(wtxn, &BEU32::new(cancel_task_id), &tasks_to_cancel)?; Ok(content_files_to_delete) } diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index 50846c555..84e1c257f 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -20,6 +20,7 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String { status, kind, index_tasks, + canceled_by, enqueued_at, started_at, finished_at, @@ -64,6 +65,10 @@ pub fn snapshot_index_scheduler(scheduler: &IndexScheduler) -> String { snap.push_str(&snapshot_index_mapper(&rtxn, index_mapper)); snap.push_str("\n----------------------------------------------------------------------\n"); + snap.push_str("### Canceled By:\n"); + snap.push_str(&snapshot_canceled_by(&rtxn, *canceled_by)); + snap.push_str("\n----------------------------------------------------------------------\n"); + snap.push_str("### Enqueued At:\n"); snap.push_str(&snapshot_date_db(&rtxn, *enqueued_at)); snap.push_str("----------------------------------------------------------------------\n"); @@ -231,7 +236,18 @@ pub fn snapshot_index_tasks(rtxn: &RoTxn, db: Database) } snap } - +pub fn snapshot_canceled_by( + rtxn: &RoTxn, + db: Database, RoaringBitmapCodec>, +) -> String { + let mut snap = String::new(); + let iter = db.iter(rtxn).unwrap(); + for next in iter { + let (kind, task_ids) = next.unwrap(); + writeln!(snap, "{kind} {}", snapshot_bitmap(&task_ids)).unwrap(); + } + snap +} pub fn snapshot_index_mapper(rtxn: &RoTxn, mapper: &IndexMapper) -> String { let names = mapper.indexes(rtxn).unwrap().into_iter().map(|(n, _)| n).collect::>(); format!("{names:?}") diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 2a9b068ea..1655acdac 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -85,7 +85,9 @@ pub struct Query { pub index_uids: Option>, /// The [task ids](`meilisearch_types::tasks::Task::uid`) to be matched pub uids: Option>, - + /// The [task ids](`meilisearch_types::tasks::Task::uid`) of the [`TaskCancelation`](meilisearch_types::tasks::Task::Kind::TaskCancelation) tasks + /// that canceled the matched tasks. + pub canceled_by: Option>, /// Exclusive upper bound of the matched tasks' [`enqueued_at`](meilisearch_types::tasks::Task::enqueued_at) field. pub before_enqueued_at: Option, /// Exclusive lower bound of the matched tasks' [`enqueued_at`](meilisearch_types::tasks::Task::enqueued_at) field. @@ -113,6 +115,7 @@ impl Query { types: None, index_uids: None, uids: None, + canceled_by: None, before_enqueued_at: None, after_enqueued_at: None, before_started_at: None, @@ -185,6 +188,7 @@ mod db_name { pub const STATUS: &str = "status"; pub const KIND: &str = "kind"; pub const INDEX_TASKS: &str = "index-tasks"; + pub const CANCELED_BY: &str = "canceled_by"; pub const ENQUEUED_AT: &str = "enqueued-at"; pub const STARTED_AT: &str = "started-at"; pub const FINISHED_AT: &str = "finished-at"; @@ -256,6 +260,9 @@ pub struct IndexScheduler { /// Store the tasks associated to an index. pub(crate) index_tasks: Database, + /// Store the tasks that were canceled by a task uid + pub(crate) canceled_by: Database, RoaringBitmapCodec>, + /// Store the task ids of tasks which were enqueued at a specific date pub(crate) enqueued_at: Database, CboRoaringBitmapCodec>, @@ -316,6 +323,7 @@ impl IndexScheduler { status: self.status, kind: self.kind, index_tasks: self.index_tasks, + canceled_by: self.canceled_by, enqueued_at: self.enqueued_at, started_at: self.started_at, finished_at: self.finished_at, @@ -349,7 +357,7 @@ impl IndexScheduler { std::fs::create_dir_all(&options.dumps_path)?; let env = heed::EnvOpenOptions::new() - .max_dbs(9) + .max_dbs(10) .map_size(options.task_db_size) .open(options.tasks_path)?; let file_store = FileStore::new(&options.update_file_path)?; @@ -363,6 +371,7 @@ impl IndexScheduler { status: env.create_database(Some(db_name::STATUS))?, kind: env.create_database(Some(db_name::KIND))?, index_tasks: env.create_database(Some(db_name::INDEX_TASKS))?, + canceled_by: env.create_database(Some(db_name::CANCELED_BY))?, enqueued_at: env.create_database(Some(db_name::ENQUEUED_AT))?, started_at: env.create_database(Some(db_name::STARTED_AT))?, finished_at: env.create_database(Some(db_name::FINISHED_AT))?, @@ -403,7 +412,6 @@ impl IndexScheduler { /// only once per index scheduler. fn run(&self) { let run = self.private_clone(); - std::thread::spawn(move || loop { run.wake_up.wait(); @@ -422,6 +430,7 @@ impl IndexScheduler { ) { std::thread::sleep(Duration::from_secs(1)); } + run.wake_up.signal(); } } }); @@ -480,6 +489,16 @@ impl IndexScheduler { tasks &= &uids; } + if let Some(canceled_by) = &query.canceled_by { + for cancel_task_uid in canceled_by { + if let Some(canceled_by_uid) = + self.canceled_by.get(rtxn, &BEU32::new(*cancel_task_uid))? + { + tasks &= canceled_by_uid; + } + } + } + if let Some(kind) = &query.types { let mut kind_tasks = RoaringBitmap::new(); for kind in kind { @@ -590,9 +609,9 @@ impl IndexScheduler { ) -> Result { let mut tasks = self.get_task_ids(rtxn, query)?; - // If the query contains a list of `index_uid`, then we must exclude all the kind that - // arn't associated to one and only one index. - if query.index_uids.is_some() { + // If the query contains a list of index uid or there is a finite list of authorized indexes, + // then we must exclude all the kinds that aren't associated to one and only one index. + if query.index_uids.is_some() || authorized_indexes.is_some() { for kind in enum_iterator::all::().filter(|kind| !kind.related_to_one_index()) { tasks -= self.get_kind(rtxn, kind)?; } @@ -1786,6 +1805,7 @@ mod tests { .unwrap(); index_scheduler.assert_internally_consistent(); + snapshot!(snapshot_index_scheduler(&index_scheduler), name: "cancel_task_registered"); // Now we check that we can reach the AbortedIndexation error handling handle.wait_till(Breakpoint::AbortedIndexation); index_scheduler.assert_internally_consistent(); @@ -2449,7 +2469,7 @@ mod tests { .unwrap(); // we asked for all the tasks, but we are only authorized to retrieve the doggo and catto tasks // -> all tasks except the swap of catto with whalo are returned - snapshot!(snapshot_bitmap(&tasks), @"[0,1,2,]"); + snapshot!(snapshot_bitmap(&tasks), @"[0,1,]"); let query = Query::default(); let tasks = @@ -2459,23 +2479,43 @@ mod tests { } #[test] - fn fail_in_create_batch_for_index_creation() { + fn query_tasks_canceled_by() { let (index_scheduler, handle) = - IndexScheduler::test(true, vec![(1, FailureLocation::InsideCreateBatch)]); + IndexScheduler::test(true, vec![(3, FailureLocation::InsideProcessBatch)]); - let kinds = [index_creation_task("catto", "mouse")]; + let kind = index_creation_task("catto", "mouse"); + let _ = index_scheduler.register(kind).unwrap(); + let kind = index_creation_task("doggo", "sheep"); + let _ = index_scheduler.register(kind).unwrap(); + let kind = KindWithContent::IndexSwap { + swaps: vec![IndexSwap { indexes: ("catto".to_owned(), "doggo".to_owned()) }], + }; + let _task = index_scheduler.register(kind).unwrap(); - for kind in kinds { - let _task = index_scheduler.register(kind).unwrap(); - index_scheduler.assert_internally_consistent(); - } - handle.wait_till(Breakpoint::BatchCreated); + handle.advance_n_batch(1); + let kind = KindWithContent::TaskCancelation { + query: "test_query".to_string(), + tasks: [0, 1, 2, 3].into_iter().collect(), + }; + let task_cancelation = index_scheduler.register(kind).unwrap(); + handle.advance_n_batch(1); - // We skipped an iteration of `tick` to reach BatchCreated - assert_eq!(*index_scheduler.run_loop_iteration.read().unwrap(), 2); - // Otherwise nothing weird happened - index_scheduler.assert_internally_consistent(); - snapshot!(snapshot_index_scheduler(&index_scheduler)); + snapshot!(snapshot_index_scheduler(&index_scheduler), name: "start"); + + let rtxn = index_scheduler.read_txn().unwrap(); + let query = Query { canceled_by: Some(vec![task_cancelation.uid]), ..Query::default() }; + let tasks = + index_scheduler.get_task_ids_from_authorized_indexes(&rtxn, &query, &None).unwrap(); + // 0 is not returned because it was not canceled, 3 is not returned because it is the uid of the + // taskCancelation itself + snapshot!(snapshot_bitmap(&tasks), @"[1,2,]"); + + let query = Query { canceled_by: Some(vec![task_cancelation.uid]), ..Query::default() }; + let tasks = index_scheduler + .get_task_ids_from_authorized_indexes(&rtxn, &query, &Some(vec!["doggo".to_string()])) + .unwrap(); + // Return only 1 because the user is not authorized to see task 2 + snapshot!(snapshot_bitmap(&tasks), @"[1,]"); } #[test] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap index 659a325c5..ef9a54f9c 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap @@ -23,6 +23,10 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: +1 [0,] + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap index 6b44b0acc..5bbb74c82 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap @@ -21,6 +21,9 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap index 675ba268d..42f4ce8fa 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap @@ -27,6 +27,10 @@ wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: ["beavero", "catto"] +---------------------------------------------------------------------- +### Canceled By: +3 [1,2,] + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap index 8e3ef1692..36d34ff93 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap @@ -24,6 +24,9 @@ wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap index 219ea9968..194567da1 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap @@ -26,6 +26,9 @@ wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap index 0eb9838c7..237eed237 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap @@ -23,6 +23,10 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: +1 [0,] + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_create_batch_for_index_creation/1.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap similarity index 58% rename from index-scheduler/src/snapshots/lib.rs/fail_in_create_batch_for_index_creation/1.snap rename to index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap index b78d63444..335511562 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_create_batch_for_index_creation/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap @@ -6,28 +6,35 @@ source: index-scheduler/src/lib.rs [0,] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: enqueued, details: { primary_key: Some("mouse") }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} +0 {uid: 0, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "catto", primary_key: None, method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: true }} +1 {uid: 1, status: enqueued, details: { matched_tasks: 1, canceled_tasks: None, original_query: "test_query" }, kind: TaskCancelation { query: "test_query", tasks: RoaringBitmap<[0]> }} ---------------------------------------------------------------------- ### Status: -enqueued [0,] +enqueued [0,1,] ---------------------------------------------------------------------- ### Kind: -"indexCreation" [0,] +"documentAdditionOrUpdate" [0,] +"taskCancelation" [1,] ---------------------------------------------------------------------- ### Index Tasks: catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] +[timestamp] [1,] ---------------------------------------------------------------------- ### Started At: ---------------------------------------------------------------------- ### Finished At: ---------------------------------------------------------------------- ### File Store: +00000000-0000-0000-0000-000000000000 ---------------------------------------------------------------------- diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap index 9bcfbd2b3..905cec451 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap @@ -19,6 +19,9 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap index 7f071b2f2..68ed945a8 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap @@ -22,6 +22,10 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: +1 [] + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap index d16658b72..e52a80fae 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap @@ -20,6 +20,9 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap index 8541c7c1b..f9195857a 100644 --- a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap @@ -28,6 +28,9 @@ girafos [2,5,] ---------------------------------------------------------------------- ### Index Mapper: ["cattos", "doggos", "girafos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/1.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/1.snap index 6abb00f81..3e654a0e2 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/1.snap @@ -19,6 +19,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/2.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/2.snap index b9e745cf0..10291b206 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/2.snap @@ -19,6 +19,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/3.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/3.snap index 2bcc9368d..6079a4317 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/3.snap @@ -20,6 +20,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/1.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/1.snap index 448988c8c..1f730c685 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/1.snap @@ -23,6 +23,9 @@ doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/2.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/2.snap index 6954d37e0..2ff82bfd2 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/2.snap @@ -24,6 +24,9 @@ doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap index 3f921934d..5b29f06a0 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap @@ -21,6 +21,9 @@ doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap index 2abd3e4cf..f8586b7b8 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap @@ -22,6 +22,9 @@ doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap index b9e745cf0..10291b206 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap @@ -19,6 +19,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap index 750edbbf2..5db6a222a 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap @@ -20,6 +20,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap index 11bfb09c1..252ae082e 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap @@ -20,6 +20,9 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap index 6abb00f81..3e654a0e2 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap @@ -19,6 +19,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/second_iteration.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/second_iteration.snap index 2bcc9368d..6079a4317 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/second_iteration.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/second_iteration.snap @@ -20,6 +20,9 @@ doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/1.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/1.snap index ddac65249..295dcbf20 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/1.snap @@ -23,6 +23,9 @@ index_b [1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap index 211c67326..60d8c4cdb 100644 --- a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap @@ -20,6 +20,9 @@ catto [0,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/all_tasks_processed.snap index c75964581..c7190dd8b 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/all_tasks_processed.snap @@ -24,6 +24,9 @@ doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: ["cattos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/all_tasks_processed.snap index 44ce75ebb..e52c36718 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/all_tasks_processed.snap @@ -24,6 +24,9 @@ doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap new file mode 100644 index 000000000..d4d934e5f --- /dev/null +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap @@ -0,0 +1,53 @@ +--- +source: index-scheduler/src/lib.rs +--- +### Autobatching Enabled = true +### Processing Tasks: +[] +---------------------------------------------------------------------- +### All Tasks: +0 {uid: 0, status: succeeded, details: { primary_key: Some("mouse") }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} +1 {uid: 1, status: canceled, canceled_by: 3, details: { primary_key: Some("sheep") }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("sheep") }} +2 {uid: 2, status: canceled, canceled_by: 3, details: { swaps: [IndexSwap { indexes: ("catto", "doggo") }] }, kind: IndexSwap { swaps: [IndexSwap { indexes: ("catto", "doggo") }] }} +3 {uid: 3, status: succeeded, details: { matched_tasks: 3, canceled_tasks: Some(0), original_query: "test_query" }, kind: TaskCancelation { query: "test_query", tasks: RoaringBitmap<[0, 1, 2]> }} +---------------------------------------------------------------------- +### Status: +enqueued [] +succeeded [0,3,] +canceled [1,2,] +---------------------------------------------------------------------- +### Kind: +"indexCreation" [0,1,] +"indexSwap" [2,] +"taskCancelation" [3,] +---------------------------------------------------------------------- +### Index Tasks: +catto [0,2,] +doggo [1,2,] +---------------------------------------------------------------------- +### Index Mapper: +["catto"] +---------------------------------------------------------------------- +### Canceled By: +3 [1,2,] + +---------------------------------------------------------------------- +### Enqueued At: +[timestamp] [0,] +[timestamp] [1,] +[timestamp] [2,] +[timestamp] [3,] +---------------------------------------------------------------------- +### Started At: +[timestamp] [0,] +[timestamp] [3,] +---------------------------------------------------------------------- +### Finished At: +[timestamp] [0,] +[timestamp] [1,2,] +[timestamp] [3,] +---------------------------------------------------------------------- +### File Store: + +---------------------------------------------------------------------- + diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/finished.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/finished.snap index dff6707f4..694bbff26 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/finished.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/finished.snap @@ -24,6 +24,9 @@ whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: ["catto", "doggo", "whalo"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/start.snap index 2717569f4..8427679e7 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/start.snap @@ -23,6 +23,9 @@ whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap index 6b7ec2a2a..65838db64 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap @@ -25,6 +25,9 @@ whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: ["catto", "doggo"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap index 60c8de558..aed5aed8c 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap @@ -23,6 +23,9 @@ whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap index caab362d7..2bb4f7590 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap @@ -25,6 +25,9 @@ whalo [3,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/register/1.snap b/index-scheduler/src/snapshots/lib.rs/register/1.snap index 95eaa11c5..360752bc6 100644 --- a/index-scheduler/src/snapshots/lib.rs/register/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/register/1.snap @@ -24,6 +24,9 @@ doggo [3,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap index ec2c10e95..17e8936f0 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap @@ -29,6 +29,9 @@ d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/initial_tasks_processed.snap index 073f280f3..b20b3b320 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/initial_tasks_processed.snap @@ -26,6 +26,9 @@ d [3,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap index d820e04e6..acfbc4c77 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap @@ -29,6 +29,9 @@ d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap index 26bd1b0d3..c7c6faae6 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap @@ -30,6 +30,9 @@ d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap index c1472fdc8..0f8355f25 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap @@ -29,6 +29,9 @@ d [3,4,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap index 3b98a429f..fd9790835 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap @@ -31,6 +31,9 @@ f [4,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap index 073f280f3..b20b3b320 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap @@ -26,6 +26,9 @@ d [3,] ---------------------------------------------------------------------- ### Index Mapper: ["a", "b", "c", "d"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap index 162cffd2b..fc37dcf2d 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap @@ -21,6 +21,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap index c33926a04..e4c4d9d7e 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap @@ -22,6 +22,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap index bbea9ff8b..6d5284f75 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap @@ -23,6 +23,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [1,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap index 162cffd2b..fc37dcf2d 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap @@ -21,6 +21,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap index c33926a04..e4c4d9d7e 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap @@ -22,6 +22,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap index 3ae98f06f..78f62c086 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap @@ -22,6 +22,9 @@ doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: ["catto"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [1,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap index b22cad0ca..afb8af39c 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap @@ -23,6 +23,9 @@ doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap index acf3b752c..d2a8f671f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap @@ -26,6 +26,9 @@ doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap index f41fae458..a478dc57f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap @@ -25,6 +25,9 @@ doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap index 15638b4b4..1a00d5f3e 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap @@ -25,6 +25,9 @@ doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/1.snap index 5a1d5e749..7daafcccb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/1.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/2.snap index 1fac082df..d112c8145 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/2.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/1.snap index ae959d293..83f17bcef 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/1.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/2.snap index 6261c5f78..48f972785 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/2.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/3.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/3.snap index f27170870..fc2fdc5f1 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/3.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/1.snap index a6e6954fa..828d4dafc 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/2.snap index 983bde528..9e24162a8 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/1.snap index 2f21c9ef2..671713c8e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/2.snap index 40dfd4fd1..7d8225df7 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/3.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/3.snap index 9540e40bc..f28753015 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/3.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/1.snap index 1ea5cf1e6..ad5968b58 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/2.snap index 8a6eb23e9..87997bebd 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/3.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/3.snap index 88a3866a7..c2580f4bb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/3.snap @@ -30,6 +30,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/1.snap index 83f67d737..61b7f3016 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/1.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/2.snap index 09e43e490..0962dcdf5 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/2.snap @@ -31,6 +31,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap index 3ef17fe8a..a47ef319f 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap index 06c8fb066..f6423719c 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/1.snap index f37b613e8..0f52c9664 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/2.snap index 37aedde10..b1528c103 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/3.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/3.snap index 028ec3e0b..b80b8bb40 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/3.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap index cfaccc46f..6157fb454 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap index 68d640fea..736f998d0 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/1.snap index ceee17298..85fda1a43 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/2.snap index 62cb62c71..fb0b629ec 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/3.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/3.snap index ed9f09f93..a1fc55210 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/3.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/3.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/1.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/1.snap index 2875c299c..330a3318e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/1.snap @@ -28,6 +28,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: [] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/2.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/2.snap index 0f9af60e7..9fd990aa9 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/2.snap @@ -29,6 +29,9 @@ doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: ["doggos"] +---------------------------------------------------------------------- +### Canceled By: + ---------------------------------------------------------------------- ### Enqueued At: [timestamp] [0,] diff --git a/meilisearch-http/src/routes/tasks.rs b/meilisearch-http/src/routes/tasks.rs index ac9f2e1a6..820e313a4 100644 --- a/meilisearch-http/src/routes/tasks.rs +++ b/meilisearch-http/src/routes/tasks.rs @@ -162,13 +162,14 @@ impl From
for DetailsView { #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TaskCommonQueryRaw { uids: Option>, + canceled_by: Option>, types: Option>>, statuses: Option>>, index_uids: Option>>, } impl TaskCommonQueryRaw { fn validate(self) -> Result { - let Self { uids, types, statuses, index_uids } = self; + let Self { uids, canceled_by, types, statuses, index_uids } = self; let uids = if let Some(uids) = uids { Some( uids.into_iter() @@ -182,6 +183,23 @@ impl TaskCommonQueryRaw { } else { None }; + let canceled_by = if let Some(canceled_by) = canceled_by { + Some( + canceled_by + .into_iter() + .map(|canceled_by_string| { + canceled_by_string.parse::().map_err(|_e| { + index_scheduler::Error::InvalidTaskCanceledBy { + canceled_by: canceled_by_string, + } + .into() + }) + }) + .collect::, ResponseError>>()?, + ) + } else { + None + }; let types = if let Some(types) = types.and_then(fold_star_or) as Option> { Some( @@ -235,7 +253,7 @@ impl TaskCommonQueryRaw { } else { None }; - Ok(TaskCommonQuery { types, uids, statuses, index_uids }) + Ok(TaskCommonQuery { types, uids, canceled_by, statuses, index_uids }) } } @@ -402,6 +420,7 @@ pub struct TaskDateQuery { pub struct TaskCommonQuery { types: Option>, uids: Option>, + canceled_by: Option>, statuses: Option>, index_uids: Option>, } @@ -427,7 +446,7 @@ async fn cancel_tasks( ) -> Result { let query = params.into_inner().validate()?; let TaskDeletionOrCancelationQuery { - common: TaskCommonQuery { types, uids, statuses, index_uids }, + common: TaskCommonQuery { types, uids, canceled_by, statuses, index_uids }, dates: TaskDateQuery { after_enqueued_at, @@ -446,6 +465,7 @@ async fn cancel_tasks( types, index_uids, uids, + canceled_by, before_enqueued_at, after_enqueued_at, before_started_at, @@ -478,7 +498,7 @@ async fn delete_tasks( params: web::Query, ) -> Result { let TaskDeletionOrCancelationQuery { - common: TaskCommonQuery { types, uids, statuses, index_uids }, + common: TaskCommonQuery { types, uids, canceled_by, statuses, index_uids }, dates: TaskDateQuery { after_enqueued_at, @@ -497,6 +517,7 @@ async fn delete_tasks( types, index_uids, uids, + canceled_by, after_enqueued_at, before_enqueued_at, after_started_at, @@ -538,7 +559,7 @@ async fn get_tasks( analytics: web::Data, ) -> Result { let TasksFilterQuery { - common: TaskCommonQuery { types, uids, statuses, index_uids }, + common: TaskCommonQuery { types, uids, canceled_by, statuses, index_uids }, limit, from, dates: @@ -572,6 +593,7 @@ async fn get_tasks( types, index_uids, uids, + canceled_by, before_enqueued_at, after_enqueued_at, before_started_at,