summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 906f71fecb4..7413d0f369f 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -143,7 +143,15 @@ applyCompactLidSpace(uint32_t wantedLidLimit, SerialNum serialNum,
AttributeVector &attr)
{
if (attr.getStatus().getLastSyncToken() < serialNum) {
- attr.compactLidSpace(wantedLidLimit);
+ /*
+ * If the attribute is an empty placeholder attribute due to
+ * later config changes removing the attribute then it might
+ * be smaller than expected during transaction log replay.
+ */
+ attr.commit();
+ if (wantedLidLimit <= attr.getCommittedDocIdLimit()) {
+ attr.compactLidSpace(wantedLidLimit);
+ }
attr.commit(serialNum, serialNum);
}
}