aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-23 19:03:30 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-05-23 19:03:30 +0000
commit82bea8313f493bc8f790633e0c3aee213f4612b7 (patch)
tree94715d54e8b7ca47140d98cd5e4816b87ec9d198 /searchlib
parent3a4a2785afccbbd246eaad4f8d20ec22d0465562 (diff)
- Stick to using GrowStragey everywhere.
- Store the full config in the rcu vector.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/common/condensedbitvectors.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp5
8 files changed, 9 insertions, 24 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
index 473174de284..66042bcf0c4 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
@@ -43,7 +43,7 @@ ReferenceAttribute::ReferenceAttribute(const vespalib::stringref baseFileName,
const Config & cfg)
: NotImplementedAttribute(baseFileName, cfg),
_store({}),
- _indices(getGenerationHolder()),
+ _indices(cfg.getGrowStrategy().to_generic_strategy(), getGenerationHolder()),
_compaction_spec(),
_gidToLidMapperFactory(),
_referenceMappings(getGenerationHolder(), getCommittedDocIdLimitRef())
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
index 65bbd9514c7..6ebc2996408 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
@@ -9,10 +9,10 @@
namespace search::attribute {
ReferenceMappings::ReferenceMappings(GenerationHolder &genHolder, const std::atomic<uint32_t>& committedDocIdLimit)
- : _reverseMappingIndices(genHolder),
+ : _reverseMappingIndices(vespalib::GrowStrategy(16, 1.0, 0), genHolder),
_targetLidLimit(0),
_reverseMapping(),
- _targetLids(genHolder),
+ _targetLids(vespalib::GrowStrategy(16, 1.0, 0), genHolder),
_committedDocIdLimit(committedDocIdLimit)
{
}
diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
index 38ef186b717..e6695ef6c6c 100644
--- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.cpp
@@ -15,10 +15,7 @@ using attribute::Config;
SingleValueEnumAttributeBase::
SingleValueEnumAttributeBase(const Config & c, GenerationHolder &genHolder, const vespalib::alloc::Alloc& initial_alloc)
- : _enumIndices(c.getGrowStrategy().getDocsInitialCapacity(),
- c.getGrowStrategy().getDocsGrowPercent(),
- c.getGrowStrategy().getDocsGrowDelta(),
- genHolder, initial_alloc)
+ : _enumIndices(c.getGrowStrategy().to_generic_strategy(), genHolder, initial_alloc)
{
}
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp
index 917f0f55894..0a3c6a9ac4f 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp
@@ -17,11 +17,7 @@ template <typename B>
SingleValueNumericAttribute<B>::
SingleValueNumericAttribute(const vespalib::string & baseFileName, const AttributeVector::Config & c) :
B(baseFileName, c),
- _data(c.getGrowStrategy().getDocsInitialCapacity(),
- c.getGrowStrategy().getDocsGrowPercent(),
- c.getGrowStrategy().getDocsGrowDelta(),
- getGenerationHolder(),
- this->get_initial_alloc())
+ _data(c.getGrowStrategy().to_generic_strategy(), getGenerationHolder(), this->get_initial_alloc())
{ }
template <typename B>
diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
index eca74255026..3bc2cb8f96a 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
@@ -24,10 +24,7 @@ SingleValueSmallNumericAttribute(const vespalib::string & baseFileName,
_valueShiftShift(valueShiftShift),
_valueShiftMask(valueShiftMask),
_wordShift(wordShift),
- _wordData(c.getGrowStrategy().getDocsInitialCapacity(),
- c.getGrowStrategy().getDocsGrowPercent(),
- c.getGrowStrategy().getDocsGrowDelta(),
- getGenerationHolder())
+ _wordData(c.getGrowStrategy().to_generic_strategy(), getGenerationHolder())
{
assert(_valueMask + 1 == (1u << (1u << valueShiftShift)));
assert((_valueShiftMask + 1) * (1u << valueShiftShift) == 8 * sizeof(Word));
diff --git a/searchlib/src/vespa/searchlib/common/condensedbitvectors.cpp b/searchlib/src/vespa/searchlib/common/condensedbitvectors.cpp
index 569e1275080..74df5c8c5d4 100644
--- a/searchlib/src/vespa/searchlib/common/condensedbitvectors.cpp
+++ b/searchlib/src/vespa/searchlib/common/condensedbitvectors.cpp
@@ -17,7 +17,7 @@ class CondensedBitVectorT : public CondensedBitVector
{
public:
CondensedBitVectorT(size_t sz, GenerationHolder &genHolder) :
- _v(sz, 30, 1000, genHolder)
+ _v(vespalib::GrowStrategy(sz, 30, 1000), genHolder)
{
for (size_t i = 0; i < sz; ++i) {
_v.push_back(0);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 51a4d392839..04cb687e366 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -67,9 +67,7 @@ LogDataStore::LogDataStore(vespalib::Executor &executor, const vespalib::string
_tune(tune),
_fileHeaderContext(fileHeaderContext),
_genHandler(),
- _lidInfo(growStrategy.getDocsInitialCapacity(),
- growStrategy.getDocsGrowPercent(),
- growStrategy.getDocsGrowDelta()),
+ _lidInfo(growStrategy.to_generic_strategy()),
_fileChunks(),
_holdFileChunks(),
_active(0),
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
index c1cafd547aa..dabf9203551 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp
@@ -49,10 +49,7 @@ vespalib::string makeWrongTensorTypeMsg(const ValueType &fieldTensorType, const
TensorAttribute::TensorAttribute(vespalib::stringref name, const Config &cfg, TensorStore &tensorStore)
: NotImplementedAttribute(name, cfg),
- _refVector(cfg.getGrowStrategy().getDocsInitialCapacity(),
- cfg.getGrowStrategy().getDocsGrowPercent(),
- cfg.getGrowStrategy().getDocsGrowDelta(),
- getGenerationHolder()),
+ _refVector(cfg.getGrowStrategy().to_generic_strategy(), getGenerationHolder()),
_tensorStore(tensorStore),
_is_dense(cfg.tensorType().is_dense()),
_emptyTensor(createEmptyTensor(cfg.tensorType())),