From d21623605fb4db423da3186401fa2804ce3b4246 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 19 Nov 2024 17:06:00 +0100 Subject: [PATCH] implements the batch details --- crates/index-scheduler/src/insta_snapshot.rs | 3 +- .../cancel_processed.snap | 2 +- .../aborted_indexation.snap | 2 +- .../cancel_mix_of_tasks/cancel_processed.snap | 4 +- .../first_task_processed.snap | 2 +- ...rocessing_second_task_cancel_enqueued.snap | 2 +- .../cancel_processed.snap | 2 +- .../cancel_processed.snap | 2 +- .../cancel_processed.snap | 4 +- .../initial_task_processed.snap | 2 +- .../all_tasks_processed.snap | 12 +- .../once_everything_is_processed.snap | 2 +- .../after_processing_the_batch.snap | 2 +- .../before_index_creation.snap | 2 +- .../both_task_succeeded.snap | 4 +- .../2.snap | 2 +- .../after_failing_the_deletion.snap | 2 +- .../after_last_successful_addition.snap | 4 +- .../document_addition_failed.snap | 2 +- .../after_adding_the_documents.snap | 4 +- .../after_adding_the_settings.snap | 2 +- .../after_removing_the_documents.snap | 6 +- .../registered_the_document_deletions.snap | 4 +- .../index_creation_failed.snap | 2 +- .../task_successfully_processed.snap | 2 +- .../Intel to kefir succeeds.snap | 6 +- .../lib.rs/import_vectors/Intel to kefir.snap | 4 +- .../import_vectors/adding Intel succeeds.snap | 4 +- .../import_vectors/after adding Intel.snap | 2 +- .../settings_update_processed_vectors.snap | 2 +- .../index_creation_failed.snap | 2 +- .../processed_the_first_task.snap | 2 +- .../processed_the_second_task.snap | 4 +- .../processed_the_third_task.snap | 6 +- .../first.snap | 2 +- .../fourth.snap | 8 +- .../second.snap | 4 +- .../third.snap | 6 +- .../query_batches_canceled_by/start.snap | 4 +- .../processed_all_tasks.snap | 6 +- .../lib.rs/query_batches_simple/end.snap | 6 +- .../after-processing-everything.snap | 8 +- .../lib.rs/query_tasks_canceled_by/start.snap | 4 +- .../processed_all_tasks.snap | 6 +- .../lib.rs/query_tasks_simple/end.snap | 6 +- .../lib.rs/swap_indexes/create_a.snap | 2 +- .../lib.rs/swap_indexes/create_b.snap | 4 +- .../lib.rs/swap_indexes/create_c.snap | 6 +- .../lib.rs/swap_indexes/create_d.snap | 8 +- .../swap_indexes/first_swap_processed.snap | 10 +- .../swap_indexes/first_swap_registered.snap | 8 +- .../swap_indexes/second_swap_processed.snap | 12 +- .../third_empty_swap_processed.snap | 14 +- .../swap_indexes/two_swaps_registered.snap | 8 +- .../after_the_index_creation.snap | 8 +- .../first_swap_failed.snap | 10 +- .../initial_tasks_processed.snap | 8 +- .../initial_tasks_processed.snap | 2 +- .../task_deletion_processed.snap | 2 +- .../after_registering_the_task_deletion.snap | 2 +- .../initial_tasks_processed.snap | 2 +- .../task_deletion_processed.snap | 2 +- .../task_deletion_done.snap | 2 +- .../after_processing_the_10_tasks.snap | 4 +- .../after_registering_the_10_tasks.snap | 2 +- .../processed_the_first_task.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 22 +-- .../five_tasks_processed.snap | 12 +- .../processed_the_first_task.snap | 2 +- .../after_processing_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 20 +-- .../five_tasks_processed.snap | 10 +- .../all_tasks_processed.snap | 4 +- .../only_first_task_failed.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 4 +- .../processed_the_first_task.snap | 2 +- .../fifth_task_succeeds.snap | 8 +- .../first_and_second_task_fails.snap | 2 +- .../fourth_task_fails.snap | 6 +- .../third_task_succeeds.snap | 4 +- .../only_first_task_succeed.snap | 2 +- .../second_task_fails.snap | 4 +- .../third_task_fails.snap | 6 +- .../only_first_task_succeed.snap | 2 +- .../second_and_third_tasks_fails.snap | 4 +- .../all_other_tasks_succeeds.snap | 8 +- .../first_task_fails.snap | 2 +- .../second_task_fails.snap | 4 +- .../third_task_succeeds.snap | 6 +- .../all_other_tasks_succeeds.snap | 8 +- .../first_task_succeed.snap | 2 +- .../second_task_fails.snap | 4 +- .../third_task_succeeds.snap | 6 +- .../lib.rs/test_document_replace/2.snap | 2 +- .../all_tasks_processed.snap | 20 +-- .../five_tasks_processed.snap | 10 +- .../lib.rs/test_document_update/2.snap | 2 +- .../all_tasks_processed.snap | 20 +-- .../five_tasks_processed.snap | 10 +- .../all_tasks_processed.snap | 20 +-- .../five_tasks_processed.snap | 10 +- .../settings_update_processed.snap | 2 +- crates/index-scheduler/src/utils.rs | 18 ++- crates/meilisearch-types/src/batch_view.rs | 3 + crates/meilisearch-types/src/batches.rs | 4 + crates/meilisearch-types/src/settings.rs | 64 +++++++++ crates/meilisearch-types/src/task_view.rs | 126 +++++++++++++++++- crates/milli/src/update/settings.rs | 8 ++ 110 files changed, 493 insertions(+), 275 deletions(-) diff --git a/crates/index-scheduler/src/insta_snapshot.rs b/crates/index-scheduler/src/insta_snapshot.rs index af56fe467..1d5018469 100644 --- a/crates/index-scheduler/src/insta_snapshot.rs +++ b/crates/index-scheduler/src/insta_snapshot.rs @@ -349,12 +349,13 @@ pub fn snapshot_canceled_by(rtxn: &RoTxn, db: Database String { let mut snap = String::new(); - let Batch { uid, started_at, finished_at } = batch; + let Batch { uid, details, started_at, finished_at } = batch; if let Some(finished_at) = finished_at { assert!(finished_at > started_at); } snap.push('{'); snap.push_str(&format!("uid: {uid}, ")); + snap.push_str(&format!("details: {}, ", serde_json::to_string(details).unwrap())); snap.push('}'); snap } diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap index d19ea3960..82bb48bc4 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap @@ -40,7 +40,7 @@ catto [0,] [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":0,"matchedTasks":1,"canceledTasks":1,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap index 55b4275c7..ef4c72d06 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap @@ -46,7 +46,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap index 4989ef2ff..de85afb77 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap @@ -50,8 +50,8 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":2,"indexedDocuments":0,"matchedTasks":3,"canceledTasks":2,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap index 524f865d8..96905e096 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap @@ -42,7 +42,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap index c67c45f02..f56849774 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap @@ -45,7 +45,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_dump/cancel_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_dump/cancel_processed.snap index b619399bf..b81db3316 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_dump/cancel_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_dump/cancel_processed.snap @@ -39,7 +39,7 @@ canceled [0,] [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"matchedTasks":1,"canceledTasks":1,"originalFilter":"cancel dump"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap index c8f661fb0..bf206e539 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap @@ -41,7 +41,7 @@ catto: { number_of_documents: 0, field_distribution: {} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":0,"matchedTasks":1,"canceledTasks":1,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap index 94465298d..8f141b214 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap @@ -41,8 +41,8 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"matchedTasks":1,"canceledTasks":0,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap index 8cddcf06d..9f2fac934 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap @@ -36,7 +36,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap index b024305dd..c903fef85 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap @@ -61,12 +61,12 @@ girafos: { number_of_documents: 0, field_distribution: {} } [timestamp] [5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {}, } +3 {uid: 3, details: {"deletedDocuments":0}, } +4 {uid: 4, details: {"deletedDocuments":0}, } +5 {uid: 5, details: {"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap index 52fefbbec..87e4bc88d 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap index 73f2730d2..19dc4103e 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap @@ -39,7 +39,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [0,1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":3,"indexedDocuments":3,"providedIds":2,"deletedDocuments":2}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap index 66d073dc0..770a22457 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap @@ -42,7 +42,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap index 648c66927..b6c38da20 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap @@ -43,8 +43,8 @@ doggos [0,1,2,] [timestamp] [1,2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":0,"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap index 91b1ebd93..d26ed4124 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap @@ -38,7 +38,7 @@ doggos [0,1,] [timestamp] [0,1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":0,"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap index 1ea3bdbd4..891f77b63 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap @@ -38,7 +38,7 @@ doggos [0,1,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap b/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap index f3d7e2379..1138c5e03 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap @@ -42,8 +42,8 @@ doggos: { number_of_documents: 3, field_distribution: {"catto": 1, "doggo": 2, " [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":3,"indexedDocuments":3}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap index f79a7fed1..741a02636 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap @@ -35,7 +35,7 @@ doggos [0,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_documents.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_documents.snap index 37ef7a5cb..3201eff58 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_documents.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_documents.snap @@ -41,8 +41,8 @@ doggos: { number_of_documents: 3, field_distribution: {"catto": 1, "doggo": 2, " [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"filterableAttributes":["catto"]}, } +1 {uid: 1, details: {"receivedDocuments":3,"indexedDocuments":3}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_settings.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_settings.snap index dbe571e1b..d7adfdc46 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_settings.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_adding_the_settings.snap @@ -39,7 +39,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"filterableAttributes":["catto"]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_removing_the_documents.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_removing_the_documents.snap index 762173c27..226fde294 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_removing_the_documents.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/after_removing_the_documents.snap @@ -53,9 +53,9 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [2,3,4,5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"filterableAttributes":["catto"]}, } +1 {uid: 1, details: {"receivedDocuments":3,"indexedDocuments":3}, } +2 {uid: 2, details: {"providedIds":1,"deletedDocuments":2,"originalFilter":"\"catto EXISTS\""}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/registered_the_document_deletions.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/registered_the_document_deletions.snap index 424218e1c..68058b616 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/registered_the_document_deletions.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_deletion/registered_the_document_deletions.snap @@ -50,8 +50,8 @@ doggos: { number_of_documents: 3, field_distribution: {"catto": 1, "doggo": 2, " [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"filterableAttributes":["catto"]}, } +1 {uid: 1, details: {"receivedDocuments":3,"indexedDocuments":3}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap index 34f6ad7fd..845de58de 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap @@ -35,7 +35,7 @@ catto [0,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap index 52fefbbec..87e4bc88d 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir succeeds.snap index cc392afbb..4b7c1a1f9 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir succeeds.snap @@ -45,9 +45,9 @@ doggos: { number_of_documents: 1, field_distribution: {"_vectors": 1, "breed": 1 [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"embedders":{"A_fakerest":{"source":"rest","apiKey":"MyXXXX...","dimensions":384,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"},"B_small_hf":{"source":"huggingFace","model":"sentence-transformers/all-MiniLM-L6-v2","revision":"e4ce9877abf3edfe10b0d82785e83bdcb973e22e","documentTemplate":"{{doc.doggo}} the {{doc.breed}} best doggo"}}}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir.snap b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir.snap index 1e4534935..9ee0447d6 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/Intel to kefir.snap @@ -43,8 +43,8 @@ doggos: { number_of_documents: 1, field_distribution: {"_vectors": 1, "breed": 1 [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"embedders":{"A_fakerest":{"source":"rest","apiKey":"MyXXXX...","dimensions":384,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"},"B_small_hf":{"source":"huggingFace","model":"sentence-transformers/all-MiniLM-L6-v2","revision":"e4ce9877abf3edfe10b0d82785e83bdcb973e22e","documentTemplate":"{{doc.doggo}} the {{doc.breed}} best doggo"}}}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/adding Intel succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/adding Intel succeeds.snap index 41e464287..be04ea541 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/adding Intel succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/adding Intel succeeds.snap @@ -41,8 +41,8 @@ doggos: { number_of_documents: 1, field_distribution: {"_vectors": 1, "breed": 1 [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"embedders":{"A_fakerest":{"source":"rest","apiKey":"MyXXXX...","dimensions":384,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"},"B_small_hf":{"source":"huggingFace","model":"sentence-transformers/all-MiniLM-L6-v2","revision":"e4ce9877abf3edfe10b0d82785e83bdcb973e22e","documentTemplate":"{{doc.doggo}} the {{doc.breed}} best doggo"}}}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/after adding Intel.snap b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/after adding Intel.snap index 03c7b3a5a..2229139d7 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/after adding Intel.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/after adding Intel.snap @@ -39,7 +39,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"embedders":{"A_fakerest":{"source":"rest","apiKey":"MyXXXX...","dimensions":384,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"},"B_small_hf":{"source":"huggingFace","model":"sentence-transformers/all-MiniLM-L6-v2","revision":"e4ce9877abf3edfe10b0d82785e83bdcb973e22e","documentTemplate":"{{doc.doggo}} the {{doc.breed}} best doggo"}}}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/settings_update_processed_vectors.snap b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/settings_update_processed_vectors.snap index 7bdb75143..a9e162b9c 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/settings_update_processed_vectors.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/import_vectors/settings_update_processed_vectors.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"embedders":{"A_fakerest":{"source":"rest","apiKey":"MyXXXX...","dimensions":384,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"},"B_small_hf":{"source":"huggingFace","model":"sentence-transformers/all-MiniLM-L6-v2","revision":"e4ce9877abf3edfe10b0d82785e83bdcb973e22e","documentTemplate":"{{doc.doggo}} the {{doc.breed}} best doggo"}}}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap b/crates/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap index fdd8e1f1d..52bcfe6f6 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap @@ -35,7 +35,7 @@ catto [0,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap index 6bc6f22fd..6a5b847e9 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap @@ -42,7 +42,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap index 747d64903..8b4b88a8d 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap @@ -45,8 +45,8 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap index b6c419847..19c9957ed 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap @@ -46,9 +46,9 @@ cattos: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap index b5894122f..6762b0707 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap @@ -43,7 +43,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap index 93fc7c824..9fdb5aceb 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap @@ -49,10 +49,10 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"deletedDocuments":0}, } +2 {uid: 2, details: {"deletedDocuments":0}, } +3 {uid: 3, details: {"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap index fa00c237b..b7d505301 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap @@ -45,8 +45,8 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap index f9c3166ad..aaa714bde 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap @@ -47,9 +47,9 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"deletedDocuments":0}, } +2 {uid: 2, details: {"deletedDocuments":0}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_canceled_by/start.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_canceled_by/start.snap index 3af67a73c..a48246ae6 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_canceled_by/start.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_canceled_by/start.snap @@ -49,8 +49,8 @@ catto: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"primaryKey":"mouse"}, } +1 {uid: 1, details: {"primaryKey":"sheep","matchedTasks":3,"canceledTasks":2,"originalFilter":"test_query","swaps":[{"indexes":["catto","doggo"]}]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_from_and_limit/processed_all_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_from_and_limit/processed_all_tasks.snap index cb12fa554..ebb20f2e7 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_from_and_limit/processed_all_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_from_and_limit/processed_all_tasks.snap @@ -48,9 +48,9 @@ whalo: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"primaryKey":"bone"}, } +1 {uid: 1, details: {"primaryKey":"plankton"}, } +2 {uid: 2, details: {"primaryKey":"his_own_vomit"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_simple/end.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_simple/end.snap index 7325520eb..bbe89cf36 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_simple/end.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_simple/end.snap @@ -48,9 +48,9 @@ doggo: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"primaryKey":"mouse"}, } +1 {uid: 1, details: {"primaryKey":"sheep"}, } +2 {uid: 2, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_special_rules/after-processing-everything.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_special_rules/after-processing-everything.snap index 2bf1b4509..2783c3049 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_batches_special_rules/after-processing-everything.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_batches_special_rules/after-processing-everything.snap @@ -53,10 +53,10 @@ doggo: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"mouse"}, } +1 {uid: 1, details: {"primaryKey":"sheep"}, } +2 {uid: 2, details: {}, } +3 {uid: 3, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap index 3af67a73c..a48246ae6 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap @@ -49,8 +49,8 @@ catto: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"primaryKey":"mouse"}, } +1 {uid: 1, details: {"primaryKey":"sheep","matchedTasks":3,"canceledTasks":2,"originalFilter":"test_query","swaps":[{"indexes":["catto","doggo"]}]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap index cb12fa554..ebb20f2e7 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap @@ -48,9 +48,9 @@ whalo: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"primaryKey":"bone"}, } +1 {uid: 1, details: {"primaryKey":"plankton"}, } +2 {uid: 2, details: {"primaryKey":"his_own_vomit"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap index 7325520eb..bbe89cf36 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap @@ -48,9 +48,9 @@ doggo: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"primaryKey":"mouse"}, } +1 {uid: 1, details: {"primaryKey":"sheep"}, } +2 {uid: 2, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap index 639972a3e..84566cd49 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap @@ -45,7 +45,7 @@ a: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap index 4b94276ab..a5581d589 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap @@ -48,8 +48,8 @@ b: { number_of_documents: 0, field_distribution: {} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap index 4ab09f46c..9ad7e5505 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap @@ -51,9 +51,9 @@ c: { number_of_documents: 0, field_distribution: {} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap index 41d8bec15..cd578260c 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap @@ -54,10 +54,10 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap index 108a28b11..dd31bb637 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap @@ -61,11 +61,11 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } +4 {uid: 4, details: {"swaps":[{"indexes":["a","b"]},{"indexes":["c","d"]}]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap index 02b746053..74fc1b4f5 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap @@ -57,10 +57,10 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap index 0209f57bc..792707b06 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap @@ -63,12 +63,12 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } +4 {uid: 4, details: {"swaps":[{"indexes":["a","b"]},{"indexes":["c","d"]}]}, } +5 {uid: 5, details: {"swaps":[{"indexes":["a","c"]}]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap index bb165d824..342797b32 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap @@ -67,13 +67,13 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [6,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } +4 {uid: 4, details: {"swaps":[{"indexes":["a","b"]},{"indexes":["c","d"]}]}, } +5 {uid: 5, details: {"swaps":[{"indexes":["a","c"]}]}, } +6 {uid: 6, details: {"swaps":[]}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap index 063b97d62..15cb92534 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap @@ -59,10 +59,10 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap index 41d8bec15..cd578260c 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap @@ -54,10 +54,10 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap index 3bf223e41..148f95abb 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap @@ -62,11 +62,11 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } +4 {uid: 4, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap index 41d8bec15..cd578260c 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap @@ -54,10 +54,10 @@ d: { number_of_documents: 0, field_distribution: {} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"primaryKey":"id"}, } +1 {uid: 1, details: {"primaryKey":"id"}, } +2 {uid: 2, details: {"primaryKey":"id"}, } +3 {uid: 3, details: {"primaryKey":"id"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap index e88870283..671c4c16e 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap @@ -39,7 +39,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap index 24844c3f8..8ab24e82a 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap @@ -41,7 +41,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [2,3,] ---------------------------------------------------------------------- ### All Batches: -1 {uid: 1, } +1 {uid: 1, details: {"matchedTasks":2,"deletedTasks":1,"originalFilter":"test_query&test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 1 [2,3,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap index 7dac66431..ff0c65910 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap @@ -42,7 +42,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap index e88870283..671c4c16e 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap @@ -39,7 +39,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap index 97106df1b..570a8e517 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap @@ -39,7 +39,7 @@ catto: { number_of_documents: 1, field_distribution: {"id": 1} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -1 {uid: 1, } +1 {uid: 1, details: {"matchedTasks":1,"deletedTasks":1,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 1 [2,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap index 3fd3ca34b..de7430ddb 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap @@ -44,7 +44,7 @@ doggo [2,] [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"matchedTasks":2,"deletedTasks":0,"originalFilter":"test_query"}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [3,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap index 8ca3aab2b..eaf694e4a 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap @@ -59,8 +59,8 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":10,"indexedDocuments":10}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap index b6a0c00c9..7aee46969 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap @@ -57,7 +57,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap index 1f77245be..5399443a9 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap index abc31b0cd..2c5305088 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap @@ -57,7 +57,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap index cc716cfc8..766d2624a 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap @@ -77,17 +77,17 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [10,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } -7 {uid: 7, } -8 {uid: 8, } -9 {uid: 9, } -10 {uid: 10, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } +5 {uid: 5, details: {"receivedDocuments":1,"indexedDocuments":1}, } +6 {uid: 6, details: {"receivedDocuments":1,"indexedDocuments":1}, } +7 {uid: 7, details: {"receivedDocuments":1,"indexedDocuments":1}, } +8 {uid: 8, details: {"receivedDocuments":1,"indexedDocuments":1}, } +9 {uid: 9, details: {"receivedDocuments":1,"indexedDocuments":1}, } +10 {uid: 10, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap index c68517991..7bc408a14 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap @@ -67,12 +67,12 @@ doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } [timestamp] [5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } +5 {uid: 5, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap index f4c3cdc65..6d9343ce5 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap index fe329cb55..3a6a394dc 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap @@ -53,7 +53,7 @@ doggos [0,1,2,3,4,5,6,7,8,9,] [timestamp] [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,2,3,4,5,6,7,8,9,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap index b3f8a48a5..d95d8f8db 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap @@ -71,16 +71,16 @@ doggos [0,1,2,3,4,5,6,7,8,9,] [timestamp] [9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } -7 {uid: 7, } -8 {uid: 8, } -9 {uid: 9, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {}, } +3 {uid: 3, details: {}, } +4 {uid: 4, details: {}, } +5 {uid: 5, details: {}, } +6 {uid: 6, details: {}, } +7 {uid: 7, details: {}, } +8 {uid: 8, details: {}, } +9 {uid: 9, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap index 468eac198..c8e2fd93b 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap @@ -61,11 +61,11 @@ doggos [0,1,2,3,4,5,6,7,8,9,] [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {}, } +3 {uid: 3, details: {}, } +4 {uid: 4, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap index 92682a4e2..700044b79 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap @@ -57,8 +57,8 @@ doggos: { number_of_documents: 9, field_distribution: {"doggo": 9, "id": 9} } [timestamp] [1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":9,"indexedDocuments":9}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap index 87d14ae51..e08954bca 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap @@ -53,7 +53,7 @@ doggos [0,1,2,3,4,5,6,7,8,9,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap index c61ba5983..78058a92d 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap @@ -57,7 +57,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap index 723a387cd..68113fc86 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap @@ -59,8 +59,8 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":10,"indexedDocuments":10}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap index 1f77245be..5399443a9 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap index f3ee85d54..281bdd96a 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap @@ -51,10 +51,10 @@ doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "id": 2} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap index ded62c6e1..0a2ff55b1 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap @@ -44,7 +44,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap index 0d4ea85be..74353f21b 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap @@ -49,9 +49,9 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [3,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap index 91ad54ff1..1d7c61d91 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap @@ -47,8 +47,8 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap index d43603f3b..f01d8adf3 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap @@ -40,7 +40,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap index 913c3e1d9..5948f1c90 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap @@ -43,8 +43,8 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap index 5d0251da3..87b14c7be 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap @@ -45,9 +45,9 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap index a6d327add..e94d544bb 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap @@ -40,7 +40,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap index 4d7af4a8d..6c3c13305 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap @@ -43,8 +43,8 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap index 1fcaefeed..2cf46c611 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap @@ -53,10 +53,10 @@ doggos: { number_of_documents: 4, field_distribution: {"doggo": 4, "paw": 4} } [timestamp] [3,4,5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":3,"indexedDocuments":3}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap index e13c0f6ab..4d8f1fad9 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap @@ -46,7 +46,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap index a76a5983e..3ee347076 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap @@ -48,8 +48,8 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap index 507ebe04d..13f20f31b 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap @@ -51,9 +51,9 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "paw": 1} } [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap index 90807eeb8..dd91d7c5d 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap @@ -53,10 +53,10 @@ doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "doggoid": 5} [timestamp] [3,4,5,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":3,"indexedDocuments":3}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap index bdfc30547..525c83371 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap @@ -46,7 +46,7 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap index 5c34f53c0..6ba811363 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap @@ -49,8 +49,8 @@ doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} [timestamp] [1,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap index 3c18f87b2..a397c7fdd 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap @@ -51,9 +51,9 @@ doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "doggoid": 2} [timestamp] [2,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap index 916f0ae0f..277bc8aff 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap @@ -54,7 +54,7 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":10,"indexedDocuments":10}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,2,3,4,5,6,7,8,9,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap index 0ea35496e..4b4ace120 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap @@ -72,16 +72,16 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } -7 {uid: 7, } -8 {uid: 8, } -9 {uid: 9, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } +5 {uid: 5, details: {"receivedDocuments":1,"indexedDocuments":1}, } +6 {uid: 6, details: {"receivedDocuments":1,"indexedDocuments":1}, } +7 {uid: 7, details: {"receivedDocuments":1,"indexedDocuments":1}, } +8 {uid: 8, details: {"receivedDocuments":1,"indexedDocuments":1}, } +9 {uid: 9, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap index 140f540c6..bea6f75ce 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap @@ -62,11 +62,11 @@ doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap index 502493423..b98540594 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap @@ -54,7 +54,7 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"receivedDocuments":10,"indexedDocuments":10}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,1,2,3,4,5,6,7,8,9,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap index 924033507..d30a8b0c2 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap @@ -72,16 +72,16 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } -7 {uid: 7, } -8 {uid: 8, } -9 {uid: 9, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } +5 {uid: 5, details: {"receivedDocuments":1,"indexedDocuments":1}, } +6 {uid: 6, details: {"receivedDocuments":1,"indexedDocuments":1}, } +7 {uid: 7, details: {"receivedDocuments":1,"indexedDocuments":1}, } +8 {uid: 8, details: {"receivedDocuments":1,"indexedDocuments":1}, } +9 {uid: 9, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap index c762ac7f0..0b608c691 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap @@ -62,11 +62,11 @@ doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap index 392ea405a..8324b62ae 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap @@ -72,16 +72,16 @@ doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } [timestamp] [9,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } -5 {uid: 5, } -6 {uid: 6, } -7 {uid: 7, } -8 {uid: 8, } -9 {uid: 9, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } +5 {uid: 5, details: {"receivedDocuments":1,"indexedDocuments":1}, } +6 {uid: 6, details: {"receivedDocuments":1,"indexedDocuments":1}, } +7 {uid: 7, details: {"receivedDocuments":1,"indexedDocuments":1}, } +8 {uid: 8, details: {"receivedDocuments":1,"indexedDocuments":1}, } +9 {uid: 9, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap index cd08d9289..f2a03bcab 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap @@ -62,11 +62,11 @@ doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } -1 {uid: 1, } -2 {uid: 2, } -3 {uid: 3, } -4 {uid: 4, } +0 {uid: 0, details: {"receivedDocuments":1,"indexedDocuments":1}, } +1 {uid: 1, details: {"receivedDocuments":1,"indexedDocuments":1}, } +2 {uid: 2, details: {"receivedDocuments":1,"indexedDocuments":1}, } +3 {uid: 3, details: {"receivedDocuments":1,"indexedDocuments":1}, } +4 {uid: 4, details: {"receivedDocuments":1,"indexedDocuments":1}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/snapshots/lib.rs/test_settings_update/settings_update_processed.snap b/crates/index-scheduler/src/snapshots/lib.rs/test_settings_update/settings_update_processed.snap index a5b4849a9..bea2d5ab1 100644 --- a/crates/index-scheduler/src/snapshots/lib.rs/test_settings_update/settings_update_processed.snap +++ b/crates/index-scheduler/src/snapshots/lib.rs/test_settings_update/settings_update_processed.snap @@ -36,7 +36,7 @@ doggos: { number_of_documents: 0, field_distribution: {} } [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, } +0 {uid: 0, details: {"embedders":{"default":{"source":"rest","apiKey":"MyXXXX...","dimensions":4,"url":"http://localhost:7777","request":"{{text}}","response":"{{embedding}}"}}}, } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/utils.rs b/crates/index-scheduler/src/utils.rs index edb413600..322d15ea9 100644 --- a/crates/index-scheduler/src/utils.rs +++ b/crates/index-scheduler/src/utils.rs @@ -7,6 +7,7 @@ use meilisearch_types::batches::{Batch, BatchId}; use meilisearch_types::heed::types::DecodeIgnore; use meilisearch_types::heed::{Database, RoTxn, RwTxn}; use meilisearch_types::milli::CboRoaringBitmapCodec; +use meilisearch_types::task_view::DetailsView; use meilisearch_types::tasks::{Details, IndexSwap, Kind, KindWithContent, Status}; use roaring::{MultiOps, RoaringBitmap}; use time::OffsetDateTime; @@ -18,6 +19,8 @@ use crate::{Error, IndexScheduler, Result, Task, TaskId, BEI128}; #[derive(Debug, Clone)] pub(crate) struct ProcessingBatch { pub uid: BatchId, + pub details: DetailsView, + pub statuses: HashSet, pub kinds: HashSet, pub indexes: HashSet, @@ -35,6 +38,8 @@ impl ProcessingBatch { Self { uid, + details: DetailsView::default(), + statuses, kinds: HashSet::default(), indexes: HashSet::default(), @@ -47,6 +52,12 @@ impl ProcessingBatch { /// Remove the Processing status and update the real statuses of the tasks. pub fn update(&mut self, task: &Task) { + // Craft an aggregation of the details of all the tasks encountered in this batch. + if task.status != Status::Failed { + if let Some(ref details) = task.details { + self.details.accumulate(&DetailsView::from(details.clone())); + } + } self.statuses.clear(); self.statuses.insert(task.status); } @@ -117,7 +128,12 @@ impl IndexScheduler { self.all_batches.put( wtxn, &batch.uid, - &Batch { uid: batch.uid, started_at: batch.started_at, finished_at: Some(finished_at) }, + &Batch { + uid: batch.uid, + details: batch.details, + started_at: batch.started_at, + finished_at: Some(finished_at), + }, )?; self.batch_to_tasks_mapping.put(wtxn, &batch.uid, tasks)?; diff --git a/crates/meilisearch-types/src/batch_view.rs b/crates/meilisearch-types/src/batch_view.rs index 15e1f8ab9..684fc48e6 100644 --- a/crates/meilisearch-types/src/batch_view.rs +++ b/crates/meilisearch-types/src/batch_view.rs @@ -3,6 +3,7 @@ use time::{Duration, OffsetDateTime}; use crate::{ batches::{Batch, BatchId}, + task_view::DetailsView, tasks::serialize_duration, }; @@ -10,6 +11,7 @@ use crate::{ #[serde(rename_all = "camelCase")] pub struct BatchView { pub uid: BatchId, + pub details: DetailsView, #[serde(serialize_with = "serialize_duration", default)] pub duration: Option, #[serde(with = "time::serde::rfc3339", default)] @@ -22,6 +24,7 @@ impl BatchView { pub fn from_batch(batch: &Batch) -> Self { Self { uid: batch.uid, + details: batch.details.clone(), duration: batch.finished_at.map(|finished_at| finished_at - batch.started_at), started_at: batch.started_at, finished_at: batch.finished_at, diff --git a/crates/meilisearch-types/src/batches.rs b/crates/meilisearch-types/src/batches.rs index 8a439c59f..c5c4530ec 100644 --- a/crates/meilisearch-types/src/batches.rs +++ b/crates/meilisearch-types/src/batches.rs @@ -1,6 +1,8 @@ use serde::{Deserialize, Serialize}; use time::OffsetDateTime; +use crate::task_view::DetailsView; + pub type BatchId = u32; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] @@ -8,6 +10,8 @@ pub type BatchId = u32; pub struct Batch { pub uid: BatchId, + pub details: DetailsView, + #[serde(with = "time::serde::rfc3339")] pub started_at: OffsetDateTime, #[serde(with = "time::serde::rfc3339::option")] diff --git a/crates/meilisearch-types/src/settings.rs b/crates/meilisearch-types/src/settings.rs index 9e7a2bc15..e3803fa28 100644 --- a/crates/meilisearch-types/src/settings.rs +++ b/crates/meilisearch-types/src/settings.rs @@ -378,6 +378,64 @@ impl Settings { self.embedders = Setting::Set(configs); Ok(self) } + + pub fn merge(&mut self, other: &Self) { + // For most settings only the latest version is kept + *self = Self { + displayed_attributes: other + .displayed_attributes + .clone() + .or(self.displayed_attributes.clone()), + searchable_attributes: other + .searchable_attributes + .clone() + .or(self.searchable_attributes.clone()), + filterable_attributes: other + .filterable_attributes + .clone() + .or(self.filterable_attributes.clone()), + sortable_attributes: other + .sortable_attributes + .clone() + .or(self.sortable_attributes.clone()), + ranking_rules: other.ranking_rules.clone().or(self.ranking_rules.clone()), + stop_words: other.stop_words.clone().or(self.stop_words.clone()), + non_separator_tokens: other + .non_separator_tokens + .clone() + .or(self.non_separator_tokens.clone()), + separator_tokens: other.separator_tokens.clone().or(self.separator_tokens.clone()), + dictionary: other.dictionary.clone().or(self.dictionary.clone()), + synonyms: other.synonyms.clone().or(self.synonyms.clone()), + distinct_attribute: other + .distinct_attribute + .clone() + .or(self.distinct_attribute.clone()), + proximity_precision: other.proximity_precision.or(self.proximity_precision), + typo_tolerance: other.typo_tolerance.clone().or(self.typo_tolerance.clone()), + faceting: other.faceting.clone().or(self.faceting.clone()), + pagination: other.pagination.clone().or(self.pagination.clone()), + search_cutoff_ms: other.search_cutoff_ms.or(self.search_cutoff_ms), + localized_attributes: other + .localized_attributes + .clone() + .or(self.localized_attributes.clone()), + embedders: match (self.embedders.clone(), other.embedders.clone()) { + (Setting::NotSet, set) | (set, Setting::NotSet) => set, + (Setting::Set(_) | Setting::Reset, Setting::Reset) => Setting::Reset, + (Setting::Reset, Setting::Set(embedder)) => Setting::Set(embedder), + + // If both are set we must merge the embeddings settings + (Setting::Set(mut this), Setting::Set(other)) => { + for (k, v) in other { + this.insert(k, v); + } + Setting::Set(this) + } + }, + _kind: PhantomData, + } + } } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -868,6 +926,12 @@ impl From for ProximityPrecision { #[derive(Debug, Clone, Default, Deserialize, PartialEq, Eq)] pub struct WildcardSetting(Setting>); +impl WildcardSetting { + pub fn or(self, other: Self) -> Self { + Self(self.0.or(other.0)) + } +} + impl From>> for WildcardSetting { fn from(setting: Setting>) -> Self { Self(setting) diff --git a/crates/meilisearch-types/src/task_view.rs b/crates/meilisearch-types/src/task_view.rs index 0cc127c0d..64dbd58f7 100644 --- a/crates/meilisearch-types/src/task_view.rs +++ b/crates/meilisearch-types/src/task_view.rs @@ -1,5 +1,5 @@ use milli::Object; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use time::{Duration, OffsetDateTime}; use crate::batches::BatchId; @@ -50,7 +50,7 @@ impl TaskView { } } -#[derive(Default, Debug, PartialEq, Eq, Clone, Serialize)] +#[derive(Default, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct DetailsView { #[serde(skip_serializing_if = "Option::is_none")] @@ -86,6 +86,128 @@ pub struct DetailsView { pub swaps: Option>, } +impl DetailsView { + pub fn accumulate(&mut self, other: &Self) { + *self = Self { + received_documents: match (self.received_documents, other.received_documents) { + (None, None) => None, + (None, Some(doc)) | (Some(doc), None) => Some(doc), + (Some(left), Some(right)) => Some(left + right), + }, + indexed_documents: match (self.indexed_documents, other.indexed_documents) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(doc))) | (Some(Some(doc)), None | Some(None)) => { + Some(Some(doc)) + } + (Some(Some(left)), Some(Some(right))) => Some(Some(left + right)), + }, + edited_documents: match (self.edited_documents, other.edited_documents) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(doc))) | (Some(Some(doc)), None | Some(None)) => { + Some(Some(doc)) + } + (Some(Some(left)), Some(Some(right))) => Some(Some(left + right)), + }, + primary_key: match (&self.primary_key, &other.primary_key) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(doc))) | (Some(Some(doc)), None | Some(None)) => { + Some(Some(doc.to_string())) + } + // In the case we receive multiple primary keys (which shouldn't happens) we only return the first one encountered. + (Some(Some(left)), Some(Some(_right))) => Some(Some(left.to_string())), + }, + provided_ids: match (self.provided_ids, other.provided_ids) { + (None, None) => None, + (None, Some(ids)) | (Some(ids), None) => Some(ids), + (Some(left), Some(right)) => Some(left + right), + }, + deleted_documents: match (self.deleted_documents, other.deleted_documents) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(doc))) | (Some(Some(doc)), None | Some(None)) => { + Some(Some(doc)) + } + (Some(Some(left)), Some(Some(right))) => Some(Some(left + right)), + }, + matched_tasks: match (self.matched_tasks, other.matched_tasks) { + (None, None) => None, + (None, Some(task)) | (Some(task), None) => Some(task), + (Some(left), Some(right)) => Some(left + right), + }, + canceled_tasks: match (self.canceled_tasks, other.canceled_tasks) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(task))) | (Some(Some(task)), None | Some(None)) => { + Some(Some(task)) + } + (Some(Some(left)), Some(Some(right))) => Some(Some(left + right)), + }, + deleted_tasks: match (self.deleted_tasks, other.deleted_tasks) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(task))) | (Some(Some(task)), None | Some(None)) => { + Some(Some(task)) + } + (Some(Some(left)), Some(Some(right))) => Some(Some(left + right)), + }, + original_filter: match (&self.original_filter, &other.original_filter) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(filter))) + | (Some(Some(filter)), None | Some(None)) => Some(Some(filter.to_string())), + // In this case, we cannot really merge both filters or return an array so we're going to return + // all the conditions one after the other. + (Some(Some(left)), Some(Some(right))) => Some(Some(format!("{left}&{right}"))), + }, + dump_uid: match (&self.dump_uid, &other.dump_uid) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(dump_uid))) + | (Some(Some(dump_uid)), None | Some(None)) => Some(Some(dump_uid.to_string())), + // We should never be able to batch multiple dumps at the same time. So we return + // the first one we encounter but that shouldn't be an issue anyway. + (Some(Some(left)), Some(Some(_right))) => Some(Some(left.to_string())), + }, + context: match (&self.context, &other.context) { + (None, None) => None, + (None, Some(None)) | (Some(None), None) | (Some(None), Some(None)) => Some(None), + (None | Some(None), Some(Some(ctx))) | (Some(Some(ctx)), None | Some(None)) => { + Some(Some(ctx.clone())) + } + // We should never be able to batch multiple documents edited at the same time. So we return + // the first one we encounter but that shouldn't be an issue anyway. + (Some(Some(left)), Some(Some(_right))) => Some(Some(left.clone())), + }, + function: match (&self.function, &other.function) { + (None, None) => None, + (None, Some(fun)) | (Some(fun), None) => Some(fun.to_string()), + // We should never be able to batch multiple documents edited at the same time. So we return + // the first one we encounter but that shouldn't be an issue anyway. + (Some(left), Some(_right)) => Some(left.to_string()), + }, + settings: match (self.settings.clone(), other.settings.clone()) { + (None, None) => None, + (None, Some(settings)) | (Some(settings), None) => Some(settings), + (Some(mut left), Some(right)) => { + left.merge(&right); + Some(left) + } + }, + swaps: match (self.swaps.clone(), other.swaps.clone()) { + (None, None) => None, + (None, Some(swaps)) | (Some(swaps), None) => Some(swaps), + (Some(mut left), Some(mut right)) => { + left.append(&mut right); + Some(left) + } + }, + } + } +} + impl From
for DetailsView { fn from(details: Details) -> Self { match details { diff --git a/crates/milli/src/update/settings.rs b/crates/milli/src/update/settings.rs index 6e2b53d58..a3e83ad16 100644 --- a/crates/milli/src/update/settings.rs +++ b/crates/milli/src/update/settings.rs @@ -96,6 +96,14 @@ impl Setting { } } + /// Returns other if self is not set. + pub fn or(self, other: Self) -> Self { + match self { + Setting::Set(_) | Setting::Reset => self, + Setting::NotSet => other, + } + } + /// Returns `true` if applying the new setting changed this setting pub fn apply(&mut self, new: Self) -> bool where