aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2023-04-18 14:35:05 +0200
committerGitHub <noreply@github.com>2023-04-18 14:35:05 +0200
commitb31fc1f1ae7ac6dac7cc09987c814d0c5e0e1b3c (patch)
tree66187fe24b0ba45d694805f2e47c3d6b3df1d63c /searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
parenta84c5411af876cd2c3352ac702d6c3a4bf9c048d (diff)
parent751973b6448dc29d064e999791ae365e4659854a (diff)
Merge pull request #26768 from vespa-engine/toregge/use-default-value-ref-from-enum-store-to-handle-cleardocv8.154.35
Use default value ref from enum store to handle CLEARDOC.
Diffstat (limited to 'searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
index de4a7157dae..e353d03a9e8 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlenumericpostattribute.hpp
@@ -89,8 +89,6 @@ SingleValueNumericPostingAttribute<B>::applyValueChanges(EnumStoreBatchUpdater&
// used to make sure several arithmetic operations on the same document in a single commit works
std::map<DocId, EnumIndex> currEnumIndices;
- // This avoids searching for the defaultValue in the enum store for each CLEARDOC in the change vector.
- this->cache_change_data_entry_ref(this->_defaultValue);
for (const auto& change : this->_changes.getInsertOrder()) {
auto enumIter = currEnumIndices.find(change._doc);
EnumIndex oldIdx;
@@ -111,13 +109,9 @@ SingleValueNumericPostingAttribute<B>::applyValueChanges(EnumStoreBatchUpdater&
currEnumIndices[change._doc] = newIdx;
}
} else if(change._type == ChangeBase::CLEARDOC) {
- Change clearDoc(this->_defaultValue);
- clearDoc._doc = change._doc;
- applyUpdateValueChange(clearDoc, enumStore, currEnumIndices);
+ currEnumIndices[change._doc] = enumStore.get_default_value_ref().load_relaxed();
}
}
- // We must clear the cached entry ref as the defaultValue might be located in another data buffer on later invocations.
- this->_defaultValue.clear_entry_ref();
makePostingChange(enumStore.get_comparator(), currEnumIndices, changePost);