summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2022-05-09 14:14:51 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2022-05-09 14:22:44 +0000
commit208a7c1db7a7a67aa71fae59ca0cd5615b688b6e (patch)
treead08faca67f7e3d7dbb8dc5c6701a7ba824ddc2d /searchcore
parentba1ec40ccfe7f10ce757263871dd149b0709b8bf (diff)
move functions to more appropriate classes
preparing to make GrowableBitVector an atomic switch between bitvectors rather than a bitvector itself (to avoid overwriting its own state while being visible to other threads).
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
index a3a180a74df..3aecbc3ca0d 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
@@ -2,6 +2,7 @@
#include "lidvectorcontext.h"
#include <vespa/searchlib/common/bitvector.h>
+#include <vespa/searchlib/common/allocatedbitvector.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <cassert>
@@ -9,6 +10,7 @@
LOG_SETUP(".proton.feedoperation.lidvectorcontext");
using search::BitVector;
+using search::AllocatedBitVector;
namespace proton {
@@ -73,7 +75,7 @@ LidVectorContext::deserialize(vespalib::nbostream &is)
LOG(debug, "deserialize: format = %d", format);
// Use of bitvector when > 1/32 of docs
if (format == BITVECTOR) {
- BitVector::UP bitVector = BitVector::create(_docIdLimit);
+ auto bitVector = std::make_unique<AllocatedBitVector>(_docIdLimit);
is >> *bitVector;
uint32_t sz(bitVector->size());
assert(sz == _docIdLimit);