fix most of the index module

This commit is contained in:
Tamo 2022-09-07 20:30:33 +02:00 committed by Clément Renault
parent d8b8e04ad1
commit a7aa92df5f
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
7 changed files with 45 additions and 19 deletions

View file

@ -240,7 +240,7 @@ impl IndexScheduler {
new_name,
} => {
if self.available_index.get(wtxn, &new_name)?.unwrap_or(false) {
return Err(Error::IndexAlreadyExists);
return Err(Error::IndexAlreadyExists(new_name.to_string()));
}
todo!("wait for @guigui insight");
}
@ -275,7 +275,10 @@ impl IndexScheduler {
return Err(Error::IndexNotFound(rhs.to_string()));
}
let index_map = self.index_map.write()?;
let index_map = self
.index_map
.write()
.map_err(|_| Error::CorruptedTaskQueue)?;
// index_map.remove.
}