From 59ca4b9fe496c1cb83cdfa74ca63bebb41a7e8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 19 Nov 2020 11:18:52 +0100 Subject: [PATCH] Introduce a little bit of debug when deleting documents --- src/update/index_documents/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/update/index_documents/mod.rs b/src/update/index_documents/mod.rs index 50f5336fc..d48696e94 100644 --- a/src/update/index_documents/mod.rs +++ b/src/update/index_documents/mod.rs @@ -158,7 +158,7 @@ pub fn write_into_lmdb_database( match iter.next().transpose()? { Some((key, old_val)) if key == k => { let vals = vec![Cow::Borrowed(old_val), Cow::Borrowed(v)]; - let val = merge(k, &vals).expect("merge failed"); + let val = merge(k, &vals)?; iter.put_current(k, &val)?; }, _ => { @@ -313,8 +313,10 @@ impl<'t, 'u, 'i, 'a> IndexDocuments<'t, 'u, 'i, 'a> { thread_pool: self.thread_pool, }; let mut deletion_builder = update_builder.delete_documents(self.wtxn, self.index)?; + debug!("documents to delete {:?}", replaced_documents_ids); deletion_builder.delete_documents(&replaced_documents_ids); - let _deleted_documents_count = deletion_builder.execute()?; + let deleted_documents_count = deletion_builder.execute()?; + debug!("{} documents actually deleted", deleted_documents_count); } let mmap;