From a2d6dc857112ff10bc9f72f770d36f0a745ccd3e Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 13 Nov 2023 10:44:36 +0100 Subject: [PATCH] Fix typo, remove caching for the change of index --- index-scheduler/src/batch.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 96cb85562..aa93cda2a 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -923,7 +923,7 @@ impl IndexScheduler { self.index_mapper.index(&rtxn, &index_uid)? }; - // the index operation can take a long time, so save this handle to make it available tothe search for the duration of the tick + // the index operation can take a long time, so save this handle to make it available to the search for the duration of the tick *self.currently_updating_index.write().unwrap() = Some((index_uid.clone(), index.clone())); @@ -963,9 +963,6 @@ impl IndexScheduler { Batch::IndexUpdate { index_uid, primary_key, mut task } => { let rtxn = self.env.read_txn()?; let index = self.index_mapper.index(&rtxn, &index_uid)?; - // the index update can take a long time, so save this handle to make it available tothe search for the duration of the tick - *self.currently_updating_index.write().unwrap() = - Some((index_uid.clone(), index.clone())); if let Some(primary_key) = primary_key.clone() { let mut index_wtxn = index.write_txn()?;