From 3ff88a9541caf42e79a4045d43b21d739673b33c Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sun, 7 Oct 2018 09:07:51 +0200 Subject: [PATCH] suppress query time updated map spurious error message --- src/rcldb/rcldb.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index 283b11d1..5ef28a2f 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -1989,11 +1989,15 @@ void Db::setExistingFlags(const string& udi, unsigned int docid) void Db::i_setExistingFlags(const string& udi, unsigned int docid) { - // Set the up to date flag for the document and its subdocs + // Set the up to date flag for the document and its + // subdocs. needUpdate() can also be called at query time (for + // preview up to date check), so no error if the updated bitmap is + // of size 0 if (docid >= updated.size()) { - LOGERR("needUpdate: existing docid beyond updated.size(). Udi [" << - udi << "], docid " << docid << ", updated.size() " << - updated.size() << "\n"); + if (updated.size()) + LOGERR("needUpdate: existing docid beyond updated.size(). Udi [" << + udi << "], docid " << docid << ", updated.size() " << + updated.size() << "\n"); return; } else { updated[docid] = true;