aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-02-14 17:01:58 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-02-14 17:01:58 +0000
commit66e66d08e509a4eabf394442bcd7e733e228fb25 (patch)
treee9aa07ff8e2debfc93c5e430377848779b315cd5 /searchcore/src/tests
parent76b1a42ae483ae66a2d1e43ef749f41661754e1c (diff)
When making callbacks like notifying about new bucket show the gurad that is held.
Then this guard can used instead of possibly making a deadlock if trying to take it yourself.
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp7
-rw-r--r--searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp24
-rw-r--r--searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp9
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp5
-rw-r--r--searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp26
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.cpp21
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.h6
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentmover_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/scaniterator_test.cpp4
-rw-r--r--searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp5
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h2
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp5
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp9
-rw-r--r--searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp24
-rw-r--r--searchcore/src/tests/proton/matching/matching_test.cpp3
-rw-r--r--searchcore/src/tests/proton/reference/gid_to_lid_mapper/gid_to_lid_mapper_test.cpp4
-rw-r--r--searchcore/src/tests/proton/server/documentretriever_test.cpp4
-rw-r--r--searchcore/src/tests/proton/server/feedstates_test.cpp2
24 files changed, 94 insertions, 98 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
index 3987a8685ea..ef2c3c18753 100644
--- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
@@ -12,6 +12,7 @@
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/attribute/sequential_attributes_initializer.h>
#include <vespa/searchcore/proton/common/hw_info.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
#include <vespa/searchcore/proton/initializer/initializer_task.h>
@@ -140,7 +141,7 @@ struct ImportedAttributesRepoBuilder {
refAttr->setGidToLidMapperFactory(std::make_shared<MockGidToLidMapperFactory>());
auto targetAttr = search::AttributeFactory::createAttribute(name + "_target", INT32_SINGLE);
auto documentMetaStore = std::shared_ptr<search::IDocumentMetaStoreContext>();
- auto targetDocumentMetaStore = std::make_shared<const DocumentMetaStoreContext>(std::make_shared<BucketDBOwner>());
+ auto targetDocumentMetaStore = std::make_shared<const DocumentMetaStoreContext>(std::make_shared<bucketdb::BucketDBOwner>());
auto importedAttr = ImportedAttributeVectorFactory::create(name, refAttr, documentMetaStore, targetAttr, targetDocumentMetaStore, false);
_repo->add(name, importedAttr);
}
@@ -230,7 +231,7 @@ struct DummyInitializerTask : public InitializerTask
struct ParallelAttributeManager
{
InitializerTask::SP documentMetaStoreInitTask;
- BucketDBOwner::SP bucketDbOwner;
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDbOwner;
DocumentMetaStore::SP documentMetaStore;
AllocStrategy alloc_strategy;
bool fastAccessAttributesOnly;
@@ -247,7 +248,7 @@ struct ParallelAttributeManager
ParallelAttributeManager::ParallelAttributeManager(search::SerialNum configSerialNum, AttributeManager::SP baseAttrMgr,
const AttributesConfig &attrCfg, uint32_t docIdLimit)
: documentMetaStoreInitTask(std::make_shared<DummyInitializerTask>()),
- bucketDbOwner(std::make_shared<BucketDBOwner>()),
+ bucketDbOwner(std::make_shared<bucketdb::BucketDBOwner>()),
documentMetaStore(std::make_shared<DocumentMetaStore>(bucketDbOwner)),
alloc_strategy(),
fastAccessAttributesOnly(false),
diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
index 494b37297f4..fa08df6faa1 100644
--- a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
+++ b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
@@ -1,11 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("imported_attributes_context_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_context.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
@@ -14,6 +14,8 @@ LOG_SETUP("imported_attributes_context_test");
#include <vespa/searchlib/test/mock_gid_to_lid_mapping.h>
#include <future>
+#include <vespa/log/log.h>
+LOG_SETUP("imported_attributes_context_test");
using namespace proton;
using search::AttributeVector;
using search::attribute::BasicType;
@@ -80,7 +82,7 @@ struct Fixture {
createReferenceAttribute(name + "_ref"),
std::shared_ptr<search::IDocumentMetaStoreContext>(),
createTargetAttribute(name + "_target"),
- std::make_shared<const DocumentMetaStoreContext>(std::make_shared<BucketDBOwner>()),
+ std::make_shared<const DocumentMetaStoreContext>(std::make_shared<bucketdb::BucketDBOwner>()),
false);
repo.add(name, attr);
return *this;
diff --git a/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp b/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
index 44f3f50c36c..52abfed2289 100644
--- a/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/buckethandler/buckethandler_test.cpp
@@ -2,6 +2,7 @@
#include <vespa/searchcore/proton/server/buckethandler.h>
#include <vespa/searchcore/proton/server/ibucketstatechangedhandler.h>
#include <vespa/searchcore/proton/server/ibucketmodifiedhandler.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/test.h>
#include <vespa/persistence/spi/test.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -28,7 +29,7 @@ struct MySubDb
{
DocumentMetaStore _metaStore;
test::UserDocuments _docs;
- MySubDb(std::shared_ptr<BucketDBOwner> bucketDB, SubDbType subDbType)
+ MySubDb(std::shared_ptr<bucketdb::BucketDBOwner> bucketDB, SubDbType subDbType)
: _metaStore(bucketDB,
DocumentMetaStore::getFixedName(),
search::GrowStrategy(),
@@ -69,17 +70,6 @@ struct MyChangedHandler : public IBucketStateChangedHandler
}
};
-
-struct MyModifiedHandler : public IBucketModifiedHandler
-{
- virtual void
- notifyBucketModified(const BucketId &bucket) override
- {
- (void) bucket;
- }
-};
-
-
bool
expectEqual(uint32_t docCount, uint32_t metaCount, size_t docSizes, size_t entrySizes, const BucketInfo &info)
{
@@ -94,28 +84,26 @@ expectEqual(uint32_t docCount, uint32_t metaCount, size_t docSizes, size_t entry
struct Fixture
{
test::UserDocumentsBuilder _builder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MySubDb _ready;
MySubDb _removed;
MySubDb _notReady;
ThreadStackExecutor _exec;
BucketHandler _handler;
MyChangedHandler _changedHandler;
- MyModifiedHandler _modifiedHandler;
BucketStateCalculator::SP _calc;
test::BucketIdListResultHandler _bucketList;
test::BucketInfoResultHandler _bucketInfo;
test::GenericResultHandler _genResult;
Fixture()
: _builder(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_ready(_bucketDB, SubDbType::READY),
_removed(_bucketDB, SubDbType::REMOVED),
_notReady(_bucketDB, SubDbType::NOTREADY),
_exec(1, 64000),
_handler(_exec),
_changedHandler(),
- _modifiedHandler(),
_calc(new BucketStateCalculator()),
_bucketList(), _bucketInfo(), _genResult()
{
@@ -180,7 +168,7 @@ TEST_F("require that bucket is reported in handleGetBucketInfo()", Fixture)
TEST_F("require that handleGetBucketInfo() can get cached bucket", Fixture)
{
{
- BucketDBOwner::Guard db = f._bucketDB->takeGuard();
+ bucketdb::Guard db = f._bucketDB->takeGuard();
db->add(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::READY);
db->cacheBucket(BUCKET_1);
db->add(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::NOTREADY);
@@ -194,7 +182,7 @@ TEST_F("require that handleGetBucketInfo() can get cached bucket", Fixture)
EXPECT_TRUE(expectEqual(2, 2, 2 * DOCSIZE_1, 2 * DOCSIZE_1, f._bucketInfo.getInfo()));
{
// Must ensure empty bucket db before destruction.
- BucketDBOwner::Guard db = f._bucketDB->takeGuard();
+ bucketdb::Guard db = f._bucketDB->takeGuard();
db->remove(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::READY);
db->remove(GID_1, BUCKET_1, TIME_1, DOCSIZE_1, SubDbType::NOTREADY);
}
diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
index 9389a60997d..c01a0083674 100644
--- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/feedoperation/operations.h>
#include <vespa/searchcore/proton/server/combiningfeedview.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/test.h>
#include <vespa/vespalib/util/idestructorcallback.h>
#include <vespa/document/update/documentupdate.h>
@@ -47,7 +48,7 @@ struct MyFeedView : public test::DummyFeedView
uint32_t _handlePrune;
uint32_t _wantedLidLimit;
MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &repo,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
SubDbType subDbType) :
test::DummyFeedView(repo),
_metaStore(bucketDB,
@@ -95,7 +96,7 @@ struct MySubDb
{
MyFeedView::SP _view;
MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
SubDbType subDbType)
: _view(std::make_shared<MyFeedView>(repo, std::move(bucketDB), subDbType))
{
@@ -129,7 +130,7 @@ const uint32_t NOT_READY = 2;
struct Fixture
{
test::UserDocumentsBuilder _builder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MySubDb _ready;
MySubDb _removed;
MySubDb _notReady;
@@ -137,7 +138,7 @@ struct Fixture
CombiningFeedView _view;
Fixture() :
_builder(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_ready(_builder.getRepo(), _bucketDB, SubDbType::READY),
_removed(_builder.getRepo(), _bucketDB, SubDbType::REMOVED),
_notReady(_builder.getRepo(), _bucketDB, SubDbType::NOTREADY),
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 8f6b2f0bc10..53b280caa88 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -16,6 +16,7 @@
#include <vespa/searchcore/proton/server/summaryadapter.h>
#include <vespa/searchcore/proton/server/attribute_writer_factory.h>
#include <vespa/searchcore/proton/server/reconfig_params.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/matching/querylimiter.h>
#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
@@ -193,7 +194,7 @@ Fixture::initViewSet(ViewSet &views)
(_summaryExecutor, search::LogDocumentStore::Config(), search::GrowStrategy(), BASE_DIR, views._docTypeName,
TuneFileSummary(), views._fileHeaderContext,views._noTlSyncer, search::IBucketizer::SP());
auto sesMgr = make_shared<SessionManager>(100);
- auto metaStore = make_shared<DocumentMetaStoreContext>(make_shared<BucketDBOwner>());
+ auto metaStore = make_shared<DocumentMetaStoreContext>(make_shared<bucketdb::BucketDBOwner>());
auto indexWriter = std::make_shared<IndexWriter>(indexMgr);
auto attrWriter = std::make_shared<AttributeWriter>(attrMgr);
auto summaryAdapter = std::make_shared<SummaryAdapter>(summaryMgr);
@@ -254,7 +255,7 @@ struct MyFastAccessFeedView
void init() {
MySummaryAdapter::SP summaryAdapter = std::make_shared<MySummaryAdapter>();
Schema::SP schema = std::make_shared<Schema>();
- _dmsc = make_shared<DocumentMetaStoreContext>(std::make_shared<BucketDBOwner>());
+ _dmsc = make_shared<DocumentMetaStoreContext>(std::make_shared<bucketdb::BucketDBOwner>());
std::shared_ptr<const DocumentTypeRepo> repo = createRepo();
StoreOnlyFeedView::Context storeOnlyCtx(summaryAdapter, schema, _dmsc, repo,
_pendingLidsForCommit, *_gidToLidChangeHandler, _writeService);
diff --git a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp
index 7f7c0302926..beadf5abfe1 100644
--- a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/searchcore/proton/documentmetastore/documentmetastore.h>
#include <vespa/searchcore/proton/server/document_scan_iterator.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/document/base/documentid.h>
@@ -22,7 +23,7 @@ struct Fixture
DocumentMetaStore _metaStore;
std::unique_ptr<DocumentScanIterator> _itr;
Fixture()
- : _metaStore(std::make_shared<BucketDBOwner>()),
+ : _metaStore(std::make_shared<bucketdb::BucketDBOwner>()),
_itr()
{
_metaStore.constructFreeList();
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index 40a9656ae41..5472682c503 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -139,7 +139,7 @@ struct MyStoreOnlyContext
HwInfo _hwInfo;
StoreOnlyContext _ctx;
MyStoreOnlyContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MyStoreOnlyContext();
const MySubDBOwner &getOwner() const {
@@ -148,7 +148,7 @@ struct MyStoreOnlyContext
};
MyStoreOnlyContext::MyStoreOnlyContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer &bucketDBHandlerInitializer)
: _owner(), _syncProxy(), _getSerialNum(), _fileHeader(),
_metrics(DOCTYPE_NAME, 1), _configMutex(), _hwInfo(),
@@ -175,7 +175,7 @@ struct MyFastAccessContext
MyMetricsWireService _wireService;
FastAccessContext _ctx;
MyFastAccessContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MyFastAccessContext();
const MyMetricsWireService &getWireService() const {
@@ -187,7 +187,7 @@ struct MyFastAccessContext
};
MyFastAccessContext::MyFastAccessContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer & bucketDBHandlerInitializer)
: _storeOnlyCtx(writeService, bucketDB, bucketDBHandlerInitializer),
_attributeMetrics(nullptr),
@@ -212,7 +212,7 @@ struct MySearchableContext
vespalib::Clock _clock;
SearchableContext _ctx;
MySearchableContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MySearchableContext();
const MyMetricsWireService &getWireService() const {
@@ -225,7 +225,7 @@ struct MySearchableContext
MySearchableContext::MySearchableContext(IThreadingService &writeService,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
IBucketDBHandlerInitializer & bucketDBHandlerInitializer)
: _fastUpdCtx(writeService, bucketDB, bucketDBHandlerInitializer),
_queryLimiter(), _clock(),
@@ -284,7 +284,7 @@ struct FixtureBase
ThreadStackExecutor _summaryExecutor;
ExecutorThreadingService _writeService;
typename Traits::Config _cfg;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
BucketDBHandler _bucketDBHandler;
typename Traits::Context _ctx;
typename Traits::Schema _baseSchema;
@@ -296,7 +296,7 @@ struct FixtureBase
: _summaryExecutor(1, 64 * 1024),
_writeService(_summaryExecutor),
_cfg(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_bucketDBHandler(*_bucketDB),
_ctx(_writeService, _bucketDB, _bucketDBHandler),
_baseSchema(),
@@ -317,11 +317,11 @@ struct FixtureBase
proton::test::runInMaster(_writeService, func);
}
void init() {
- DocumentSubDbInitializer::SP task =
- _subDb.createInitializer(*_snapshot->_cfg, Traits::configSerial(), IndexConfig());
- vespalib::ThreadStackExecutor executor(1, 1024 * 1024);
- initializer::TaskRunner taskRunner(executor);
- taskRunner.runTask(task);
+ DocumentSubDbInitializer::SP task =
+ _subDb.createInitializer(*_snapshot->_cfg, Traits::configSerial(), IndexConfig());
+ vespalib::ThreadStackExecutor executor(1, 1024 * 1024);
+ initializer::TaskRunner taskRunner(executor);
+ taskRunner.runTask(task);
auto sessionMgr = std::make_shared<SessionManager>(1);
runInMaster([&] () { _subDb.initViews(*_snapshot->_cfg, sessionMgr); });
}
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.cpp
index 7c8388b05ed..4007a7761a3 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.cpp
@@ -14,7 +14,7 @@ MyBucketModifiedHandler::notifyBucketModified(const BucketId &bucket) {
_modified.push_back(bucket);
}
-MyMoveHandler::MyMoveHandler(BucketDBOwner &bucketDb, bool storeMoveDoneContext)
+MyMoveHandler::MyMoveHandler(bucketdb::BucketDBOwner &bucketDb, bool storeMoveDoneContext)
: _bucketDb(bucketDb),
_moves(),
_numCachedBuckets(),
@@ -35,16 +35,17 @@ MyMoveHandler::handleMove(MoveOperation &op, IDestructorCallback::SP moveDoneCtx
}
}
-MySubDb::MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB,
+MySubDb::MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
uint32_t subDbId, SubDbType subDbType)
- : _metaStoreSP(std::make_shared<DocumentMetaStore>(bucketDB, DocumentMetaStore::getFixedName(),
- search::GrowStrategy(), subDbType)),
- _metaStore(*_metaStoreSP),
- _realRetriever(std::make_shared<MyDocumentRetriever>(repo)),
- _retriever(_realRetriever),
- _subDb("my_sub_db", subDbId, _metaStoreSP, _retriever, IFeedView::SP(), nullptr),
- _docs(),
- _bucketDBHandler(*bucketDB) {
+ : _metaStoreSP(std::make_shared<DocumentMetaStore>(bucketDB, DocumentMetaStore::getFixedName(),
+ search::GrowStrategy(), subDbType)),
+ _metaStore(*_metaStoreSP),
+ _realRetriever(std::make_shared<MyDocumentRetriever>(repo)),
+ _retriever(_realRetriever),
+ _subDb("my_sub_db", subDbId, _metaStoreSP, _retriever, IFeedView::SP(), nullptr),
+ _docs(),
+ _bucketDBHandler(*bucketDB)
+{
_bucketDBHandler.addDocumentMetaStore(_metaStoreSP.get(), 0);
}
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.h b/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.h
index 4a6bb4fa938..65e206d7327 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.h
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/bucketmover_common.h
@@ -31,13 +31,13 @@ struct MyMoveOperationLimiter : public IMoveOperationLimiter {
struct MyMoveHandler : public IDocumentMoveHandler {
using MoveOperationVector = std::vector<MoveOperation>;
- BucketDBOwner &_bucketDb;
+ bucketdb::BucketDBOwner &_bucketDb;
MoveOperationVector _moves;
size_t _numCachedBuckets;
bool _storeMoveDoneContexts;
std::vector<vespalib::IDestructorCallback::SP> _moveDoneContexts;
- MyMoveHandler(BucketDBOwner &bucketDb, bool storeMoveDoneContext = false);
+ MyMoveHandler(bucketdb::BucketDBOwner &bucketDb, bool storeMoveDoneContext = false);
~MyMoveHandler() override;
void handleMove(MoveOperation &op, vespalib::IDestructorCallback::SP moveDoneCtx) override;
@@ -103,7 +103,7 @@ struct MySubDb {
UserDocuments _docs;
bucketdb::BucketDBHandler _bucketDBHandler;
- MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB,
+ MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
uint32_t subDbId, SubDbType subDbType);
~MySubDb();
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 56cf1ae5389..502639d1dca 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -64,7 +64,7 @@ struct ControllerFixtureBase : public ::testing::Test
test::ClusterStateHandler _clusterStateHandler;
test::BucketHandler _bucketHandler;
MyBucketModifiedHandler _modifiedHandler;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MyMoveHandler _moveHandler;
MySubDb _ready;
MySubDb _notReady;
@@ -129,7 +129,7 @@ ControllerFixtureBase::ControllerFixtureBase(const BlockableMaintenanceJobConfig
_calc(std::make_shared<test::BucketStateCalculator>()),
_bucketHandler(),
_modifiedHandler(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_moveHandler(*_bucketDB, storeMoveDoneContexts),
_ready(_builder.getRepo(), _bucketDB, 1, SubDbType::READY),
_notReady(_builder.getRepo(), _bucketDB, 2, SubDbType::NOTREADY),
@@ -751,7 +751,7 @@ TEST_F(ControllerFixture, require_that_notifyCreateBucket_causes_bucket_to_be_re
EXPECT_TRUE(bucketsModified().empty());
addReady(_notReady.bucket(3)); // bucket 3 now ready, no notify
EXPECT_TRUE(_bmj.done()); // move job still believes work done
- _bmj.notifyCreateBucket(_notReady.bucket(3)); // reconsider bucket 3
+ _bmj.notifyCreateBucket(_bucketDB->takeGuard(), _notReady.bucket(3)); // reconsider bucket 3
EXPECT_FALSE(_bmj.done());
runLoop();
EXPECT_TRUE(_bmj.done());
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentmover_test.cpp
index 0d978e6e463..420f45d99e8 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentmover_test.cpp
@@ -14,7 +14,7 @@ using document::BucketId;
struct MySubDbTwoBuckets : public MySubDb
{
MySubDbTwoBuckets(test::UserDocumentsBuilder &builder,
- std::shared_ptr<BucketDBOwner> bucketDB,
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB,
uint32_t subDbId,
SubDbType subDbType)
: MySubDb(builder.getRepo(), bucketDB, subDbId, subDbType)
@@ -32,16 +32,16 @@ struct MySubDbTwoBuckets : public MySubDb
struct DocumentMoverTest : ::testing::Test
{
test::UserDocumentsBuilder _builder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MyMoveOperationLimiter _limiter;
DocumentBucketMover _mover;
MySubDbTwoBuckets _source;
- BucketDBOwner _bucketDb;
+ bucketdb::BucketDBOwner _bucketDb;
MyMoveHandler _handler;
PendingLidTracker _pendingLidsForCommit;
DocumentMoverTest()
: _builder(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_limiter(),
_mover(_limiter),
_source(_builder, _bucketDB, 0u, SubDbType::READY),
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/scaniterator_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/scaniterator_test.cpp
index 2c382473fca..91b8709e8da 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/scaniterator_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/scaniterator_test.cpp
@@ -17,7 +17,7 @@ using ScanPass = ScanItr::Pass;
struct ScanTestBase : public ::testing::Test
{
test::UserDocumentsBuilder _builder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MySubDb _ready;
MySubDb _notReady;
ScanTestBase();
@@ -34,7 +34,7 @@ struct ScanTestBase : public ::testing::Test
ScanTestBase::ScanTestBase()
: _builder(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_ready(_builder.getRepo(), _bucketDB, 1, SubDbType::READY),
_notReady(_builder.getRepo(), _bucketDB, 2, SubDbType::NOTREADY)
{}
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
index 8840d4778e0..bcb0c049e56 100644
--- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
@@ -428,7 +428,7 @@ struct FeedHandlerFixture
MyReplayConfig replayConfig;
MyFeedView feedView;
MyTlsWriter tls_writer;
- BucketDBOwner _bucketDB;
+ bucketdb::BucketDBOwner _bucketDB;
bucketdb::BucketDBHandler _bucketDBHandler;
FeedHandler handler;
FeedHandlerFixture()
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index bf2265ed9a0..49b1f10bde2 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -10,6 +10,7 @@
#include <vespa/searchcore/proton/server/matchview.h>
#include <vespa/searchcore/proton/server/searchable_feed_view.h>
#include <vespa/searchcore/proton/feedoperation/operations.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/document_meta_store_context_observer.h>
#include <vespa/searchcore/proton/test/dummy_document_store.h>
#include <vespa/searchcore/proton/test/dummy_summary_manager.h>
@@ -541,7 +542,7 @@ struct FixtureBase
return msa._store;
}
- BucketDBOwner::Guard getBucketDB() const {
+ bucketdb::Guard getBucketDB() const {
return getMetaStore().getBucketDB().takeGuard();
}
@@ -684,7 +685,7 @@ FixtureBase::FixtureBase()
msa(static_cast<MySummaryAdapter&>(*sa)),
maw(static_cast<MyAttributeWriter&>(*aw)),
_docIdLimit(0u),
- _dmscReal(std::make_shared<DocumentMetaStoreContext>(std::make_shared<BucketDBOwner>())),
+ _dmscReal(std::make_shared<DocumentMetaStoreContext>(std::make_shared<bucketdb::BucketDBOwner>())),
_dmsc(std::make_shared<test::DocumentMetaStoreContextObserver>(*_dmscReal)),
pc(sc._builder->getDocumentType().getName(), "fileconfig_test"),
_sharedExecutor(1, 0x10000),
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
index b9bb6a7c801..5a68e46c57e 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
@@ -213,7 +213,7 @@ MyDocumentRetriever::parseSelect(const vespalib::string&) const {
abort();
}
-MySubDb::MySubDb(std::shared_ptr<BucketDBOwner> bucket_db, const MyDocumentStore& store, const std::shared_ptr<const DocumentTypeRepo> & repo)
+MySubDb::MySubDb(std::shared_ptr<bucketdb::BucketDBOwner> bucket_db, const MyDocumentStore& store, const std::shared_ptr<const DocumentTypeRepo> & repo)
: sub_db(std::move(bucket_db), SUBDB_ID),
maintenance_sub_db(sub_db.getName(), sub_db.getSubDbId(), sub_db.getDocumentMetaStoreContext().getSP(),
std::make_shared<MyDocumentRetriever>(repo, store),
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
index ec34c0fd5a7..9ef96762e2d 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.h
@@ -140,6 +140,6 @@ struct MySubDb {
test::DummyDocumentSubDb sub_db;
MaintenanceDocumentSubDB maintenance_sub_db;
PendingLidTracker _pendingLidsForCommit;
- MySubDb(std::shared_ptr<BucketDBOwner> bucket_db, const MyDocumentStore& store, const std::shared_ptr<const DocumentTypeRepo> & repo);
+ MySubDb(std::shared_ptr<bucketdb::BucketDBOwner> bucket_db, const MyDocumentStore& store, const std::shared_ptr<const DocumentTypeRepo> & repo);
~MySubDb();
};
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
index 993cb9226c5..2ca1101ac3a 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_handler_test.cpp
@@ -1,11 +1,12 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lid_space_common.h"
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/vespalib/gtest/gtest.h>
struct HandlerTest : public ::testing::Test {
DocBuilder _docBuilder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
MyDocumentStore _docStore;
MySubDb _subDb;
LidSpaceCompactionHandler _handler;
@@ -15,7 +16,7 @@ struct HandlerTest : public ::testing::Test {
HandlerTest::HandlerTest()
: _docBuilder(Schema()),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_docStore(),
_subDb(_bucketDB, _docStore, _docBuilder.getDocumentTypeRepo()),
_handler(_subDb.maintenance_sub_db, "test")
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index e47dfac90db..a7a8788b478 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -25,6 +25,7 @@
#include <vespa/searchcore/proton/server/maintenancecontroller.h>
#include <vespa/searchcore/proton/test/buckethandler.h>
#include <vespa/searchcore/proton/test/clusterstatehandler.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/disk_mem_usage_notifier.h>
#include <vespa/searchcore/proton/test/mock_attribute_manager.h>
#include <vespa/searchcore/proton/test/test.h>
@@ -98,7 +99,7 @@ class MyDocumentSubDB
public:
MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo,
- std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName);
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB, const DocTypeName &docTypeName);
~MyDocumentSubDB();
uint32_t getSubDBId() const { return _subDBId; }
@@ -131,7 +132,7 @@ public:
};
MyDocumentSubDB::MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo,
- std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName)
+ std::shared_ptr<bucketdb::BucketDBOwner> bucketDB, const DocTypeName &docTypeName)
: _docs(),
_subDBId(subDBId),
_metaStoreSP(std::make_shared<DocumentMetaStore>(
@@ -365,7 +366,7 @@ public:
DummyBucketExecutor _bucketExecutor;
DocTypeName _docTypeName;
test::UserDocumentsBuilder _builder;
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
test::BucketStateCalculator::SP _calc;
test::ClusterStateHandler _clusterStateHandler;
test::BucketHandler _bucketHandler;
@@ -785,7 +786,7 @@ MaintenanceControllerFixture::MaintenanceControllerFixture()
_bucketExecutor(2),
_docTypeName("searchdocument"), // must match document builder
_builder(),
- _bucketDB(std::make_shared<BucketDBOwner>()),
+ _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_calc(new test::BucketStateCalculator()),
_clusterStateHandler(),
_bucketHandler(),
diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
index 3b98206e9cf..7d181eaa0ee 100644
--- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
@@ -7,6 +7,7 @@
#include <vespa/searchcore/proton/server/putdonecontext.h>
#include <vespa/searchcore/proton/server/removedonecontext.h>
#include <vespa/searchcore/proton/server/storeonlyfeedview.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/feedoperation/moveoperation.h>
#include <vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h>
#include <vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h>
@@ -199,7 +200,7 @@ struct FixtureBase {
putCount(0),
heartbeatCount(0),
outstandingMoveOps(0),
- metaStore(std::make_shared<DocumentMetaStore>(std::make_shared<BucketDBOwner>(),
+ metaStore(std::make_shared<DocumentMetaStore>(std::make_shared<bucketdb::BucketDBOwner>(),
DocumentMetaStore::getFixedName(),
search::GrowStrategy(),
subDbType)),
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index 21b32b40c80..fd18979c6e0 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -92,10 +92,10 @@ struct BoolVector : public std::vector<bool> {
using PutRes = DocumentMetaStore::Result;
using Result = DocumentMetaStore::Result;
-BucketDBOwner::SP
+std::shared_ptr<bucketdb::BucketDBOwner>
createBucketDB()
{
- return std::make_shared<BucketDBOwner>();
+ return std::make_shared<bucketdb::BucketDBOwner>();
}
void
@@ -774,7 +774,7 @@ requireThatBasicBucketInfoWorks()
BucketId prevBucket = m.begin()->first.first;
uint32_t cnt = 0u;
uint32_t maxcnt = 0u;
- BucketDBOwner::Guard bucketDB = dms.getBucketDB().takeGuard();
+ bucketdb::Guard bucketDB = dms.getBucketDB().takeGuard();
for (Map::const_iterator i = m.begin(), ie = m.end(); i != ie; ++i) {
if (i->first.first == prevBucket) {
cksum.add(i->first.second, i->second, 1, SubDbType::READY);
@@ -862,7 +862,7 @@ struct Comparator {
};
struct UserDocFixture {
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
DocumentMetaStore dms;
std::vector<GlobalId> gids;
BucketId bid1;
@@ -1106,19 +1106,15 @@ struct MyBucketCreateListener : public IBucketCreateListener {
MyBucketCreateListener();
~MyBucketCreateListener();
- virtual void notifyCreateBucket(const document::BucketId &bucket) override;
+ void notifyCreateBucket(const bucketdb::Guard & guard, const document::BucketId &bucket) override;
};
-MyBucketCreateListener::MyBucketCreateListener()
-{
-}
+MyBucketCreateListener::MyBucketCreateListener() = default;
-MyBucketCreateListener::~MyBucketCreateListener()
-{
-}
+MyBucketCreateListener::~MyBucketCreateListener() = default;
void
-MyBucketCreateListener::notifyCreateBucket(const document::BucketId &bucket)
+MyBucketCreateListener::notifyCreateBucket(const bucketdb::Guard &, const document::BucketId &bucket)
{
_buckets.emplace_back(bucket);
}
@@ -1647,7 +1643,7 @@ TEST(DocumentMetaStoreTest, overlapping_bucket_active_state_works)
}
struct RemovedFixture {
- std::shared_ptr<BucketDBOwner> _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
DocumentMetaStore dms;
bucketdb::BucketDBHandler _bucketDBHandler;
@@ -1671,7 +1667,7 @@ RemovedFixture::RemovedFixture()
{
_bucketDBHandler.addDocumentMetaStore(&dms, 0);
}
-RemovedFixture::~RemovedFixture() {}
+RemovedFixture::~RemovedFixture() = default;
TEST(DocumentMetaStoreTest, remove_changed_bucket_works)
{
diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp
index 0278aba41d9..f68e4956e15 100644
--- a/searchcore/src/tests/proton/matching/matching_test.cpp
+++ b/searchcore/src/tests/proton/matching/matching_test.cpp
@@ -13,6 +13,7 @@
#include <vespa/searchcore/proton/matching/querynodes.h>
#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/matching/viewresolver.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/aggregation/grouping.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
@@ -377,7 +378,7 @@ MyWorld::MyWorld()
searchContext(),
attributeContext(),
sessionManager(),
- metaStore(std::make_shared<BucketDBOwner>()),
+ metaStore(std::make_shared<bucketdb::BucketDBOwner>()),
matchingStats(),
clock(),
queryLimiter()
diff --git a/searchcore/src/tests/proton/reference/gid_to_lid_mapper/gid_to_lid_mapper_test.cpp b/searchcore/src/tests/proton/reference/gid_to_lid_mapper/gid_to_lid_mapper_test.cpp
index 30e3c86cb34..7f92686cfb9 100644
--- a/searchcore/src/tests/proton/reference/gid_to_lid_mapper/gid_to_lid_mapper_test.cpp
+++ b/searchcore/src/tests/proton/reference/gid_to_lid_mapper/gid_to_lid_mapper_test.cpp
@@ -75,14 +75,14 @@ void assertLid(const std::unique_ptr<search::IGidToLidMapper> &mapper, const ves
struct Fixture
{
- BucketDBOwner::SP _bucketDB;
+ std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB;
std::shared_ptr<DocumentMetaStore> _dms;
std::shared_ptr<const DocumentMetaStoreContext> _dmsContext;
Timestamp _timestamp;
using generation_t = GenerationHandler::generation_t;
Fixture()
- : _bucketDB(std::make_shared<BucketDBOwner>()),
+ : _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()),
_dms(std::make_shared<DocumentMetaStore>(_bucketDB)),
_dmsContext(std::make_shared<const DocumentMetaStoreContext>(_dms))
{
diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp
index 058374cfc59..234520d040b 100644
--- a/searchcore/src/tests/proton/server/documentretriever_test.cpp
+++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp
@@ -29,6 +29,7 @@
#include <vespa/searchcommon/common/schema.h>
#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
#include <vespa/searchcore/proton/server/documentretriever.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/dummy_document_store.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributeguard.h>
@@ -84,7 +85,6 @@ using search::index::Schema;
using search::index::schema::DataType;
using search::tensor::TensorAttribute;
using storage::spi::Bucket;
-using storage::spi::GetResult;
using storage::spi::Timestamp;
using storage::spi::test::makeSpiBucket;
using vespalib::make_string;
@@ -327,7 +327,7 @@ struct Fixture {
Fixture()
: repo(getRepoConfig()),
- meta_store(std::make_shared<BucketDBOwner>()),
+ meta_store(std::make_shared<bucketdb::BucketDBOwner>()),
gid(doc_id.getGlobalId()),
bucket_id(gid.convertToBucketId()),
timestamp(21),
diff --git a/searchcore/src/tests/proton/server/feedstates_test.cpp b/searchcore/src/tests/proton/server/feedstates_test.cpp
index 4d4056de81d..47d365411c9 100644
--- a/searchcore/src/tests/proton/server/feedstates_test.cpp
+++ b/searchcore/src/tests/proton/server/feedstates_test.cpp
@@ -69,7 +69,7 @@ struct Fixture
IFeedView *feed_view_ptr;
MyReplayConfig replay_config;
MemoryConfigStore config_store;
- BucketDBOwner _bucketDB;
+ bucketdb::BucketDBOwner _bucketDB;
bucketdb::BucketDBHandler _bucketDBHandler;
MyIncSerialNum _inc_serial_num;
ReplayTransactionLogState state;