From 4c7d852d6f7ed736a131ad29e41f8f97cf22275b Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Fri, 3 Jan 2025 20:15:11 +0000 Subject: [PATCH] estimate should include docid 0 for consistency --- .../searchcore/proton/documentmetastore/lid_allocator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp index aa59fb810dd..72ada251c43 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp @@ -228,7 +228,8 @@ class WhiteListBlueprint : public SimpleLeafBlueprint _lock(), _matchDataVector() { - setEstimate(HitEstimate(numActiveLids, false)); + // account for DocId 0 (considered active for estimation purposes) + setEstimate(HitEstimate(numActiveLids + 1, false)); } bool isWhiteList() const noexcept final { return true; }