diff --git a/meilidb-core/src/database.rs b/meilidb-core/src/database.rs index 87bdbf8f1..af733d034 100644 --- a/meilidb-core/src/database.rs +++ b/meilidb-core/src/database.rs @@ -23,8 +23,7 @@ fn update_awaiter( rkv: Arc>, update_fn: Arc, index: Index, -) -{ +) { for () in receiver { // consume all updates in order (oldest first) loop { diff --git a/meilidb-core/src/store/mod.rs b/meilidb-core/src/store/mod.rs index 3bdd4ca18..6318284ca 100644 --- a/meilidb-core/src/store/mod.rs +++ b/meilidb-core/src/store/mod.rs @@ -186,6 +186,13 @@ impl Index { ) } + pub fn current_update_id(&self, reader: &T) -> MResult> { + match self.updates.last_update_id(reader)? { + Some((id, _)) => Ok(Some(id)), + None => Ok(None), + } + } + pub fn update_status( &self, reader: &T,