diff --git a/cluster/src/lib.rs b/cluster/src/lib.rs index c464aa065..243b016e5 100644 --- a/cluster/src/lib.rs +++ b/cluster/src/lib.rs @@ -107,12 +107,15 @@ impl Follower { } pub fn get_new_batch(&mut self) -> Batch { + info!("Get new batch called"); let (id, batch) = self.get_batch.recv().expect("Lost connection to the leader"); + info!("Got a new batch"); self.batch_id = id; batch } pub fn ready_to_commit(&mut self) { + info!("I'm ready to commit"); self.sender.send(FollowerMsg::ReadyToCommit(self.batch_id)).unwrap(); loop { @@ -124,6 +127,7 @@ impl Follower { panic!("We missed a batch"); } } + info!("I got the right to commit"); } pub fn get_new_task(&mut self) -> (Task, Option>) { diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index a37a1f8c9..fb73d3a7f 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -44,6 +44,7 @@ use cluster::{Follower, Leader}; use dump::{KindDump, TaskDump, UpdateFile}; pub use error::Error; use file_store::FileStore; +use log::info; use meilisearch_types::error::ResponseError; use meilisearch_types::heed::types::{OwnedType, SerdeBincode, SerdeJson, Str}; use meilisearch_types::heed::{self, Database, Env, RoTxn}; @@ -1142,10 +1143,12 @@ impl IndexScheduler { self.breakpoint(Breakpoint::Start); } + info!("before getting a new batch"); let batch = match self.get_or_create_next_batch()? { Some(batch) => batch, None => return Ok(TickOutcome::WaitForSignal), }; + info!("after getting a new batch"); let index_uid = batch.index_uid().map(ToOwned::to_owned); // TODO cluster: Should we send the starting date as well so everyone is in sync?