summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-23 19:29:47 +0200
committerGitHub <noreply@github.com>2022-05-23 19:29:47 +0200
commit534d4e3a7accca6df96b19c0577c2119a8b2dff3 (patch)
treefda39553e75d771f7cde5bceb58f3ca0e8f5472f
parent5c207a26d301c044bfcf756a5adc17fb2c55ae79 (diff)
parente7527aae21d3d336f04a261d8828c47cebc59c94 (diff)
Merge pull request #22716 from vespa-engine/balder/let-whitelist-blueprint-be-less-conservative
Count number of bits to create a better estimate of number of hits it…
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 57f8be576db..84fe39c56b6 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
@@ -198,7 +198,8 @@ public:
_activeLids(activeLids),
_matchDataVector()
{
- setEstimate(HitEstimate(_activeLids.size(), false));
+ size_t numHits = _activeLids.countTrueBits();
+ setEstimate(HitEstimate(numHits, (numHits == 0)));
}
bool isWhiteList() const override { return true; }