summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-08-24 19:34:06 +0200
committerGitHub <noreply@github.com>2022-08-24 19:34:06 +0200
commit7d92fa79778a48b99243130c1619a408fb6b4a6b (patch)
tree238003d2d57cee5295d5dab651f7f95df5f1658d /searchlib
parentc8faaace7d59d9aec058e134ea0c24d202134817 (diff)
parentd546929a5e4dabaac53717d45dd2bb5c818429a4 (diff)
Merge pull request #23772 from vespa-engine/geirst/paged-support-for-reference-attributes
Add 'paged' support for reference attribute fields.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributevector.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/reference_mappings.h3
4 files changed, 11 insertions, 8 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
index c0df44d26e9..56ef1860724 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
@@ -61,7 +61,7 @@ allow_paged(const search::attribute::Config& config)
return false;
}
using Type = search::attribute::BasicType::Type;
- if (config.basicType() == Type::REFERENCE || config.basicType() == Type::PREDICATE) {
+ if (config.basicType() == Type::PREDICATE) {
return false;
}
if (config.basicType() == Type::TENSOR) {
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
index 7ff04f789b2..0c61eafe1d7 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp
@@ -46,11 +46,11 @@ ReferenceAttribute::ReferenceAttribute(const vespalib::stringref baseFileName)
ReferenceAttribute::ReferenceAttribute(const vespalib::stringref baseFileName, const Config & cfg)
: NotImplementedAttribute(baseFileName, cfg),
- _store({}),
- _indices(cfg.getGrowStrategy(), getGenerationHolder()),
+ _store(get_memory_allocator()),
+ _indices(cfg.getGrowStrategy(), getGenerationHolder(), get_initial_alloc()),
_compaction_spec(),
_gidToLidMapperFactory(),
- _referenceMappings(getGenerationHolder(), getCommittedDocIdLimitRef())
+ _referenceMappings(getGenerationHolder(), getCommittedDocIdLimitRef(), get_initial_alloc())
{
setEnum(true);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
index 37b7a82ab55..1f3d43296fe 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.cpp
@@ -8,11 +8,13 @@
namespace search::attribute {
-ReferenceMappings::ReferenceMappings(GenerationHolder &genHolder, const std::atomic<uint32_t>& committedDocIdLimit)
- : _reverseMappingIndices(vespalib::GrowStrategy(16, 1.0, 0, 0), genHolder),
+ReferenceMappings::ReferenceMappings(GenerationHolder& genHolder,
+ const std::atomic<uint32_t>& committedDocIdLimit,
+ const vespalib::alloc::Alloc& initial_alloc)
+ : _reverseMappingIndices(vespalib::GrowStrategy(16, 1.0, 0, 0), genHolder, initial_alloc),
_targetLidLimit(0),
_reverseMapping(),
- _targetLids(vespalib::GrowStrategy(16, 1.0, 0, 0), genHolder),
+ _targetLids(vespalib::GrowStrategy(16, 1.0, 0, 0), genHolder, initial_alloc),
_committedDocIdLimit(committedDocIdLimit)
{
}
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
index e6bcceeef18..2ccc164bf08 100644
--- a/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
+++ b/searchlib/src/vespa/searchlib/attribute/reference_mappings.h
@@ -49,7 +49,8 @@ public:
// Class used to map from target lid to source lids
using ReverseMappingRefs = vespalib::ConstArrayRef<AtomicEntryRef>;
- ReferenceMappings(GenerationHolder &genHolder, const std::atomic<uint32_t>& committedDocIdLimit);
+ ReferenceMappings(GenerationHolder &genHolder, const std::atomic<uint32_t>& committedDocIdLimit,
+ const vespalib::alloc::Alloc& initial_alloc);
~ReferenceMappings();