aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp')
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp
index 7fcf541fd02..391e188e3fd 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.cpp
@@ -8,7 +8,7 @@ namespace proton {
void
AttributesInitializerBase::considerPadAttribute(search::AttributeVector &attribute,
- search::SerialNum currentSerialNum,
+ std::optional<search::SerialNum> currentSerialNum,
uint32_t newDocIdLimit)
{
/*
@@ -32,7 +32,8 @@ AttributesInitializerBase::considerPadAttribute(search::AttributeVector &attribu
* 1, since a replay of a non-corrupted transaction log should
* grow the attribute as needed.
*/
- if (attribute.getStatus().getLastSyncToken() < currentSerialNum) {
+ if (!currentSerialNum.has_value() ||
+ attribute.getStatus().getLastSyncToken() < currentSerialNum.value()) {
AttributeManager::padAttribute(attribute, newDocIdLimit);
attribute.commit();
assert(newDocIdLimit <= attribute.getNumDocs());