diff options
author | Geir Storli <geirstorli@yahoo.no> | 2018-04-25 09:56:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 09:56:51 +0200 |
commit | adbaf4eb578f9efc7ff04b68aac5c9162b4a9d4c (patch) | |
tree | a1dfe16aa93d564561ca7a34f5b098064febb53c | |
parent | 91050e8bf466ebf558fd368df8bd71ced8fa7272 (diff) | |
parent | 1c6dd57f2bb6ecb322186870c516a469765cffaa (diff) |
Merge pull request #5689 from vespa-engine/toregge/consolidate-getcommitteddocidlimit
Make getCommittedDocIdLimit() method virtual.
6 files changed, 7 insertions, 8 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h index 79795d94170..c7993503107 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h +++ b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h @@ -371,7 +371,7 @@ public: * * @return committed docid limit for the attribute. */ - virtual uint32_t getCommittedDocIdLimitSlow() const = 0; + virtual uint32_t getCommittedDocIdLimit() const = 0; /* * Returns whether the current attribute vector is an imported attribute diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp index e92c7e38114..5261eb0bb05 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp @@ -340,9 +340,9 @@ AttributeVector::getIsFastSearch() const { } uint32_t -AttributeVector::getCommittedDocIdLimitSlow() const +AttributeVector::getCommittedDocIdLimit() const { - return getCommittedDocIdLimit(); + return _committedDocIdLimit; } bool diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h index 9d69bf587ed..470e612770d 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.h +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h @@ -417,7 +417,6 @@ public: // Implements IAttributeVector uint32_t getNumDocs() const override; - uint32_t getCommittedDocIdLimit() const { return _committedDocIdLimit; } uint32_t & getCommittedDocIdLimitRef() { return _committedDocIdLimit; } void setCommittedDocIdLimit(uint32_t committedDocIdLimit) { _committedDocIdLimit = committedDocIdLimit; @@ -433,7 +432,7 @@ public: virtual CollectionType::Type getCollectionType() const override; virtual bool getIsFilter() const override; virtual bool getIsFastSearch() const override; - virtual uint32_t getCommittedDocIdLimitSlow() const override; + virtual uint32_t getCommittedDocIdLimit() const override; virtual bool isImported() const override; /** diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.cpp b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.cpp index a0b23833581..05bc4c7c275 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.cpp +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.cpp @@ -140,7 +140,7 @@ bool ImportedAttributeVectorReadGuard::getIsFastSearch() const { return _target_attribute.getIsFastSearch(); } -uint32_t ImportedAttributeVectorReadGuard::getCommittedDocIdLimitSlow() const { +uint32_t ImportedAttributeVectorReadGuard::getCommittedDocIdLimit() const { return _reference_attribute.getCommittedDocIdLimit(); } diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h index 128778934d3..07ea472cab0 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h @@ -78,7 +78,7 @@ public: virtual bool hasEnum() const override; virtual bool getIsFilter() const override; virtual bool getIsFastSearch() const override; - virtual uint32_t getCommittedDocIdLimitSlow() const override; + virtual uint32_t getCommittedDocIdLimit() const override; virtual bool isImported() const override; protected: diff --git a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp index 3c4029627df..6a78a87e20b 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp @@ -195,7 +195,7 @@ public: void ImportedSearchContext::makeMergedPostings(bool isFilter) { - uint32_t committedTargetDocIdLimit = _target_attribute.getCommittedDocIdLimitSlow(); + uint32_t committedTargetDocIdLimit = _target_attribute.getCommittedDocIdLimit(); std::atomic_thread_fence(std::memory_order_acquire); const auto &reverseMapping = _reference_attribute.getReverseMapping(); if (isFilter) { |