Improve the panic message when deleting an unknown entry

This commit is contained in:
Kerollmops 2025-01-13 10:30:53 +01:00
parent dcb4c49cf2
commit d0bc8c755a
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -4,6 +4,7 @@ use std::sync::{OnceLock, RwLock};
use std::thread::{self, Builder};
use big_s::S;
use bstr::ByteSlice as _;
use bumparaw_collections::RawMap;
use document_changes::{extract, DocumentChanges, IndexingContext};
pub use document_deletion::DocumentDeletion;
@ -583,7 +584,10 @@ fn write_from_bbqueue(
}
(key, None) => match database.delete(wtxn, key) {
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(_) => (),
Err(error) => {