diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-12 21:42:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 21:42:25 +0100 |
commit | 5cb9b85ffb3ec2a77caaa4ee367ad6435bbf762a (patch) | |
tree | 3723c971cf02eadc071c57efd5ac4d13d832220f /searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp | |
parent | 3f54f188382c09c409171145cd246b7730db3c6c (diff) | |
parent | e834424c31fd2dc6c3268cf3b374c5731108cd6b (diff) |
Merge pull request #19988 from vespa-engine/balder/less-eager-compaction-during-retirementv7.500.40
When node is retired we can relax compaction strategy as we have peaked
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp index 4b6e67212e1..032be9e1dc8 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp @@ -575,6 +575,21 @@ AttributeManager::asyncForEachAttribute(std::shared_ptr<IConstAttributeFunctor> { for (const auto &attr : _attributes) { if (attr.second.isExtra()) { + // We must skip extra attributes as they must be handled in other threads. (DocumentMetaStore) + continue; + } + AttributeVector::SP attrsp = attr.second.getAttribute(); + _attributeFieldWriter.execute(_attributeFieldWriter.getExecutorIdFromName(attrsp->getNamePrefix()), + [attrsp, func]() { (*func)(*attrsp); }); + } +} + +void +AttributeManager::asyncForEachAttribute(std::shared_ptr<IAttributeFunctor> func) const +{ + for (const auto &attr : _attributes) { + if (attr.second.isExtra()) { + // We must skip extra attributes as they must be handled in other threads.(DocumentMetaStore) continue; } AttributeVector::SP attrsp = attr.second.getAttribute(); |