diff options
20 files changed, 30 insertions, 30 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp index c62226ad363..f25446d918f 100644 --- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp +++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp @@ -1802,7 +1802,7 @@ TEST(DocumentMetaStoreTest, shrink_via_flush_target_works) ft->getApproxMemoryGain().getAfter()); g.reset(); - dms->removeAllOldGenerations(); + dms->reclaim_unused_memory(); assertLidSpace(10, shrinkTarget, shrinkTarget - 1, true, true, *dms); EXPECT_TRUE(ft->getApproxMemoryGain().getBefore() > ft->getApproxMemoryGain().getAfter()); @@ -2008,7 +2008,7 @@ namespace { void try_compact_document_meta_store(DocumentMetaStore &dms) { - dms.removeAllOldGenerations(); + dms.reclaim_unused_memory(); dms.commit(true); } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index 69ef42ef9a8..418615058ce 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -239,7 +239,7 @@ applyReplayDone(uint32_t docIdLimit, AttributeVector &attr) void applyHeartBeat(SerialNum serialNum, AttributeVector &attr) { - attr.removeAllOldGenerations(); + attr.reclaim_unused_memory(); if (attr.getStatus().getLastSyncToken() <= serialNum) { attr.commit(search::CommitParam(serialNum)); } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp index 93663637e75..9a5e358a6f3 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp @@ -207,7 +207,7 @@ IFlushTarget::Task::UP FlushableAttribute::internalInitFlush(SerialNum currentSerial) { // Called by attribute field writer thread while document db executor waits - _attr->removeAllOldGenerations(); + _attr->reclaim_unused_memory(); SerialNum syncToken = std::max(currentSerial, _attr->getStatus().getLastSyncToken()); auto writer = _attrDir->tryGetWriter(); if (!writer) { diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_adapter.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_adapter.h index 843a9eaaeaa..a4f744df6f9 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_adapter.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_adapter.h @@ -24,7 +24,7 @@ public: DocId getCommittedDocIdLimit() const override { return doGetCommittedDocIdLimit(); } - void removeAllOldGenerations() override { + void reclaim_unused_memory() override { doRemoveAllOldGenerations(); } uint64_t getCurrentGeneration() const override { diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h index 2dc85f07cf4..401b210f6e0 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h @@ -51,7 +51,7 @@ public: // the ones with the same signature in proton::IDocumentMetaStore. using DocumentMetaStoreAttribute::commit; using DocumentMetaStoreAttribute::getCommittedDocIdLimit; - using DocumentMetaStoreAttribute::removeAllOldGenerations; + using DocumentMetaStoreAttribute::reclaim_unused_memory; using DocumentMetaStoreAttribute::getCurrentGeneration; private: @@ -122,7 +122,7 @@ private: return getCommittedDocIdLimit(); } void doRemoveAllOldGenerations() override { - removeAllOldGenerations(); + reclaim_unused_memory(); } uint64_t doGetCurrentGeneration() const override { return getCurrentGeneration(); diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp index 7786ead49b2..609ee585a6c 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp @@ -203,7 +203,7 @@ IFlushTarget::Task::UP DocumentMetaStoreFlushTarget::initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken>) { // Called by document db executor - _dms->removeAllOldGenerations(); + _dms->reclaim_unused_memory(); SerialNum syncToken = std::max(currentSerial, _dms->getStatus().getLastSyncToken()); auto writer = _dmsDir->tryGetWriter(); if (!writer) { diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h index a03b6325797..942d3e21da5 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store.h @@ -68,7 +68,7 @@ struct IDocumentMetaStore : public search::IDocumentMetaStore, // Functions that are also defined search::AttributeVector virtual void commit(const CommitParam & param) = 0; - virtual void removeAllOldGenerations() = 0; + virtual void reclaim_unused_memory() = 0; virtual bool canShrinkLidSpace() const = 0; virtual SerialNum getLastSerialNum() const = 0; diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp index a9850b5c2b7..533b270c20a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp @@ -763,7 +763,7 @@ void StoreOnlyFeedView::heartBeat(SerialNum serialNum, DoneCallback onDone) { assert(_writeService.master().isCurrentThread()); - _metaStore.removeAllOldGenerations(); + _metaStore.reclaim_unused_memory(); _metaStore.commit(CommitParam(serialNum)); heartBeatSummary(serialNum, onDone); heartBeatIndexedFields(serialNum, onDone); diff --git a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h index 60682ae90e5..4092f548016 100644 --- a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h +++ b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h @@ -162,8 +162,8 @@ struct DocumentMetaStoreObserver : public IDocumentMetaStore DocId getCommittedDocIdLimit() const override { return _store.getCommittedDocIdLimit(); } - void removeAllOldGenerations() override { - _store.removeAllOldGenerations(); + void reclaim_unused_memory() override { + _store.reclaim_unused_memory(); } bool canShrinkLidSpace() const override { return _store.canShrinkLidSpace(); diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp index 100470b5a5f..7f8f3f92f9e 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp @@ -187,7 +187,7 @@ AttributeVector::incGeneration() before_inc_generation(_genHandler.getCurrentGeneration()); _genHandler.incGeneration(); // Remove old data on hold lists that can no longer be reached by readers - removeAllOldGenerations(); + reclaim_unused_memory(); } void @@ -408,7 +408,7 @@ bool AttributeVector::applyWeight(DocId, const FieldValue &, const ArithmeticVal bool AttributeVector::applyWeight(DocId, const FieldValue&, const AssignValueUpdate&) { return false; } void -AttributeVector::removeAllOldGenerations() { +AttributeVector::reclaim_unused_memory() { _genHandler.update_oldest_used_generation(); reclaim_memory(_genHandler.get_oldest_used_generation()); } @@ -493,7 +493,7 @@ void AttributeVector::shrinkLidSpace() { commit(); - removeAllOldGenerations(); + reclaim_unused_memory(); if (!canShrinkLidSpace()) { return; } @@ -715,7 +715,7 @@ AttributeVector::drain_hold(uint64_t hold_limit) { incGeneration(); for (int retry = 0; retry < 40; ++retry) { - removeAllOldGenerations(); + reclaim_unused_memory(); updateStat(true); if (_status.getOnHold() <= hold_limit) { return; diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h index 6963814be0c..261290247ad 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.h +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h @@ -156,7 +156,7 @@ protected: public: void incGeneration(); - void removeAllOldGenerations(); + void reclaim_unused_memory(); generation_t get_oldest_used_generation() const { return _genHandler.get_oldest_used_generation(); diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp index 4dad82073e0..e4e451ffcda 100644 --- a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp @@ -147,7 +147,7 @@ MultiValueEnumAttribute<B, M>::onCommit() updater.commit(); this->freezeEnumDictionary(); std::atomic_thread_fence(std::memory_order_release); - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); if (this->_mvMapping.considerCompact(this->getConfig().getCompactionStrategy())) { this->incGeneration(); this->updateStat(true); diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp index b746fa5d555..6dde909821e 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp @@ -63,7 +63,7 @@ MultiValueNumericAttribute<B, M>::onCommit() } std::atomic_thread_fence(std::memory_order_release); - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); this->_changes.clear(); if (this->_mvMapping.considerCompact(this->getConfig().getCompactionStrategy())) { diff --git a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp index 2066b6fa845..2456c57140c 100644 --- a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp @@ -245,7 +245,7 @@ MultiValueAttribute<B, M>::addDoc(DocId & doc) if (incGen) { this->incGeneration(); } else - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); return true; } diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp index e620d3aca72..fcee60ddac5 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp @@ -87,7 +87,7 @@ ReferenceAttribute::addDoc(DocId &doc) if (incGen) { incGeneration(); } else { - removeAllOldGenerations(); + reclaim_unused_memory(); } return true; } diff --git a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp index ac05ab3b7c6..15fc819300c 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp @@ -53,7 +53,7 @@ SingleBoolAttribute::addDoc(DocId & doc) { incNumDocs(); doc = getNumDocs() - 1; updateUncommittedDocIdLimit(doc); - removeAllOldGenerations(); + reclaim_unused_memory(); return true; } @@ -80,7 +80,7 @@ SingleBoolAttribute::onCommit() { } std::atomic_thread_fence(std::memory_order_release); - removeAllOldGenerations(); + reclaim_unused_memory(); _changes.clear(); } diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp index dd400295b3d..52e2d914af1 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp @@ -66,7 +66,7 @@ SingleValueEnumAttribute<B>::addDoc(DocId & doc) if (incGen) { this->incGeneration(); } else - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); return true; } @@ -95,7 +95,7 @@ SingleValueEnumAttribute<B>::onCommit() updater.commit(); freezeEnumDictionary(); std::atomic_thread_fence(std::memory_order_release); - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); auto remapper = this->_enumStore.consider_compact_values(this->getConfig().getCompactionStrategy()); if (remapper) { remap_enum_store_refs(*remapper, *this); diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp index 66af5fe4adc..a105d980986 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp @@ -55,7 +55,7 @@ SingleValueNumericAttribute<B>::onCommit() } } - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); this->_changes.clear(); } @@ -89,7 +89,7 @@ SingleValueNumericAttribute<B>::addDoc(DocId & doc) { if (incGen) { this->incGeneration(); } else - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); return true; } diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp index b2662a0928d..13bf2f932e8 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp @@ -67,7 +67,7 @@ SingleValueSmallNumericAttribute::onCommit() } std::atomic_thread_fence(std::memory_order_release); - removeAllOldGenerations(); + reclaim_unused_memory(); _changes.clear(); } @@ -84,7 +84,7 @@ SingleValueSmallNumericAttribute::addDoc(DocId & doc) { if (incGen) { this->incGeneration(); } else - this->removeAllOldGenerations(); + this->reclaim_unused_memory(); } else { B::incNumDocs(); doc = B::getNumDocs() - 1; diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp index 6130da6fcf9..f29751cdabe 100644 --- a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp @@ -134,7 +134,7 @@ TensorAttribute::addDoc(DocId &docId) if (incGen) { incGeneration(); } else { - removeAllOldGenerations(); + reclaim_unused_memory(); } return true; } |