mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Improve the panic message when deleting an unknown entry
This commit is contained in:
parent
72ded27e98
commit
63c8cbae5b
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
|
|
||||||
|
use bstr::ByteSlice as _;
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use heed::RwTxn;
|
use heed::RwTxn;
|
||||||
use rand::SeedableRng as _;
|
use rand::SeedableRng as _;
|
||||||
|
@ -152,7 +153,10 @@ pub fn write_from_bbqueue(
|
||||||
}
|
}
|
||||||
(key, None) => match database.delete(wtxn, key) {
|
(key, None) => match database.delete(wtxn, key) {
|
||||||
Ok(false) => {
|
Ok(false) => {
|
||||||
unreachable!("We tried to delete an unknown key: {key:?}")
|
unreachable!(
|
||||||
|
"We tried to delete an unknown key from {database_name}: {:?}",
|
||||||
|
key.as_bstr()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue