diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-11-24 17:08:31 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-11-25 13:59:32 +0100 |
commit | d9d7d10db229ccc24e11333aae1d08070a534bf5 (patch) | |
tree | 54a4da87bb893f5b76b601095a03ed6f66be8e07 /searchcore | |
parent | 22e91538da2029211bd9d640ec9e34e2fb3a8410 (diff) |
Don't apply remove to attribute if last sync token on attribute is equal to serialNum.
Several years ago, attribute vector last sync token was updated for each
write operation, and lid space compaction generated a move operation that
performed two write operations on the same attribute with the same serial
number (setting the value for the new lid and clearing the value for
the old lid). Current code delays update of attribute vector last sync token
until a force commit operation or an attribute vector flush (to disk).
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index 418615058ce..cb061309d75 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -518,8 +518,7 @@ RemoveTask::run() const auto &fields = _wc.getFields(); for (auto &field : fields) { AttributeVector &attr = field.getAttribute(); - // Must use <= due to how move operations are handled - if (attr.getStatus().getLastSyncToken() <= _serialNum) { + if (attr.getStatus().getLastSyncToken() < _serialNum) { applyRemoveToAttribute(_serialNum, _lid, attr, _onWriteDone); } } |