From 337aee5b654befc4b87dd928bc352e796e62f491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 28 Jan 2019 16:11:55 +0100 Subject: [PATCH] chore: Emit warnings when a document id is reused --- src/database/update/raw_builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/database/update/raw_builder.rs b/src/database/update/raw_builder.rs index 323f55eb5..b9ed2c347 100644 --- a/src/database/update/raw_builder.rs +++ b/src/database/update/raw_builder.rs @@ -6,6 +6,7 @@ use rocksdb::rocksdb_options; use hashbrown::HashMap; use fst::map::Map; use sdset::Set; +use log::warn; use crate::database::index::{Index, Positive, PositiveBuilder, Negative}; use crate::database::{DATA_INDEX, DocumentKeyAttr}; @@ -67,6 +68,7 @@ impl RawUpdateBuilder { pub fn document_update(&mut self, document_id: DocumentId) -> &mut DocumentUpdate { match self.document_updates.entry(document_id) { Entry::Occupied(mut occupied) => { + warn!("Already updated document {:?}, clearing it", document_id); occupied.get_mut().clear(); occupied.into_mut() },