Implement the IndexDeletion batch operation

This commit is contained in:
Kerollmops
2022-10-04 18:19:18 +02:00
committed by Clément Renault
parent da363a92ac
commit 2fbdd104b8
2 changed files with 84 additions and 14 deletions

View File

@ -440,7 +440,13 @@ impl IndexScheduler {
Ok(vec![task])
}
Batch::IndexDeletion { index_uid, tasks } => todo!(),
Batch::IndexDeletion { index_uid, tasks } => {
let wtxn = self.env.write_txn()?;
// The write transaction is directly owned and commited here.
let index = self.index_mapper.delete_index(wtxn, &index_uid)?;
todo!("update the tasks and mark them as succeeded");
}
}
}