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
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
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");
}
}
}