Start testing unexpected errors and panics in index scheduler

This commit is contained in:
Loïc Lecrenier 2022-10-20 17:11:44 +02:00 committed by Tamo
parent 6d9140115f
commit dd7d758a6f
12 changed files with 617 additions and 94 deletions

View file

@ -114,7 +114,19 @@ impl IndexScheduler {
}
pub(crate) fn get_status(&self, rtxn: &RoTxn, status: Status) -> Result<RoaringBitmap> {
Ok(self.status.get(rtxn, &status)?.unwrap_or_default())
match status {
Status::Processing => {
let tasks = self
.processing_tasks
.read()
.map_err(|_| Error::CorruptedTaskQueue)?
.processing
.clone();
Ok(tasks)
}
status => Ok(self.status.get(rtxn, &status)?.unwrap_or_default()),
}
}
pub(crate) fn put_status(