summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-01-20 16:15:56 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-01-22 21:22:50 +0100
commit04cc67462f28b6760f60ee3f881c1be5b1268c63 (patch)
tree3eaafe0f270a06c6fb5b080d03537a3020d72210 /searchcore
parent0b434fa20c7dd18e391a745690b3f4f684665500 (diff)
Add onAddDocs interface and many 'override' specifications.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 72f79b6c67e..0abec2b44ca 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
@@ -83,9 +83,8 @@ LidAllocator::ensureSpace(DocId lid,
uint32_t newCapacity)
{
ensureSpace(newSize, newCapacity);
- while(lid >= _activeLids.getNumDocs()) {
- DocId activeLid;
- _activeLids.addDoc(activeLid);
+ if (lid >= _activeLids.getNumDocs()) {
+ _activeLids.addDocs((lid - _activeLids.getNumDocs()) + 1);
}
_activeLids.commit();
}