From fd5c48941a8c8a9ad0d31270a54be2f90440efb2 Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 19:31:57 +0100 Subject: [PATCH 1/6] Add cache on the indexes stats --- index-scheduler/src/batch.rs | 38 +++++++++++++++++++-- index-scheduler/src/index_mapper/mod.rs | 42 +++++++++++++++++++++-- index-scheduler/src/lib.rs | 19 +++++++++-- meilisearch/src/routes/indexes/mod.rs | 45 +++++++++++-------------- meilisearch/src/routes/mod.rs | 38 +++++++-------------- 5 files changed, 122 insertions(+), 60 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 66c516d9b..03287d7ae 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -828,20 +828,36 @@ impl IndexScheduler { Ok(vec![task]) } Batch::IndexOperation { op, must_create_index } => { - let index_uid = op.index_uid(); + let index_uid = op.index_uid().to_string(); let index = if must_create_index { // create the index if it doesn't already exist let wtxn = self.env.write_txn()?; - self.index_mapper.create_index(wtxn, index_uid, None)? + self.index_mapper.create_index(wtxn, &index_uid, None)? } else { let rtxn = self.env.read_txn()?; - self.index_mapper.index(&rtxn, index_uid)? + self.index_mapper.index(&rtxn, &index_uid)? }; let mut index_wtxn = index.write_txn()?; let tasks = self.apply_index_operation(&mut index_wtxn, &index, op)?; index_wtxn.commit()?; + // if the update processed successfully, we're going to store the new + // stats of the index. Since the tasks have already been processed and + // this is a non-critical operation. If it fails, we should not fail + // the entire batch. + let res = || -> Result<()> { + let mut wtxn = self.env.write_txn()?; + self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + wtxn.commit()?; + Ok(()) + }(); + + match res { + Ok(_) => (), + Err(e) => error!("Could not write the stats of the index {}", e), + } + Ok(tasks) } Batch::IndexCreation { index_uid, primary_key, task } => { @@ -875,6 +891,22 @@ impl IndexScheduler { task.status = Status::Succeeded; task.details = Some(Details::IndexInfo { primary_key }); + // if the update processed successfully, we're going to store the new + // stats of the index. Since the tasks have already been processed and + // this is a non-critical operation. If it fails, we should not fail + // the entire batch. + let res = || -> Result<()> { + let mut wtxn = self.env.write_txn()?; + self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + wtxn.commit()?; + Ok(()) + }(); + + match res { + Ok(_) => (), + Err(e) => error!("Could not write the stats of the index {}", e), + } + Ok(vec![task]) } Batch::IndexDeletion { index_uid, index_has_been_created, mut tasks } => { diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 1693d12d7..9e1de438a 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -4,10 +4,11 @@ use std::time::Duration; use std::{fs, thread}; use log::error; -use meilisearch_types::heed::types::Str; +use meilisearch_types::heed::types::{SerdeJson, Str}; use meilisearch_types::heed::{Database, Env, RoTxn, RwTxn}; use meilisearch_types::milli::update::IndexerConfig; -use meilisearch_types::milli::Index; +use meilisearch_types::milli::{FieldDistribution, Index}; +use serde::{Deserialize, Serialize}; use time::OffsetDateTime; use uuid::Uuid; @@ -19,6 +20,7 @@ use crate::{Error, Result}; mod index_map; const INDEX_MAPPING: &str = "index-mapping"; +const INDEX_STATS: &str = "index-stats"; /// Structure managing meilisearch's indexes. /// @@ -52,6 +54,8 @@ pub struct IndexMapper { /// Map an index name with an index uuid currently available on disk. pub(crate) index_mapping: Database, + /// Map an index name with the cached stats associated to the index. + pub(crate) index_stats: Database>, /// Path to the folder where the LMDB environments of each index are. base_path: PathBuf, @@ -76,6 +80,15 @@ pub enum IndexStatus { Available(Index), } +#[derive(Serialize, Deserialize, Debug)] +pub struct IndexStats { + pub number_of_documents: u64, + pub database_size: u64, + pub field_distribution: FieldDistribution, + pub created_at: OffsetDateTime, + pub updated_at: OffsetDateTime, +} + impl IndexMapper { pub fn new( env: &Env, @@ -88,6 +101,7 @@ impl IndexMapper { Ok(Self { index_map: Arc::new(RwLock::new(IndexMap::new(index_count))), index_mapping: env.create_database(Some(INDEX_MAPPING))?, + index_stats: env.create_database(Some(INDEX_STATS))?, base_path, index_base_map_size, index_growth_amount, @@ -135,6 +149,7 @@ impl IndexMapper { /// Removes the index from the mapping table and the in-memory index map /// but keeps the associated tasks. pub fn delete_index(&self, mut wtxn: RwTxn, name: &str) -> Result<()> { + self.index_stats.delete(&mut wtxn, name)?; let uuid = self .index_mapping .get(&wtxn, name)? @@ -360,6 +375,29 @@ impl IndexMapper { Ok(()) } + /// Return the stored stats of an index. + pub fn stats_of(&self, rtxn: &RoTxn, index_uid: &str) -> Result { + self.index_stats + .get(rtxn, index_uid)? + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string())) + } + + /// Return the stats of an index and write it in the index-mapper database. + pub fn compute_and_store_stats_of(&self, wtxn: &mut RwTxn, index_uid: &str) -> Result<()> { + let index = self.index(wtxn, index_uid)?; + let database_size = index.on_disk_size()?; + let rtxn = index.read_txn()?; + let stats = IndexStats { + number_of_documents: index.number_of_documents(&rtxn)?, + database_size, + field_distribution: index.field_distribution(&rtxn)?, + created_at: index.created_at(&rtxn)?, + updated_at: index.updated_at(&rtxn)?, + }; + self.index_stats.put(wtxn, index_uid, &stats)?; + Ok(()) + } + pub fn index_exists(&self, rtxn: &RoTxn, name: &str) -> Result { Ok(self.index_mapping.get(rtxn, name)?.is_some()) } diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index e23e4ff8b..4f875eaca 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -44,10 +44,9 @@ use file_store::FileStore; use meilisearch_types::error::ResponseError; use meilisearch_types::heed::types::{OwnedType, SerdeBincode, SerdeJson, Str}; use meilisearch_types::heed::{self, Database, Env, RoTxn}; -use meilisearch_types::milli; use meilisearch_types::milli::documents::DocumentsBatchBuilder; use meilisearch_types::milli::update::IndexerConfig; -use meilisearch_types::milli::{CboRoaringBitmapCodec, Index, RoaringBitmapCodec, BEU32}; +use meilisearch_types::milli::{self, CboRoaringBitmapCodec, Index, RoaringBitmapCodec, BEU32}; use meilisearch_types::tasks::{Kind, KindWithContent, Status, Task}; use roaring::RoaringBitmap; use synchronoise::SignalEvent; @@ -566,7 +565,7 @@ impl IndexScheduler { } /// Return the name of all indexes without opening them. - pub fn index_names(self) -> Result> { + pub fn index_names(&self) -> Result> { let rtxn = self.env.read_txn()?; self.index_mapper.index_names(&rtxn) } @@ -1186,6 +1185,14 @@ impl IndexScheduler { Ok(TickOutcome::TickAgain(processed_tasks)) } + pub fn index_stats(&self, index_uid: &str) -> Result { + let is_indexing = self.is_index_processing(index_uid)?; + let rtxn = self.read_txn()?; + let index_stats = self.index_mapper.stats_of(&rtxn, index_uid)?; + + Ok(IndexStats { is_indexing, inner_stats: index_stats }) + } + pub(crate) fn delete_persisted_task_data(&self, task: &Task) -> Result<()> { match task.content_uuid() { Some(content_file) => self.delete_update_file(content_file), @@ -1238,6 +1245,12 @@ struct IndexBudget { task_db_size: usize, } +#[derive(Debug)] +pub struct IndexStats { + pub is_indexing: bool, + pub inner_stats: index_mapper::IndexStats, +} + #[cfg(test)] mod tests { use std::io::{BufWriter, Seek, Write}; diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index c5c168786..28988e30b 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -220,6 +220,24 @@ pub async fn delete_index( Ok(HttpResponse::Accepted().json(task)) } +#[derive(Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct IndexStats { + pub number_of_documents: u64, + pub is_indexing: bool, + pub field_distribution: FieldDistribution, +} + +impl From for IndexStats { + fn from(stats: index_scheduler::IndexStats) -> Self { + IndexStats { + number_of_documents: stats.inner_stats.number_of_documents, + is_indexing: stats.is_indexing, + field_distribution: stats.inner_stats.field_distribution, + } + } +} + pub async fn get_index_stats( index_scheduler: GuardedData, Data>, index_uid: web::Path, @@ -229,33 +247,8 @@ pub async fn get_index_stats( let index_uid = IndexUid::try_from(index_uid.into_inner())?; analytics.publish("Stats Seen".to_string(), json!({ "per_index_uid": true }), Some(&req)); - let stats = IndexStats::new((*index_scheduler).clone(), index_uid.into_inner())?; + let stats = IndexStats::from(index_scheduler.index_stats(&index_uid)?); debug!("returns: {:?}", stats); Ok(HttpResponse::Ok().json(stats)) } - -#[derive(Serialize, Debug)] -#[serde(rename_all = "camelCase")] -pub struct IndexStats { - pub number_of_documents: u64, - pub is_indexing: bool, - pub field_distribution: FieldDistribution, -} - -impl IndexStats { - pub fn new( - index_scheduler: Data, - index_uid: String, - ) -> Result { - // we check if there is currently a task processing associated with this index. - let is_processing = index_scheduler.is_index_processing(&index_uid)?; - let index = index_scheduler.index(&index_uid)?; - let rtxn = index.read_txn()?; - Ok(IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - is_indexing: is_processing, - field_distribution: index.field_distribution(&rtxn)?, - }) - } -} diff --git a/meilisearch/src/routes/mod.rs b/meilisearch/src/routes/mod.rs index a4523e53f..f54c8ee38 100644 --- a/meilisearch/src/routes/mod.rs +++ b/meilisearch/src/routes/mod.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use actix_web::web::Data; use actix_web::{web, HttpRequest, HttpResponse}; -use index_scheduler::{IndexScheduler, Query}; +use index_scheduler::IndexScheduler; use log::debug; use meilisearch_auth::AuthController; use meilisearch_types::error::ResponseError; @@ -12,7 +12,6 @@ use serde::{Deserialize, Serialize}; use serde_json::json; use time::OffsetDateTime; -use self::indexes::IndexStats; use crate::analytics::Analytics; use crate::extractors::authentication::policies::*; use crate::extractors::authentication::GuardedData; @@ -234,7 +233,7 @@ pub struct Stats { pub database_size: u64, #[serde(serialize_with = "time::serde::rfc3339::option::serialize")] pub last_update: Option, - pub indexes: BTreeMap, + pub indexes: BTreeMap, } async fn get_stats( @@ -260,32 +259,19 @@ pub fn create_all_stats( let mut last_task: Option = None; let mut indexes = BTreeMap::new(); let mut database_size = 0; - let processing_task = index_scheduler.get_tasks_from_authorized_indexes( - Query { statuses: Some(vec![Status::Processing]), limit: Some(1), ..Query::default() }, - filters, - )?; + // accumulate the size of each indexes - let processing_index = processing_task.first().and_then(|task| task.index_uid()); - index_scheduler.try_for_each_index(|name, index| { - if !filters.is_index_authorized(name) { - return Ok(()); + for index_uid in index_scheduler.index_names()? { + if !filters.is_index_authorized(&index_uid) { + continue; } - database_size += index.on_disk_size()?; - - let rtxn = index.read_txn()?; - let stats = IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - is_indexing: processing_index.map_or(false, |index_name| name == index_name), - field_distribution: index.field_distribution(&rtxn)?, - }; - - let updated_at = index.updated_at(&rtxn)?; - last_task = last_task.map_or(Some(updated_at), |last| Some(last.max(updated_at))); - - indexes.insert(name.to_string(), stats); - Ok(()) - })?; + let stats = index_scheduler.index_stats(&index_uid)?; + last_task = last_task.map_or(Some(stats.inner_stats.updated_at), |last| { + Some(last.max(stats.inner_stats.updated_at)) + }); + indexes.insert(index_uid.to_string(), stats.into()); + } database_size += index_scheduler.size()?; database_size += auth_controller.size()?; From 3bbf7605427e3b644b367a72ea9e592ff661b29d Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 19:53:58 +0100 Subject: [PATCH 2/6] update most snapshots --- index-scheduler/src/insta_snapshot.rs | 12 +++++++++++- .../cancel_enqueued_task/cancel_processed.snap | 3 +-- .../cancel_enqueued_task/initial_tasks_enqueued.snap | 2 +- .../cancel_mix_of_tasks/first_task_processed.snap | 3 ++- .../processing_second_task_cancel_enqueued.snap | 3 ++- .../cancel_task_registered.snap | 2 +- .../initial_task_processing.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../cancel_succeeded_task/cancel_processed.snap | 3 ++- .../initial_task_processed.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../all_tasks_processed.snap | 5 ++++- .../lib.rs/document_addition/after_register.snap | 2 +- .../document_addition/after_the_batch_creation.snap | 2 +- .../once_everything_is_processed.snap | 3 ++- .../after_processing_the_batch.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../before_index_creation.snap | 3 ++- .../both_task_succeeded.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../1.snap | 2 +- .../2.snap | 2 +- .../after_failing_the_deletion.snap | 2 +- .../after_last_successful_addition.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../document_addition_batch_created.snap | 2 +- .../document_addition_failed.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../after_register.snap | 2 +- .../index_creation_failed.snap | 2 +- .../after_batch_succeeded.snap | 3 ++- .../after_failing_to_commit.snap | 3 ++- ...on_succeeded_but_index_scheduler_not_updated.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../task_successfully_processed.snap | 3 ++- .../after_batch_creation.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../index_creation_failed.snap | 2 +- .../registered_the_first_task.snap | 2 +- .../processed_the_first_task.snap | 3 ++- .../processed_the_second_task.snap | 4 +++- .../processed_the_third_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../process_tasks_without_autobatching/first.snap | 3 ++- .../process_tasks_without_autobatching/fourth.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../registered_the_fourth_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../process_tasks_without_autobatching/second.snap | 3 ++- .../process_tasks_without_autobatching/third.snap | 3 ++- .../lib.rs/query_tasks_canceled_by/start.snap | 3 ++- .../processed_all_tasks.snap | 5 ++++- .../registered_the_first_task.snap | 2 +- .../registered_the_second_task.snap | 2 +- .../registered_the_third_task.snap | 2 +- .../src/snapshots/lib.rs/query_tasks_simple/end.snap | 4 +++- .../snapshots/lib.rs/query_tasks_simple/start.snap | 2 +- .../lib.rs/query_tasks_special_rules/start.snap | 2 +- .../everything_is_succesfully_registered.snap | 2 +- .../src/snapshots/lib.rs/swap_indexes/create_a.snap | 3 ++- .../src/snapshots/lib.rs/swap_indexes/create_b.snap | 4 +++- .../src/snapshots/lib.rs/swap_indexes/create_c.snap | 5 ++++- .../src/snapshots/lib.rs/swap_indexes/create_d.snap | 6 +++++- .../lib.rs/swap_indexes/first_swap_processed.snap | 6 +++++- .../lib.rs/swap_indexes/first_swap_registered.snap | 6 +++++- .../lib.rs/swap_indexes/second_swap_processed.snap | 6 +++++- .../swap_indexes/third_empty_swap_processed.snap | 6 +++++- .../lib.rs/swap_indexes/two_swaps_registered.snap | 6 +++++- .../after_the_index_creation.snap | 6 +++++- .../swap_indexes_errors/first_swap_failed.snap | 6 +++++- .../swap_indexes_errors/initial_tasks_processed.snap | 6 +++++- .../initial_tasks_enqueued.snap | 2 +- .../initial_tasks_processed.snap | 3 ++- .../task_deletion_processed.snap | 3 ++- .../after_registering_the_task_deletion.snap | 3 ++- .../initial_tasks_enqueued.snap | 2 +- .../initial_tasks_processed.snap | 3 ++- .../task_deletion_processed.snap | 3 ++- .../initial_tasks_enqueued.snap | 2 +- .../task_deletion_done.snap | 2 +- .../task_deletion_enqueued.snap | 2 +- .../task_deletion_processing.snap | 2 +- .../after_processing_the_10_tasks.snap | 3 ++- .../after_registering_the_10_tasks.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_registering_the_10_tasks.snap | 3 ++- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_processing_the_10_tasks.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 2 +- .../five_tasks_processed.snap | 2 +- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../only_first_task_failed.snap | 2 +- .../after_registering_the_10_tasks.snap | 3 ++- .../all_tasks_processed.snap | 3 ++- .../processed_the_first_task.snap | 3 ++- .../registered_the_first_task.snap | 2 +- .../after_registering_the_5_tasks.snap | 2 +- .../fifth_task_succeeds.snap | 3 ++- .../first_and_second_task_fails.snap | 3 ++- .../fourth_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../after_registering_the_3_tasks.snap | 2 +- .../only_first_task_succeed.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_fails.snap | 3 ++- .../after_registering_the_3_tasks.snap | 2 +- .../only_first_task_succeed.snap | 3 ++- .../second_and_third_tasks_fails.snap | 3 ++- .../after_registering_the_6_tasks.snap | 2 +- .../all_other_tasks_succeeds.snap | 3 ++- .../first_task_fails.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../after_registering_the_6_tasks.snap | 2 +- .../all_other_tasks_succeeds.snap | 3 ++- .../first_task_succeed.snap | 3 ++- .../second_task_fails.snap | 3 ++- .../third_task_succeeds.snap | 3 ++- .../snapshots/lib.rs/test_document_replace/1.snap | 2 +- .../snapshots/lib.rs/test_document_replace/2.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../src/snapshots/lib.rs/test_document_update/1.snap | 2 +- .../src/snapshots/lib.rs/test_document_update/2.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- .../after_registering_the_10_tasks.snap | 2 +- .../all_tasks_processed.snap | 3 ++- .../five_tasks_processed.snap | 3 ++- 147 files changed, 268 insertions(+), 148 deletions(-) diff --git a/index-scheduler/src/insta_snapshot.rs b/index-scheduler/src/insta_snapshot.rs index dcc348c98..43509aa84 100644 --- a/index-scheduler/src/insta_snapshot.rs +++ b/index-scheduler/src/insta_snapshot.rs @@ -254,6 +254,16 @@ pub fn snapshot_canceled_by( snap } pub fn snapshot_index_mapper(rtxn: &RoTxn, mapper: &IndexMapper) -> String { + let mut s = String::new(); let names = mapper.index_names(rtxn).unwrap(); - format!("{names:?}") + + for name in names { + let stats = mapper.stats_of(rtxn, &name).unwrap(); + s.push_str(&format!( + "{name}: {{ number_of_documents: {}, field_distribution: {:?} }}\n", + stats.number_of_documents, stats.field_distribution + )); + } + + s } diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap index a06b82c74..077784965 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1755 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -23,7 +22,7 @@ canceled [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: 1 [0,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap index 743e74a14..3d3830b29 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_enqueued_task/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap index 36d34ff93..16be0e4d5 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/first_task_processed.snap @@ -23,7 +23,8 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap index 30da295f9..46ccfcb8b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/processing_second_task_cancel_enqueued.snap @@ -25,7 +25,8 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap index 061f334c8..f65b5ee67 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_task_registered.snap @@ -20,7 +20,7 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap index 905cec451..8a3ad4661 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/initial_task_processing.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap index d454b501e..6873f8b56 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap index b3842cc12..36e47f569 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/cancel_processed.snap @@ -21,7 +21,8 @@ succeeded [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: 1 [] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap index e52a80fae..028e03446 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/initial_task_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap index d454b501e..6873f8b56 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_succeeded_task/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap index f9195857a..c9a12c327 100644 --- a/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/do_not_batch_task_of_different_indexes/all_tasks_processed.snap @@ -27,7 +27,10 @@ doggos [0,3,] girafos [2,5,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos", "doggos", "girafos"] +cattos: { number_of_documents: 0, field_distribution: {} } +doggos: { number_of_documents: 0, field_distribution: {} } +girafos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/after_register.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap index 10291b206..33d58eab6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/after_the_batch_creation.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap b/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap index 6079a4317..b4a6da3af 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition/once_everything_is_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap index f70496b81..b27288a0f 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/after_processing_the_batch.snap @@ -21,7 +21,8 @@ succeeded [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap index 35dc0b41a..d26e62bff 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap index bd65a6d99..e0f371120 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_document_deletion/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap index 379e90120..97ba419a8 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/before_index_creation.snap @@ -23,7 +23,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap index 2ff82bfd2..fd96ee974 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/both_task_succeeded.snap @@ -23,7 +23,7 @@ succeeded [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap index 86674ccd0..68ded1f0d 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap index f4d3a8190..1601a6b25 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion/registered_the_third_task.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap index e0813f109..c200ce402 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/1.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap index f8586b7b8..7884dfe08 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_addition_and_index_deletion_on_unexisting_index/2.snap @@ -21,7 +21,7 @@ succeeded [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap index 2850af744..1d4aa24e2 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_failing_the_deletion.snap @@ -21,7 +21,7 @@ failed [0,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap index 59e18bdb0..0f9dfd3e6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/after_last_successful_addition.snap @@ -22,7 +22,8 @@ failed [0,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 3, field_distribution: {"catto": 1, "doggo": 2, "id": 3} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap index 9356e6dba..5753db7e6 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap index 89e341184..0b6191f9e 100644 --- a/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/document_deletion_and_document_addition/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap index 10291b206..33d58eab6 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_batch_created.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap index c1bfd7db9..18edc3613 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/document_addition_failed.snap @@ -19,7 +19,7 @@ failed [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap index 63a2d606e..f252cc8ef 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/after_register.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap index 252ae082e..d2b06a4f4 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_process_batch_for_index_creation/index_creation_failed.snap @@ -19,7 +19,7 @@ failed [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap index bdda4e086..9c31fd318 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_batch_succeeded.snap @@ -18,7 +18,8 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap index bdda4e086..9c31fd318 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/after_failing_to_commit.snap @@ -18,7 +18,8 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/document_addition_succeeded_but_index_scheduler_not_updated.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap index 3e654a0e2..c1869a475 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap index 6079a4317..b4a6da3af 100644 --- a/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/fail_in_update_task_after_process_batch_success_for_document_addition/task_successfully_processed.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap index c75a3b87e..3f34ca57b 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/after_batch_creation.snap @@ -18,7 +18,7 @@ enqueued [0,] index_a [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap index 656b06ad3..f17bfe38f 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] index_a [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap index 0cf82317b..75d5d8760 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_second_task.snap @@ -20,7 +20,7 @@ index_a [0,] index_b [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap index 8b73d12c2..a69818dfa 100644 --- a/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/insert_task_while_another_task_is_processing/registered_the_third_task.snap @@ -22,7 +22,7 @@ index_a [0,2,] index_b [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap index 60d8c4cdb..9100e5075 100644 --- a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/index_creation_failed.snap @@ -19,7 +19,7 @@ failed [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap index 63a2d606e..f252cc8ef 100644 --- a/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/panic_in_process_batch_for_index_creation/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap index 3a4705635..a34531f2a 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_first_task.snap @@ -23,7 +23,8 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap index 979ec8af6..f163ee3d7 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_second_task.snap @@ -23,7 +23,9 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos", "doggos"] +cattos: { number_of_documents: 0, field_distribution: {} } +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap index c7190dd8b..7e8db762f 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/processed_the_third_task.snap @@ -23,7 +23,8 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -["cattos"] +cattos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap index 82cc517cb..4020c2db0 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_second_task.snap @@ -20,7 +20,7 @@ cattos [1,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap index 76a6b3f08..f25280bc1 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_inserted_without_new_signal/registered_the_third_task.snap @@ -22,7 +22,7 @@ cattos [1,] doggos [0,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap index fa09eba28..d67c659c6 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/first.snap @@ -23,7 +23,8 @@ succeeded [0,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap index e52c36718..3d5c28e2c 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/fourth.snap @@ -23,7 +23,8 @@ succeeded [0,1,2,3,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap index 52866bed6..c2ad519fa 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap index 6ac8aa79f..a9eb16d21 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_fourth_task.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,3,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap index 32d32daaf..ad269dd7a 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_second_task.snap @@ -20,7 +20,7 @@ enqueued [0,1,] doggos [0,1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap index 75ceef14d..6267a840f 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/registered_the_third_task.snap @@ -21,7 +21,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap index 4b1577aa6..d45867c49 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/second.snap @@ -23,7 +23,8 @@ succeeded [0,1,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap index 2ac3b141f..9705c5321 100644 --- a/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap +++ b/index-scheduler/src/snapshots/lib.rs/process_tasks_without_autobatching/third.snap @@ -23,7 +23,8 @@ succeeded [0,1,2,] doggos [0,1,2,3,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap index 624606ba9..b05f05d5d 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_canceled_by/start.snap @@ -26,7 +26,8 @@ catto [0,2,] doggo [1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: 3 [1,2,] diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap index 694bbff26..a07c46427 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/processed_all_tasks.snap @@ -23,7 +23,10 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto", "doggo", "whalo"] +catto: { number_of_documents: 0, field_distribution: {} } +doggo: { number_of_documents: 0, field_distribution: {} } +whalo: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap index c1a0899cd..8eb784c9b 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggo [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap index 6daa6bce2..776d699e1 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_second_task.snap @@ -20,7 +20,7 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap index 8427679e7..1a3fc5b53 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_from_and_limit/registered_the_third_task.snap @@ -22,7 +22,7 @@ doggo [0,] whalo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap index 65838db64..fe3b1eed4 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/end.snap @@ -24,7 +24,9 @@ doggo [1,] whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["catto", "doggo"] +catto: { number_of_documents: 0, field_distribution: {} } +doggo: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap index aed5aed8c..1fa3fa1ab 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_simple/start.snap @@ -22,7 +22,7 @@ doggo [1,] whalo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap index 2bb4f7590..4baa9d87a 100644 --- a/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap +++ b/index-scheduler/src/snapshots/lib.rs/query_tasks_special_rules/start.snap @@ -24,7 +24,7 @@ doggo [1,2,] whalo [3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap b/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap index 360752bc6..62796a929 100644 --- a/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/register/everything_is_succesfully_registered.snap @@ -23,7 +23,7 @@ catto [0,1,2,] doggo [3,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap index 2c009ef1a..47a6dc6a7 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_a.snap @@ -25,7 +25,8 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a"] +a: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap index 6d6e89c5f..13b783feb 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_b.snap @@ -25,7 +25,9 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap index c12334ecf..6b4bdb756 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_c.snap @@ -25,7 +25,10 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/create_d.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap index 17e8936f0..c7ab30a36 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_processed.snap @@ -28,7 +28,11 @@ c [3,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap index f2c74f676..c0727d6e9 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/first_swap_registered.snap @@ -27,7 +27,11 @@ c [2,4,] d [3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap index acfbc4c77..07acbe474 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/second_swap_processed.snap @@ -28,7 +28,11 @@ c [1,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap index c7c6faae6..aeeba29f8 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/third_empty_swap_processed.snap @@ -29,7 +29,11 @@ c [1,4,5,] d [2,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap index 0f8355f25..d1847fed1 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes/two_swaps_registered.snap @@ -28,7 +28,11 @@ c [2,4,5,] d [3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/after_the_index_creation.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap index fd9790835..4632820f0 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap @@ -30,7 +30,11 @@ e [4,] f [4,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap index b20b3b320..038903c59 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/initial_tasks_processed.snap @@ -25,7 +25,11 @@ c [2,] d [3,] ---------------------------------------------------------------------- ### Index Mapper: -["a", "b", "c", "d"] +a: { number_of_documents: 0, field_distribution: {} } +b: { number_of_documents: 0, field_distribution: {} } +c: { number_of_documents: 0, field_distribution: {} } +d: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap index fc37dcf2d..4b4a50bfb 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap index e4c4d9d7e..6e3a6e8ed 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/initial_tasks_processed.snap @@ -21,7 +21,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap index 8874cc9e0..c47a7a95f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_delete_same_task_twice/task_deletion_processed.snap @@ -22,7 +22,8 @@ succeeded [2,3,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap index 3c3bd754e..302fd5f5e 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/after_registering_the_task_deletion.snap @@ -23,7 +23,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap index fc37dcf2d..4b4a50bfb 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_enqueued.snap @@ -20,7 +20,7 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap index e4c4d9d7e..6e3a6e8ed 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/initial_tasks_processed.snap @@ -21,7 +21,8 @@ catto [0,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap index 29c251027..cf64406b8 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_deleteable/task_deletion_processed.snap @@ -21,7 +21,8 @@ succeeded [2,] doggo [1,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap index afb8af39c..25e2deadc 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/initial_tasks_enqueued.snap @@ -22,7 +22,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap index 6fc0a4f7c..743cd615f 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_done.snap @@ -25,7 +25,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap index e2ad01246..5c4d9be04 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_enqueued.snap @@ -24,7 +24,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap index 8017f77b9..49df62cb7 100644 --- a/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap +++ b/index-scheduler/src/snapshots/lib.rs/task_deletion_undeleteable/task_deletion_processing.snap @@ -24,7 +24,7 @@ catto [0,1,] doggo [2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap index d112c8145..cb6ec63de 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_processing_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap index 7daafcccb..2e4845fb4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap index ed265ac6e..e046ed386 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap index 83f17bcef..e2e2133f5 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap index fc2fdc5f1..970587ba2 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/all_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap index 48f972785..5de505cf2 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/five_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap index 6214f3139..606367737 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap index 52866bed6..c2ad519fa 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_with_index_without_autobatching/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap index ed28c121b..5a6ea9100 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap index 828d4dafc..e2217e1f4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap index 671713c8e..02d0b1988 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap index d995cab9e..8164394c8 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap index 3ae875bff..4e0bb97ab 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,7 @@ failed [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap index ad5968b58..f98802f21 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap index 19ee47359..ea6ef400a 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap @@ -29,7 +29,8 @@ failed [0,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 9, field_distribution: {"doggo": 9, "id": 9} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap index ed57bc4e3..c27a1b5cb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap @@ -28,7 +28,7 @@ failed [0,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap index 61b7f3016..68599f03e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/after_registering_the_10_tasks.snap @@ -30,7 +30,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap index 0962dcdf5..b442a9c2f 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/all_tasks_processed.snap @@ -30,7 +30,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,10,] doggos [0,1,2,3,4,5,6,7,8,9,10,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap index ed265ac6e..e046ed386 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/processed_the_first_task.snap @@ -19,7 +19,8 @@ succeeded [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap index e23cd648f..1a29c1ac6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_rights_with_index/registered_the_first_task.snap @@ -18,7 +18,7 @@ enqueued [0,] doggos [0,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap index 53d3d28da..fde8e3451 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/after_registering_the_5_tasks.snap @@ -22,7 +22,7 @@ enqueued [0,1,2,3,4,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap index 58e16fa55..85d7ba460 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fifth_task_succeeds.snap @@ -24,7 +24,8 @@ failed [0,1,3,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "id": 2} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap index 98bd2b580..ab788cc36 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/first_and_second_task_fails.snap @@ -23,7 +23,8 @@ failed [0,1,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap index 279040fdb..2a8748657 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/fourth_task_fails.snap @@ -24,7 +24,8 @@ failed [0,1,3,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap index 441bb59e2..58cdbe432 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_bad_primary_key/third_task_succeeds.snap @@ -24,7 +24,8 @@ failed [0,1,] doggos [0,1,2,3,4,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap index cff9b0bd9..5699c58c4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/after_registering_the_3_tasks.snap @@ -20,7 +20,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap index d3888af01..85689fa4d 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/only_first_task_succeed.snap @@ -21,7 +21,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap index 84baeca92..18db64ca4 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/second_task_fails.snap @@ -22,7 +22,8 @@ failed [1,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap index 6b92f91d1..4a9edc602 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key/third_task_fails.snap @@ -22,7 +22,8 @@ failed [1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap index 4c4f88a30..1187159b7 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/after_registering_the_3_tasks.snap @@ -20,7 +20,7 @@ enqueued [0,1,2,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap index 76b814eab..22b91bb60 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/only_first_task_succeed.snap @@ -21,7 +21,8 @@ succeeded [0,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap index 26b0f6584..05eca0af1 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_multiple_primary_key_batch_wrong_key/second_and_third_tasks_fails.snap @@ -22,7 +22,8 @@ failed [1,] doggos [0,1,2,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap index 078ba06d3..47b0994ec 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/after_registering_the_6_tasks.snap @@ -23,7 +23,7 @@ enqueued [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap index 69cbd3def..a7464685a 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/all_other_tasks_succeeds.snap @@ -25,7 +25,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 4, field_distribution: {"doggo": 4, "paw": 4} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap index ac63f3b58..5c7f7e8d8 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/first_task_fails.snap @@ -24,7 +24,8 @@ failed [0,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap index 538b4af93..2c255aeba 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/second_task_fails.snap @@ -24,7 +24,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap index 1271b6f92..2f944adcf 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key/third_task_succeeds.snap @@ -25,7 +25,8 @@ failed [0,1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "paw": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap index 0e9ecb81a..c89abf033 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/after_registering_the_6_tasks.snap @@ -23,7 +23,7 @@ enqueued [0,1,2,3,4,5,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap index 437c6375e..1f55e8f6d 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/all_other_tasks_succeeds.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "doggoid": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap index fd480420a..532cef143 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/first_task_succeed.snap @@ -24,7 +24,8 @@ succeeded [0,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap index 99001edb0..2920c3b2e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/second_task_fails.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 1, field_distribution: {"doggo": 1, "doggoid": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap index 64625ca90..8981dd8c3 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_with_set_and_null_primary_key_inference_works/third_task_succeeds.snap @@ -25,7 +25,8 @@ failed [1,] doggos [0,1,2,3,4,5,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 2, field_distribution: {"doggo": 2, "doggoid": 2} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap index a47ef319f..21581fe78 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/1.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap index f6423719c..fabf764bc 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace/2.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap index 0f52c9664..1beba7264 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap index b80b8bb40..a0b121320 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap index b1528c103..88bf59f8e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_replace_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap index 6157fb454..53f0fbc9b 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/1.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap index 736f998d0..d8383818e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update/2.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap index 85fda1a43..6785786e3 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap index a1fc55210..4c8fd7ea6 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap index fb0b629ec..f184bb3cb 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_update_without_autobatching/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap index 330a3318e..9095f031b 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/after_registering_the_10_tasks.snap @@ -27,7 +27,7 @@ enqueued [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -[] + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap index 20fda049f..6c6fba517 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/all_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,5,6,7,8,9,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 10, field_distribution: {"doggo": 10, "id": 10} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap index 9fd990aa9..8aa7cfbea 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_mixed_document_addition/five_tasks_processed.snap @@ -28,7 +28,8 @@ succeeded [0,1,2,3,4,] doggos [0,1,2,3,4,5,6,7,8,9,] ---------------------------------------------------------------------- ### Index Mapper: -["doggos"] +doggos: { number_of_documents: 5, field_distribution: {"doggo": 5, "id": 5} } + ---------------------------------------------------------------------- ### Canceled By: From 076a3d371c733a0e90905038bde4626f3b9a21c6 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 28 Feb 2023 15:24:31 +0100 Subject: [PATCH 3/6] Eagerly compute stats as fallback to the cache. - Refactor all around to avoid spawning indexes more times than necessary --- index-scheduler/src/batch.rs | 12 +++- index-scheduler/src/index_mapper/mod.rs | 83 +++++++++++++++++++------ index-scheduler/src/lib.rs | 5 ++ meilisearch/src/routes/indexes/mod.rs | 4 ++ 4 files changed, 83 insertions(+), 21 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 03287d7ae..41b5793b1 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -847,8 +847,10 @@ impl IndexScheduler { // this is a non-critical operation. If it fails, we should not fail // the entire batch. let res = || -> Result<()> { + let index_rtxn = index.read_txn()?; + let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; let mut wtxn = self.env.write_txn()?; - self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; wtxn.commit()?; Ok(()) }(); @@ -888,6 +890,10 @@ impl IndexScheduler { )?; index_wtxn.commit()?; } + + // drop rtxn before starting a new wtxn on the same db + rtxn.commit()?; + task.status = Status::Succeeded; task.details = Some(Details::IndexInfo { primary_key }); @@ -897,7 +903,9 @@ impl IndexScheduler { // the entire batch. let res = || -> Result<()> { let mut wtxn = self.env.write_txn()?; - self.index_mapper.compute_and_store_stats_of(&mut wtxn, &index_uid)?; + let index_rtxn = index.read_txn()?; + let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; wtxn.commit()?; Ok(()) }(); diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 9e1de438a..174f4f9a3 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -54,8 +54,11 @@ pub struct IndexMapper { /// Map an index name with an index uuid currently available on disk. pub(crate) index_mapping: Database, - /// Map an index name with the cached stats associated to the index. - pub(crate) index_stats: Database>, + /// Map an index UUID with the cached stats associated to the index. + /// + /// Using an UUID forces to use the index_mapping table to recover the index behind a name, ensuring + /// consistency wrt index swapping. + pub(crate) index_stats: Database>, /// Path to the folder where the LMDB environments of each index are. base_path: PathBuf, @@ -80,15 +83,39 @@ pub enum IndexStatus { Available(Index), } +/// The statistics that can be computed from an `Index` object. #[derive(Serialize, Deserialize, Debug)] pub struct IndexStats { + /// Number of documents in the index. pub number_of_documents: u64, + /// Size of the index' DB, in bytes. pub database_size: u64, + /// Association of every field name with the number of times it occurs in the documents. pub field_distribution: FieldDistribution, + /// Creation date of the index. pub created_at: OffsetDateTime, + /// Date of the last update of the index. pub updated_at: OffsetDateTime, } +impl IndexStats { + /// Compute the stats of an index + /// + /// # Parameters + /// + /// - rtxn: a RO transaction for the index, obtained from `Index::read_txn()`. + pub fn new(index: &Index, rtxn: &RoTxn) -> Result { + let database_size = index.on_disk_size()?; + Ok(IndexStats { + number_of_documents: index.number_of_documents(rtxn)?, + database_size, + field_distribution: index.field_distribution(rtxn)?, + created_at: index.created_at(rtxn)?, + updated_at: index.updated_at(rtxn)?, + }) + } +} + impl IndexMapper { pub fn new( env: &Env, @@ -149,12 +176,14 @@ impl IndexMapper { /// Removes the index from the mapping table and the in-memory index map /// but keeps the associated tasks. pub fn delete_index(&self, mut wtxn: RwTxn, name: &str) -> Result<()> { - self.index_stats.delete(&mut wtxn, name)?; let uuid = self .index_mapping .get(&wtxn, name)? .ok_or_else(|| Error::IndexNotFound(name.to_string()))?; + // Not an error if the index had no stats in cache. + self.index_stats.delete(&mut wtxn, &uuid)?; + // Once we retrieved the UUID of the index we remove it from the mapping table. assert!(self.index_mapping.delete(&mut wtxn, name)?); @@ -375,26 +404,42 @@ impl IndexMapper { Ok(()) } - /// Return the stored stats of an index. + /// The stats of an index. + /// + /// If available in the cache, they are directly returned. + /// Otherwise, the `Index` is opened to compute the stats on the fly (the result is not cached). + /// The stats for an index are cached after each `Index` update. pub fn stats_of(&self, rtxn: &RoTxn, index_uid: &str) -> Result { - self.index_stats + let uuid = self + .index_mapping .get(rtxn, index_uid)? - .ok_or_else(|| Error::IndexNotFound(index_uid.to_string())) + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; + + match self.index_stats.get(rtxn, &uuid)? { + Some(stats) => Ok(stats), + None => { + let index = self.index(rtxn, index_uid)?; + let index_rtxn = index.read_txn()?; + IndexStats::new(&index, &index_rtxn) + } + } } - /// Return the stats of an index and write it in the index-mapper database. - pub fn compute_and_store_stats_of(&self, wtxn: &mut RwTxn, index_uid: &str) -> Result<()> { - let index = self.index(wtxn, index_uid)?; - let database_size = index.on_disk_size()?; - let rtxn = index.read_txn()?; - let stats = IndexStats { - number_of_documents: index.number_of_documents(&rtxn)?, - database_size, - field_distribution: index.field_distribution(&rtxn)?, - created_at: index.created_at(&rtxn)?, - updated_at: index.updated_at(&rtxn)?, - }; - self.index_stats.put(wtxn, index_uid, &stats)?; + /// Stores the new stats for an index. + /// + /// Expected usage is to compute the stats the index using `IndexStats::new`, the pass it to this function. + pub fn store_stats_of( + &self, + wtxn: &mut RwTxn, + index_uid: &str, + stats: IndexStats, + ) -> Result<()> { + let uuid = self + .index_mapping + .get(wtxn, index_uid)? + .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; + + self.index_stats.put(wtxn, &uuid, &stats)?; Ok(()) } diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 4f875eaca..7c5970fad 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -1245,9 +1245,14 @@ struct IndexBudget { task_db_size: usize, } +/// The statistics that can be computed from an `Index` object and the scheduler. +/// +/// Compared with `index_mapper::IndexStats`, it adds the scheduling status. #[derive(Debug)] pub struct IndexStats { + /// Whether this index is currently performing indexation, according to the scheduler. pub is_indexing: bool, + /// Internal stats computed from the index. pub inner_stats: index_mapper::IndexStats, } diff --git a/meilisearch/src/routes/indexes/mod.rs b/meilisearch/src/routes/indexes/mod.rs index 28988e30b..ba925b3d5 100644 --- a/meilisearch/src/routes/indexes/mod.rs +++ b/meilisearch/src/routes/indexes/mod.rs @@ -220,11 +220,15 @@ pub async fn delete_index( Ok(HttpResponse::Accepted().json(task)) } +/// Stats of an `Index`, as known to the `stats` route. #[derive(Serialize, Debug)] #[serde(rename_all = "camelCase")] pub struct IndexStats { + /// Number of documents in the index pub number_of_documents: u64, + /// Whether the index is currently performing indexation, according to the scheduler. pub is_indexing: bool, + /// Association of every field name with the number of times it occurs in the documents. pub field_distribution: FieldDistribution, } From 76288fad72321531617b023425d71ec6461b000c Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 28 Feb 2023 15:36:25 +0100 Subject: [PATCH 4/6] Fix snapshots --- .../lib.rs/cancel_mix_of_tasks/aborted_indexation.snap | 4 +++- .../lib.rs/cancel_mix_of_tasks/cancel_processed.snap | 5 +++-- .../lib.rs/cancel_processing_task/aborted_indexation.snap | 3 ++- .../lib.rs/cancel_processing_task/cancel_processed.snap | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap index 5c6078b51..112cd597b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/aborted_indexation.snap @@ -25,7 +25,9 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["beavero", "catto"] +beavero: { number_of_documents: 0, field_distribution: {} } +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap index f67fff59f..1e5182f80 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_mix_of_tasks/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1859 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -27,7 +26,9 @@ catto [0,] wolfo [2,] ---------------------------------------------------------------------- ### Index Mapper: -["beavero", "catto"] +beavero: { number_of_documents: 0, field_distribution: {} } +catto: { number_of_documents: 1, field_distribution: {"id": 1} } + ---------------------------------------------------------------------- ### Canceled By: 3 [1,2,] diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap index 6074673e3..a2187ab2b 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/aborted_indexation.snap @@ -20,7 +20,8 @@ enqueued [0,1,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: diff --git a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap index f2035c7fe..0ede1ffd3 100644 --- a/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/cancel_processing_task/cancel_processed.snap @@ -1,6 +1,5 @@ --- source: index-scheduler/src/lib.rs -assertion_line: 1818 --- ### Autobatching Enabled = true ### Processing Tasks: @@ -23,7 +22,8 @@ canceled [0,] catto [0,] ---------------------------------------------------------------------- ### Index Mapper: -["catto"] +catto: { number_of_documents: 0, field_distribution: {} } + ---------------------------------------------------------------------- ### Canceled By: 1 [0,] From 7faa9a22f6d398496fe6fc07028763a55c9466e1 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 7 Mar 2023 14:00:54 +0100 Subject: [PATCH 5/6] Pass IndexStat by ref in store_stats_of --- index-scheduler/src/batch.rs | 4 ++-- index-scheduler/src/index_mapper/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 41b5793b1..8d0e1ac3f 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -850,7 +850,7 @@ impl IndexScheduler { let index_rtxn = index.read_txn()?; let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; let mut wtxn = self.env.write_txn()?; - self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?; wtxn.commit()?; Ok(()) }(); @@ -905,7 +905,7 @@ impl IndexScheduler { let mut wtxn = self.env.write_txn()?; let index_rtxn = index.read_txn()?; let stats = crate::index_mapper::IndexStats::new(&index, &index_rtxn)?; - self.index_mapper.store_stats_of(&mut wtxn, &index_uid, stats)?; + self.index_mapper.store_stats_of(&mut wtxn, &index_uid, &stats)?; wtxn.commit()?; Ok(()) }(); diff --git a/index-scheduler/src/index_mapper/mod.rs b/index-scheduler/src/index_mapper/mod.rs index 174f4f9a3..2bf6f46ad 100644 --- a/index-scheduler/src/index_mapper/mod.rs +++ b/index-scheduler/src/index_mapper/mod.rs @@ -432,14 +432,14 @@ impl IndexMapper { &self, wtxn: &mut RwTxn, index_uid: &str, - stats: IndexStats, + stats: &IndexStats, ) -> Result<()> { let uuid = self .index_mapping .get(wtxn, index_uid)? .ok_or_else(|| Error::IndexNotFound(index_uid.to_string()))?; - self.index_stats.put(wtxn, &uuid, &stats)?; + self.index_stats.put(wtxn, &uuid, stats)?; Ok(()) } From 2f5b9fbbd83cf919f18749d632d046b1e7c75c2a Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 7 Mar 2023 14:05:27 +0100 Subject: [PATCH 6/6] Restore contribution of the index sizes to the db size - the index size now contributes to the db size even if the index is not authorized --- meilisearch/src/routes/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meilisearch/src/routes/mod.rs b/meilisearch/src/routes/mod.rs index f54c8ee38..c824d3f36 100644 --- a/meilisearch/src/routes/mod.rs +++ b/meilisearch/src/routes/mod.rs @@ -260,13 +260,17 @@ pub fn create_all_stats( let mut indexes = BTreeMap::new(); let mut database_size = 0; - // accumulate the size of each indexes for index_uid in index_scheduler.index_names()? { + // Accumulate the size of all indexes, even unauthorized ones, so + // as to return a database_size representative of the correct database size on disk. + // See for context. + let stats = index_scheduler.index_stats(&index_uid)?; + database_size += stats.inner_stats.database_size; + if !filters.is_index_authorized(&index_uid) { continue; } - let stats = index_scheduler.index_stats(&index_uid)?; last_task = last_task.map_or(Some(stats.inner_stats.updated_at), |last| { Some(last.max(stats.inner_stats.updated_at)) });