From ba150f21274d1b70ab9d52ae0da57929e409a081 Mon Sep 17 00:00:00 2001 From: Tamo Date: Sun, 16 Oct 2022 03:14:01 +0200 Subject: [PATCH] commit after creating an index --- index-scheduler/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 6c797ea93..ddf75b2a8 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -525,7 +525,10 @@ impl IndexScheduler { /// Create a new index without any associated task. pub fn create_raw_index(&self, name: &str) -> Result { let mut wtxn = self.env.write_txn()?; - self.index_mapper.create_index(&mut wtxn, name) + let index = self.index_mapper.create_index(&mut wtxn, name)?; + wtxn.commit()?; + + Ok(index) } pub fn create_update_file(&self) -> Result<(Uuid, file_store::File)> {