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 Clément Renault
parent e3848b5f28
commit 4de445d386
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
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(