diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-10 18:01:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 18:01:28 +0200 |
commit | 26d9e5da4de4425cbb75cd8fff4374053073b19d (patch) | |
tree | bab1c9ca156af7d94b3583d6244a1c09c72e2a81 /searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp | |
parent | 08f7a121fff008dd1307b106bd1b7d7a84433fe6 (diff) | |
parent | ab10d27bd029f73d82dabd1f3fdb839edae29e61 (diff) |
Merge pull request #24380 from vespa-engine/geirst/generation-holder-new-implv8.66.20
Implement GenerationHolder in terms of the generic generation hold list.
Diffstat (limited to 'searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp index b9c1c3686de..bbacc10e79c 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp @@ -32,7 +32,7 @@ SingleValueNumericAttribute(const vespalib::string & baseFileName, const Attribu template <typename B> SingleValueNumericAttribute<B>::~SingleValueNumericAttribute() { - getGenerationHolder().clearHoldLists(); + getGenerationHolder().reclaim_all(); } template <typename B> @@ -65,7 +65,7 @@ void SingleValueNumericAttribute<B>::onUpdateStat() { vespalib::MemoryUsage usage = _data.getMemoryUsage(); - usage.mergeGenerationHeldBytes(getGenerationHolder().getHeldBytes()); + usage.mergeGenerationHeldBytes(getGenerationHolder().get_held_bytes()); usage.merge(this->getChangeVectorMemoryUsage()); this->updateStatistics(_data.size(), _data.size(), usage.allocatedBytes(), usage.usedBytes(), usage.deadBytes(), usage.allocatedBytesOnHold()); @@ -97,14 +97,14 @@ template <typename B> void SingleValueNumericAttribute<B>::removeOldGenerations(generation_t firstUsed) { - getGenerationHolder().trimHoldLists(firstUsed); + getGenerationHolder().reclaim(firstUsed); } template <typename B> void SingleValueNumericAttribute<B>::onGenerationChange(generation_t generation) { - getGenerationHolder().transferHoldLists(generation - 1); + getGenerationHolder().assign_generation(generation - 1); } template <typename B> @@ -143,7 +143,7 @@ SingleValueNumericAttribute<B>::onLoad(vespalib::Executor *) return onLoadEnumerated(attrReader); const size_t sz(attrReader.getDataCount()); - getGenerationHolder().clearHoldLists(); + getGenerationHolder().reclaim_all(); _data.reset(); _data.unsafe_reserve(sz); for (uint32_t i = 0; i < sz; ++i) { |