aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-06-02 17:37:25 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-06-02 17:37:25 +0000
commit6e95ebbf56301af499a88bde7a8ca5fb8393f7b0 (patch)
tree33b3c9ec6985630800e12225dc302b8bbd63f35a /searchcore
parent0deaf3f37e723ac8d8a01f9ac5c9fa778b078841 (diff)
Use the docid limit in the base class.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp15
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h5
3 files changed, 9 insertions, 13 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index 6016d60b880..ea71cafb73a 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -788,7 +788,7 @@ DocumentMetaStore::getLidUsageStats() const
Blueprint::UP
DocumentMetaStore::createWhiteListBlueprint() const
{
- return _lidAlloc.createWhiteListBlueprint(getCommittedDocIdLimit());
+ return _lidAlloc.createWhiteListBlueprint();
}
AttributeVector::SearchContext::UP
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 5fe4fab3fd9..31361e40c68 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
@@ -196,17 +196,15 @@ class WhiteListBlueprint : public SimpleLeafBlueprint, public WhiteListProvider
{
private:
const search::GrowableBitVector &_activeLids;
- const uint32_t _docIdLimit;
mutable std::mutex _lock;
mutable std::vector<search::fef::TermFieldMatchData *> _matchDataVector;
search::BitVector::UP get_white_list_filter() const override {
- return search::BitVector::create(_activeLids, 0, _docIdLimit);
+ return search::BitVector::create(_activeLids, 0, get_docid_limit());
}
SearchIterator::UP
- createLeafSearch(const TermFieldMatchDataArray &tfmda,
- bool strict) const override
+ createLeafSearch(const TermFieldMatchDataArray &tfmda, bool strict) const override
{
assert(tfmda.size() == 0);
(void) tfmda;
@@ -219,14 +217,13 @@ private:
std::lock_guard<std::mutex> lock(_lock);
_matchDataVector.push_back(tfmd);
}
- return search::BitVectorIterator::create(&_activeLids, _docIdLimit, *tfmd, strict);
+ return search::BitVectorIterator::create(&_activeLids, get_docid_limit(), *tfmd, strict);
}
public:
- WhiteListBlueprint(const search::GrowableBitVector &activeLids, uint32_t docIdLimit)
+ WhiteListBlueprint(const search::GrowableBitVector &activeLids)
: SimpleLeafBlueprint(FieldSpecBaseList()),
_activeLids(activeLids),
- _docIdLimit(docIdLimit),
_matchDataVector()
{
setEstimate(HitEstimate(_activeLids.size(), false));
@@ -244,9 +241,9 @@ public:
}
Blueprint::UP
-LidAllocator::createWhiteListBlueprint(uint32_t docIdLimit) const
+LidAllocator::createWhiteListBlueprint() const
{
- return std::make_unique<WhiteListBlueprint>(_activeLids.getBitVector(), docIdLimit);
+ return std::make_unique<WhiteListBlueprint>(_activeLids.getBitVector());
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h
index ad41c6a8224..ccf9ef4513e 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h
@@ -35,8 +35,7 @@ public:
DocId getFreeLid(DocId lidLimit);
DocId peekFreeLid(DocId lidLimit);
- void ensureSpace(uint32_t newSize,
- uint32_t newCapacity);
+ void ensureSpace(uint32_t newSize, uint32_t newCapacity);
void registerLid(DocId lid) { _usedLids.setBit(lid); }
void unregisterLid(DocId lid);
size_t getUsedLidsSize() const;
@@ -48,7 +47,7 @@ public:
generation_t currentGeneration);
bool holdLidOK(DocId lid, DocId lidLimit) const;
void constructFreeList(DocId lidLimit);
- search::queryeval::Blueprint::UP createWhiteListBlueprint(uint32_t docIdLimit) const;
+ search::queryeval::Blueprint::UP createWhiteListBlueprint() const;
void updateActiveLids(DocId lid, bool active);
void clearDocs(DocId lidLow, DocId lidLimit);
void shrinkLidSpace(DocId committedDocIdLimit);