summaryrefslogtreecommitdiffstats
path: root/searchlib/src
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-10-12 11:40:03 +0000
committerGeir Storli <geirst@yahooinc.com>2022-10-12 13:36:56 +0000
commit06f895593abd5bf49ba181e697bf3a1c68fb870a (patch)
tree8e0e49eb637f299496ad521dced8ec1246ef96fc /searchlib/src
parenta8d556bec71a3e207625420a74ad7109ab60100f (diff)
Rename transferHoldLists() -> assign_generation().
Diffstat (limited to 'searchlib/src')
-rw-r--r--searchlib/src/tests/attribute/document_weight_or_filter_search/document_weight_or_filter_search_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/enumstore/enumstore_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/posting_store/posting_store_test.cpp4
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp12
-rw-r--r--searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp2
-rw-r--r--searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp2
-rw-r--r--searchlib/src/tests/tensor/hnsw_index/stress_hnsw_mt.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/feature_store.h2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/field_index.h10
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_index.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_index.h2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.h2
-rw-r--r--searchlib/src/vespa/searchlib/predicate/simple_index.hpp8
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.h2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/nearest_neighbor_index.h2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_store.h4
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h2
39 files changed, 71 insertions, 71 deletions
diff --git a/searchlib/src/tests/attribute/document_weight_or_filter_search/document_weight_or_filter_search_test.cpp b/searchlib/src/tests/attribute/document_weight_or_filter_search/document_weight_or_filter_search_test.cpp
index 0635b86121a..fded2295ef6 100644
--- a/searchlib/src/tests/attribute/document_weight_or_filter_search/document_weight_or_filter_search_test.cpp
+++ b/searchlib/src/tests/attribute/document_weight_or_filter_search/document_weight_or_filter_search_test.cpp
@@ -143,7 +143,7 @@ void
DocumentWeightOrFilterSearchTest::inc_generation()
{
_postings.freeze();
- _postings.transferHoldLists(_gens.getCurrentGeneration());
+ _postings.assign_generation(_gens.getCurrentGeneration());
_gens.incGeneration();
_gens.update_oldest_used_generation();
_postings.trimHoldLists(_gens.get_oldest_used_generation());
diff --git a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
index b957c31c7dc..64730871d9d 100644
--- a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
+++ b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
@@ -147,7 +147,7 @@ TEST("requireThatComparatorWithTreeIsWorking")
EXPECT_EQUAL(101, exp);
t.clear(m);
m.freeze();
- m.transferHoldLists(g.getCurrentGeneration());
+ m.assign_generation(g.getCurrentGeneration());
g.incGeneration();
m.trimHoldLists(g.get_oldest_used_generation());
}
diff --git a/searchlib/src/tests/attribute/enumstore/enumstore_test.cpp b/searchlib/src/tests/attribute/enumstore/enumstore_test.cpp
index 02ff01043b0..8a9e053a612 100644
--- a/searchlib/src/tests/attribute/enumstore/enumstore_test.cpp
+++ b/searchlib/src/tests/attribute/enumstore/enumstore_test.cpp
@@ -345,7 +345,7 @@ TEST(EnumStoreTest, test_hold_lists_and_generation)
// check readers again
checkReaders(ses, readers);
- ses.transfer_hold_lists(sesGen);
+ ses.assign_generation(sesGen);
ses.trim_hold_lists(sesGen + 1);
}
@@ -357,7 +357,7 @@ dec_ref_count(NumericEnumStore& store, NumericEnumStore::Index idx)
updater.commit();
generation_t gen = 5;
- store.transfer_hold_lists(gen);
+ store.assign_generation(gen);
store.trim_hold_lists(gen + 1);
}
@@ -882,7 +882,7 @@ namespace {
void inc_generation(generation_t &gen, NumericEnumStore &store)
{
store.freeze_dictionary();
- store.transfer_hold_lists(gen);
+ store.assign_generation(gen);
++gen;
store.trim_hold_lists(gen);
}
diff --git a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
index 735ebcff6cf..19dd94c5f3c 100644
--- a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
+++ b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
@@ -45,7 +45,7 @@ class MyAttribute : public search::NotImplementedAttribute
_mvMapping.trimHoldLists(firstUsed);
}
virtual void onGenerationChange(generation_t generation) override {
- _mvMapping.transferHoldLists(generation - 1);
+ _mvMapping.assign_generation(generation - 1);
}
public:
@@ -115,7 +115,7 @@ public:
ConstArrayRef act = get(docId);
EXPECT_EQ(exp, std::vector<EntryT>(act.cbegin(), act.cend()));
}
- void transferHoldLists(generation_t generation) { _mvMapping->transferHoldLists(generation); }
+ void assign_generation(generation_t current_gen) { _mvMapping->assign_generation(current_gen); }
void trimHoldLists(generation_t firstUsed) { _mvMapping->trimHoldLists(firstUsed); }
void addDocs(uint32_t numDocs) {
for (uint32_t i = 0; i < numDocs; ++i) {
@@ -245,7 +245,7 @@ TEST_F(IntMappingTest, test_that_old_value_is_not_overwritten_while_held)
auto old3 = get(3);
assertArray({5}, old3);
set(3, {7});
- transferHoldLists(10);
+ assign_generation(10);
assertArray({5}, old3);
assertGet(3, {7});
trimHoldLists(10);
diff --git a/searchlib/src/tests/attribute/posting_store/posting_store_test.cpp b/searchlib/src/tests/attribute/posting_store/posting_store_test.cpp
index a2d04488003..5b07c0120bf 100644
--- a/searchlib/src/tests/attribute/posting_store/posting_store_test.cpp
+++ b/searchlib/src/tests/attribute/posting_store/posting_store_test.cpp
@@ -64,8 +64,8 @@ protected:
{
_value_store.freeze_dictionary();
_store.freeze();
- _value_store.transfer_hold_lists(_gen_handler.getCurrentGeneration());
- _store.transferHoldLists(_gen_handler.getCurrentGeneration());
+ _value_store.assign_generation(_gen_handler.getCurrentGeneration());
+ _store.assign_generation(_gen_handler.getCurrentGeneration());
_gen_handler.incGeneration();
_value_store.trim_hold_lists(_gen_handler.get_oldest_used_generation());
_store.trimHoldLists(_gen_handler.get_oldest_used_generation());
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index 9e3ea72045f..0c0187eb8de 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -259,9 +259,9 @@ AttributePostingListTest::freeTree(bool verbose)
static_cast<uint64_t>(_intNodeAlloc->getMemoryUsage().allocatedBytesOnHold()));
_intNodeAlloc->freeze();
_intPostings->freeze();
- _intNodeAlloc->transferHoldLists(_handler.getCurrentGeneration());
+ _intNodeAlloc->assign_generation(_handler.getCurrentGeneration());
_intPostings->clearBuilder();
- _intPostings->transferHoldLists(_handler.getCurrentGeneration());
+ _intPostings->assign_generation(_handler.getCurrentGeneration());
_handler.incGeneration();
_intNodeAlloc->trimHoldLists(_handler.get_oldest_used_generation());
_intPostings->trimHoldLists(_handler.get_oldest_used_generation());
@@ -613,7 +613,7 @@ AttributePostingListTest::doCompactEnumStore(Tree &tree,
valueHandle.holdBuffer(*it);
}
generation_t generation = _handler.getCurrentGeneration();
- valueHandle.transferHoldLists(generation);
+ valueHandle.assign_generation(generation);
_handler.incGeneration();
valueHandle.trimHoldLists(_handler.get_oldest_used_generation());
@@ -658,8 +658,8 @@ bumpGeneration(Tree &tree,
(void) tree;
(void) valueHandle;
postingsAlloc.freeze();
- postingsAlloc.transferHoldLists(_handler.getCurrentGeneration());
- postings.transferHoldLists(_handler.getCurrentGeneration());
+ postingsAlloc.assign_generation(_handler.getCurrentGeneration());
+ postings.assign_generation(_handler.getCurrentGeneration());
_handler.incGeneration();
}
@@ -689,7 +689,7 @@ AttributePostingListTest::Main()
lookupRandomValues(*_intTree, *_intNodeAlloc, *_intKeyStore, *_intPostings,
_stlTree, _randomValues);
_intNodeAlloc->freeze();
- _intNodeAlloc->transferHoldLists(_handler.getCurrentGeneration());
+ _intNodeAlloc->assign_generation(_handler.getCurrentGeneration());
doCompactEnumStore(*_intTree, *_intNodeAlloc, *_intKeyStore);
removeRandomValues(*_intTree, *_intNodeAlloc, *_intKeyStore, *_intPostings,
_stlTree, _randomValues);
diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
index 222a3341ef9..5c6d9d42cf2 100644
--- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
+++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
@@ -221,7 +221,7 @@ public:
auto vector = _vectors.get_vector(docid).typify<double>();
_removes.emplace_back(docid, DoubleVector(vector.begin(), vector.end()));
}
- void transfer_hold_lists(generation_t current_gen) override {
+ void assign_generation(generation_t current_gen) override {
_transfer_gen = current_gen;
}
void trim_hold_lists(generation_t first_used_gen) override {
diff --git a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
index 1ebef22bab7..9526b65846d 100644
--- a/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
+++ b/searchlib/src/tests/tensor/hnsw_index/hnsw_index_test.cpp
@@ -99,7 +99,7 @@ public:
commit();
}
void commit() {
- index->transfer_hold_lists(gen_handler.getCurrentGeneration());
+ index->assign_generation(gen_handler.getCurrentGeneration());
gen_handler.incGeneration();
gen_handler.update_oldest_used_generation();
index->trim_hold_lists(gen_handler.get_oldest_used_generation());
diff --git a/searchlib/src/tests/tensor/hnsw_index/stress_hnsw_mt.cpp b/searchlib/src/tests/tensor/hnsw_index/stress_hnsw_mt.cpp
index 69a454e92cb..428e6654039 100644
--- a/searchlib/src/tests/tensor/hnsw_index/stress_hnsw_mt.cpp
+++ b/searchlib/src/tests/tensor/hnsw_index/stress_hnsw_mt.cpp
@@ -267,7 +267,7 @@ public:
ASSERT_EQ(r.get(), nullptr);
}
void commit(uint32_t docid) {
- index->transfer_hold_lists(gen_handler.getCurrentGeneration());
+ index->assign_generation(gen_handler.getCurrentGeneration());
gen_handler.incGeneration();
gen_handler.update_oldest_used_generation();
index->trim_hold_lists(gen_handler.get_oldest_used_generation());
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.h b/searchlib/src/vespa/searchlib/attribute/enumstore.h
index 52f42ed368e..53044fa5511 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.h
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.h
@@ -96,7 +96,7 @@ public:
vespalib::AddressSpace get_values_address_space_usage() const override;
- void transfer_hold_lists(generation_t generation);
+ void assign_generation(generation_t current_gen);
void trim_hold_lists(generation_t first_used);
ssize_t load_unique_values(const void* src, size_t available, IndexVector& idx) override;
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
index 1ef194f6812..ef87c55f4cc 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
@@ -104,9 +104,9 @@ EnumStoreT<EntryT>::get_values_address_space_usage() const
template <typename EntryT>
void
-EnumStoreT<EntryT>::transfer_hold_lists(generation_t generation)
+EnumStoreT<EntryT>::assign_generation(generation_t current_gen)
{
- _store.transferHoldLists(generation);
+ _store.assign_generation(current_gen);
}
template <typename EntryT>
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
index 61798959f3e..2468a58211c 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
@@ -48,7 +48,7 @@ public:
*/
ReadView make_read_view(size_t read_size) const { return ReadView(_indices.make_read_view(read_size), &_store); }
// Pass on hold list management to underlying store
- void transferHoldLists(generation_t generation) { _store.transferHoldLists(generation); }
+ void assign_generation(generation_t current_gen) { _store.assign_generation(current_gen); }
void trimHoldLists(generation_t firstUsed) { _store.trimHoldLists(firstUsed); }
void prepareLoadFromMultiValue() { _store.setInitializing(true); }
diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
index ec948882312..6b0f4290d69 100644
--- a/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multienumattribute.hpp
@@ -211,8 +211,8 @@ MultiValueEnumAttribute<B, M>::onGenerationChange(generation_t generation)
* sufficiently new frozen tree.
*/
freezeEnumDictionary();
- this->_mvMapping.transferHoldLists(generation - 1);
- this->_enumStore.transfer_hold_lists(generation - 1);
+ this->_mvMapping.assign_generation(generation - 1);
+ this->_enumStore.assign_generation(generation - 1);
}
template <typename B, typename M>
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
index 8cabd8483bf..c98a236e6d7 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
@@ -105,7 +105,7 @@ void MultiValueNumericAttribute<B, M>::removeOldGenerations(generation_t firstUs
template <typename B, typename M>
void MultiValueNumericAttribute<B, M>::onGenerationChange(generation_t generation)
{
- this->_mvMapping.transferHoldLists(generation - 1);
+ this->_mvMapping.assign_generation(generation - 1);
}
template <typename B, typename M>
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
index 9a8c9738bc0..41dbc0aff40 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.hpp
@@ -68,7 +68,7 @@ MultiValueNumericPostingAttribute<B, M>::onGenerationChange(generation_t generat
{
_postingList.freeze();
MultiValueNumericEnumAttribute<B, M>::onGenerationChange(generation);
- _postingList.transferHoldLists(generation - 1);
+ _postingList.assign_generation(generation - 1);
}
template <typename B, typename M>
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
index fef3db582c8..252e71d0dde 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
@@ -87,7 +87,7 @@ MultiValueStringPostingAttributeT<B, T>::onGenerationChange(generation_t generat
{
_postingList.freeze();
MultiValueStringAttributeT<B, T>::onGenerationChange(generation);
- _postingList.transferHoldLists(generation - 1);
+ _postingList.assign_generation(generation - 1);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
index f2e07bba853..ff27adeb24a 100644
--- a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp
@@ -135,7 +135,7 @@ void
PredicateAttribute::onGenerationChange(generation_t generation)
{
getGenerationHolder().assign_generation(generation - 1);
- _index->transferHoldLists(generation - 1);
+ _index->assign_generation(generation - 1);
}
void
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
index 36fb02f4c4b..ca25e2068a2 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
@@ -173,8 +173,8 @@ ReferenceAttribute::onGenerationChange(generation_t generation)
{
_referenceMappings.freeze();
_store.freeze();
- _referenceMappings.transferHoldLists(generation - 1);
- _store.transferHoldLists(generation - 1);
+ _referenceMappings.assign_generation(generation - 1);
+ _store.assign_generation(generation - 1);
getGenerationHolder().assign_generation(generation - 1);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
index 2ccc164bf08..50f6b9188f3 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
@@ -61,7 +61,7 @@ public:
// Hold list management & freezing
void trimHoldLists(generation_t usedGen) { _reverseMapping.trimHoldLists(usedGen); }
void freeze() { _reverseMapping.freeze(); }
- void transferHoldLists(generation_t generation) { _reverseMapping.transferHoldLists(generation); }
+ void assign_generation(generation_t current_gen) { _reverseMapping.assign_generation(current_gen); }
// Handle mapping changes
void notifyReferencedPut(const Reference &entry, uint32_t targetLid);
diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
index 11742bf8f48..0086b1b3455 100644
--- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp
@@ -282,7 +282,7 @@ SingleValueEnumAttribute<B>::onGenerationChange(generation_t generation)
*/
freezeEnumDictionary();
getGenerationHolder().assign_generation(generation - 1);
- this->_enumStore.transfer_hold_lists(generation - 1);
+ this->_enumStore.assign_generation(generation - 1);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
index 2050f887c33..dfd66bbbf04 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
@@ -139,7 +139,7 @@ SingleValueNumericPostingAttribute<B>::onGenerationChange(generation_t generatio
{
_postingList.freeze();
SingleValueNumericEnumAttribute<B>::onGenerationChange(generation);
- _postingList.transferHoldLists(generation - 1);
+ _postingList.assign_generation(generation - 1);
}
template <typename B>
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
index f340d9f70c3..3bb26b61ba9 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
@@ -139,7 +139,7 @@ SingleValueStringPostingAttributeT<B>::onGenerationChange(generation_t generatio
{
_postingList.freeze();
SingleValueStringAttributeT<B>::onGenerationChange(generation);
- _postingList.transferHoldLists(generation - 1);
+ _postingList.assign_generation(generation - 1);
}
template <typename B>
diff --git a/searchlib/src/vespa/searchlib/memoryindex/feature_store.h b/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
index adeeba4d06e..db917423bf9 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/feature_store.h
@@ -206,7 +206,7 @@ public:
const std::vector<PosOccFieldsParams> &getFieldsParams() const { return _fieldsParams; }
void trimHoldLists(generation_t usedGen) { _store.trimHoldLists(usedGen); }
- void transferHoldLists(generation_t generation) { _store.transferHoldLists(generation); }
+ void assign_generation(generation_t current_gen) { _store.assign_generation(current_gen); }
void clearHoldLists() { _store.clearHoldLists();}
std::unique_ptr<vespalib::datastore::CompactingBuffers> start_compact();
vespalib::MemoryUsage getMemoryUsage() const { return _store.getMemoryUsage(); }
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp b/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
index da95f2598b7..7e6c53e627c 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index.cpp
@@ -69,10 +69,10 @@ FieldIndex<interleaved_features>::~FieldIndex()
}
_postingListStore.clearBuilder();
freeze(); // Flush all pending posting list tree freezes
- transferHoldLists();
+ assign_generation();
_dict.clear(); // Clear dictionary
freeze(); // Flush pending freeze for dictionary tree.
- transferHoldLists();
+ assign_generation();
incGeneration();
trimHoldLists();
}
@@ -143,7 +143,7 @@ FieldIndex<interleaved_features>::compactFeatures()
using generation_t = GenerationHandler::generation_t;
compacting_buffers->finish();
generation_t generation = _generationHandler.getCurrentGeneration();
- _featureStore.transferHoldLists(generation);
+ _featureStore.assign_generation(generation);
}
template <bool interleaved_features>
diff --git a/searchlib/src/vespa/searchlib/memoryindex/field_index.h b/searchlib/src/vespa/searchlib/memoryindex/field_index.h
index bd087c8eae1..0efb3cbe13f 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/field_index.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/field_index.h
@@ -60,12 +60,12 @@ private:
_featureStore.trimHoldLists(usedGen);
}
- void transferHoldLists() {
+ void assign_generation() {
GenerationHandler::generation_t generation =
_generationHandler.getCurrentGeneration();
- _postingListStore.transferHoldLists(generation);
- _dict.getAllocator().transferHoldLists(generation);
- _featureStore.transferHoldLists(generation);
+ _postingListStore.assign_generation(generation);
+ _dict.getAllocator().assign_generation(generation);
+ _featureStore.assign_generation(generation);
}
void incGeneration() {
@@ -90,7 +90,7 @@ public:
void commit() override {
_remover.flush();
freeze();
- transferHoldLists();
+ assign_generation();
incGeneration();
trimHoldLists();
}
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
index c64c490039b..36312950867 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_index.cpp
@@ -221,11 +221,11 @@ PredicateIndex::trimHoldLists(generation_t used_generation) {
}
void
-PredicateIndex::transferHoldLists(generation_t generation) {
- _interval_index.transferHoldLists(generation);
- _bounds_index.transferHoldLists(generation);
- _interval_store.transferHoldLists(generation);
- _zero_constraint_docs.getAllocator().transferHoldLists(generation);
+PredicateIndex::assign_generation(generation_t current_gen) {
+ _interval_index.assign_generation(current_gen);
+ _bounds_index.assign_generation(current_gen);
+ _interval_store.assign_generation(current_gen);
+ _zero_constraint_docs.getAllocator().assign_generation(current_gen);
}
vespalib::MemoryUsage
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_index.h b/searchlib/src/vespa/searchlib/predicate/predicate_index.h
index 1bad95c6aa9..b6e67961cdc 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_index.h
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_index.h
@@ -74,7 +74,7 @@ public:
void removeDocument(uint32_t doc_id);
void commit();
void trimHoldLists(generation_t used_generation);
- void transferHoldLists(generation_t generation);
+ void assign_generation(generation_t current_gen);
vespalib::MemoryUsage getMemoryUsage() const;
int getArity() const { return _arity; }
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
index 379c859f6c3..4def6cf0725 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.cpp
@@ -105,8 +105,8 @@ PredicateIntervalStore::trimHoldLists(generation_t used_generation) {
}
void
-PredicateIntervalStore::transferHoldLists(generation_t generation) {
- _store.transferHoldLists(generation);
+PredicateIntervalStore::assign_generation(generation_t current_gen) {
+ _store.assign_generation(current_gen);
}
}
diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
index 0b3e32ec6b7..af14755292e 100644
--- a/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
+++ b/searchlib/src/vespa/searchlib/predicate/predicate_interval_store.h
@@ -73,7 +73,7 @@ public:
void trimHoldLists(generation_t used_generation);
- void transferHoldLists(generation_t generation);
+ void assign_generation(generation_t current_gen);
/**
* Return memory usage (only the data store is included)
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.h b/searchlib/src/vespa/searchlib/predicate/simple_index.h
index 78805820a30..be5229c35aa 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.h
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.h
@@ -188,7 +188,7 @@ public:
void promoteOverThresholdVectors();
void commit();
void trimHoldLists(generation_t used_generation);
- void transferHoldLists(generation_t generation);
+ void assign_generation(generation_t current_gen);
vespalib::MemoryUsage getMemoryUsage() const;
template <typename FunctionType>
void foreach_frozen_key(vespalib::datastore::EntryRef ref, Key key, FunctionType func) const;
diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
index cb37fec26ea..7b4cfa1c55d 100644
--- a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
+++ b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp
@@ -300,10 +300,10 @@ SimpleIndex<Posting, Key, DocId>::trimHoldLists(generation_t used_generation) {
template <typename Posting, typename Key, typename DocId>
void
-SimpleIndex<Posting, Key, DocId>::transferHoldLists(generation_t generation) {
- _dictionary.getAllocator().transferHoldLists(generation);
- _btree_posting_lists.transferHoldLists(generation);
- _vector_posting_lists.getAllocator().transferHoldLists(generation);
+SimpleIndex<Posting, Key, DocId>::assign_generation(generation_t current_gen) {
+ _dictionary.getAllocator().assign_generation(current_gen);
+ _btree_posting_lists.assign_generation(current_gen);
+ _vector_posting_lists.getAllocator().assign_generation(current_gen);
}
template <typename Posting, typename Key, typename DocId>
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
index 0c797fa7fe1..11366952ad2 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
@@ -456,7 +456,7 @@ DenseTensorAttribute::onGenerationChange(generation_t next_gen)
// This applies for entire attribute vector code.
TensorAttribute::onGenerationChange(next_gen);
if (_index) {
- _index->transfer_hold_lists(next_gen - 1);
+ _index->assign_generation(next_gen - 1);
}
}
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
index d23bbcfbed4..4afdbf12ae5 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
@@ -511,13 +511,13 @@ HnswIndex::remove_document(uint32_t docid)
}
void
-HnswIndex::transfer_hold_lists(generation_t current_gen)
+HnswIndex::assign_generation(generation_t current_gen)
{
// Note: RcuVector transfers hold lists as part of reallocation based on current generation.
// We need to set the next generation here, as it is incremented on a higher level right after this call.
_graph.node_refs.setGeneration(current_gen + 1);
- _graph.nodes.transferHoldLists(current_gen);
- _graph.links.transferHoldLists(current_gen);
+ _graph.nodes.assign_generation(current_gen);
+ _graph.links.assign_generation(current_gen);
}
void
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
index e3ffada1fc2..04abb197cb9 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
@@ -187,7 +187,7 @@ public:
vespalib::GenerationHandler::Guard read_guard) const override;
void complete_add_document(uint32_t docid, std::unique_ptr<PrepareResult> prepare_result) override;
void remove_document(uint32_t docid) override;
- void transfer_hold_lists(generation_t current_gen) override;
+ void assign_generation(generation_t current_gen) override;
void trim_hold_lists(generation_t first_used_gen) override;
void compact_level_arrays(CompactionSpec compaction_spec, const CompactionStrategy& compaction_strategy);
void compact_link_arrays(CompactionSpec compaction_spec, const CompactionStrategy& compaction_strategy);
diff --git a/searchlib/src/vespa/searchlib/tensor/nearest_neighbor_index.h b/searchlib/src/vespa/searchlib/tensor/nearest_neighbor_index.h
index 51d66fdd14d..74e0c3e0d18 100644
--- a/searchlib/src/vespa/searchlib/tensor/nearest_neighbor_index.h
+++ b/searchlib/src/vespa/searchlib/tensor/nearest_neighbor_index.h
@@ -68,7 +68,7 @@ public:
virtual void complete_add_document(uint32_t docid, std::unique_ptr<PrepareResult> prepare_result) = 0;
virtual void remove_document(uint32_t docid) = 0;
- virtual void transfer_hold_lists(generation_t current_gen) = 0;
+ virtual void assign_generation(generation_t current_gen) = 0;
virtual void trim_hold_lists(generation_t first_used_gen) = 0;
virtual bool consider_compact(const CompactionStrategy& compaction_strategy) = 0;
virtual vespalib::MemoryUsage update_stat(const CompactionStrategy& compaction_strategy) = 0;
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
index b233960e339..cb1668dae3c 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
@@ -120,7 +120,7 @@ void
TensorAttribute::onGenerationChange(generation_t generation)
{
getGenerationHolder().assign_generation(generation - 1);
- _tensorStore.transferHoldLists(generation - 1);
+ _tensorStore.assign_generation(generation - 1);
}
bool
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_store.h b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
index e2426d2e899..9ff6b7ffddd 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_store.h
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
@@ -53,8 +53,8 @@ public:
}
// Inherit doc from DataStoreBase
- void transferHoldLists(generation_t generation) {
- _store.transferHoldLists(generation);
+ void assign_generation(generation_t current_gen) {
+ _store.assign_generation(current_gen);
}
void clearHoldLists() {
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
index e13d746df49..a57cd36b3b1 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.cpp
@@ -169,9 +169,9 @@ FakeMemTreeOccMgr::freeze()
void
-FakeMemTreeOccMgr::transferHoldLists()
+FakeMemTreeOccMgr::assign_generation()
{
- _allocator.transferHoldLists(_generationHandler.getCurrentGeneration());
+ _allocator.assign_generation(_generationHandler.getCurrentGeneration());
}
void
@@ -192,7 +192,7 @@ void
FakeMemTreeOccMgr::sync()
{
freeze();
- transferHoldLists();
+ assign_generation();
incGeneration();
trimHoldLists();
}
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
index d0a75930ed5..4081070d8f8 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakememtreeocc.h
@@ -94,7 +94,7 @@ public:
~FakeMemTreeOccMgr();
void freeze();
- void transferHoldLists();
+ void assign_generation();
void incGeneration();
void trimHoldLists();
void sync();