diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-01-23 21:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 21:21:01 +0100 |
commit | 239a320c3ecc7e7e376d968fbca73754e269d185 (patch) | |
tree | f002ad4ce0171512d27f4ef31aa400b42775f102 /searchcore/src/tests/proton | |
parent | 166d5e91805b55c1d7606a87f82a2e74ffa84cde (diff) |
Revert "Wire in the BucketExecutor."
Diffstat (limited to 'searchcore/src/tests/proton')
5 files changed, 22 insertions, 29 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp index 38e5e08ec02..e84cf338bcd 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp @@ -25,7 +25,6 @@ #include <vespa/searchcore/proton/server/searchview.h> #include <vespa/searchcore/proton/server/summaryadapter.h> #include <vespa/searchcore/proton/matching/querylimiter.h> -#include <vespa/persistence/dummyimpl/dummy_bucket_executor.h> #include <vespa/vespalib/util/destructor_callbacks.h> #include <vespa/searchlib/engine/docsumapi.h> #include <vespa/searchlib/index/docbuilder.h> @@ -174,7 +173,6 @@ public: DummyFileHeaderContext _fileHeaderContext; TransLogServer _tls; vespalib::ThreadStackExecutor _summaryExecutor; - storage::spi::dummy::DummyBucketExecutor _bucketExecutor; bool _mkdirOk; matching::QueryLimiter _queryLimiter; vespalib::Clock _clock; @@ -194,7 +192,6 @@ public: _fileHeaderContext(), _tls("tmp", 9013, ".", _fileHeaderContext), _summaryExecutor(8, 128*1024), - _bucketExecutor(2), _mkdirOk(FastOS_File::MakeDirectory("tmpdb")), _queryLimiter(), _clock(), @@ -222,7 +219,7 @@ public: } _ddb = std::make_unique<DocumentDB>("tmpdb", _configMgr.getConfig(), "tcp/localhost:9013", _queryLimiter, _clock, DocTypeName(docTypeName), makeBucketSpace(), *b->getProtonConfigSP(), *this, - _summaryExecutor, _summaryExecutor, _bucketExecutor, _tls, _dummy, _fileHeaderContext, + _summaryExecutor, _summaryExecutor, _tls, _dummy, _fileHeaderContext, std::make_unique<MemoryConfigStore>(), std::make_shared<vespalib::ThreadStackExecutor>(16, 128 * 1024), _hwInfo), _ddb->start(); diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp index 91046fbb567..4064fc24105 100644 --- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp @@ -19,7 +19,6 @@ #include <vespa/searchcore/proton/server/document_db_explorer.h> #include <vespa/searchcore/proton/server/documentdbconfigmanager.h> #include <vespa/searchcore/proton/server/memoryconfigstore.h> -#include <vespa/persistence/dummyimpl/dummy_bucket_executor.h> #include <vespa/searchcorespi/index/indexflushtarget.h> #include <vespa/searchlib/attribute/attribute_read_guard.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> @@ -70,7 +69,6 @@ struct Fixture { MyDBOwner _myDBOwner; vespalib::ThreadStackExecutor _summaryExecutor; HwInfo _hwInfo; - storage::spi::dummy::DummyBucketExecutor _bucketExecutor; DocumentDB::SP _db; DummyFileHeaderContext _fileHeaderContext; TransLogServer _tls; @@ -86,31 +84,31 @@ Fixture::Fixture() _myDBOwner(), _summaryExecutor(8, 128*1024), _hwInfo(), - _bucketExecutor(2), _db(), _fileHeaderContext(), _tls("tmp", 9014, ".", _fileHeaderContext), _queryLimiter(), _clock() { - auto documenttypesConfig = std::make_shared<DocumenttypesConfig>(); + DocumentDBConfig::DocumenttypesConfigSP documenttypesConfig(new DocumenttypesConfig()); DocumentType docType("typea", 0); - auto repo = std::make_shared<DocumentTypeRepo>(docType); - auto tuneFileDocumentDB = std::make_shared<TuneFileDocumentDB>(); + std::shared_ptr<const DocumentTypeRepo> repo(new DocumentTypeRepo(docType)); + TuneFileDocumentDB::SP tuneFileDocumentDB(new TuneFileDocumentDB); config::DirSpec spec(TEST_PATH("cfg")); DocumentDBConfigHelper mgr(spec, "typea"); - auto b = std::make_shared<BootstrapConfig>(1, documenttypesConfig, repo, + BootstrapConfig::SP + b(new BootstrapConfig(1, documenttypesConfig, repo, std::make_shared<ProtonConfig>(), std::make_shared<FiledistributorrpcConfig>(), std::make_shared<BucketspacesConfig>(), - tuneFileDocumentDB, HwInfo()); + tuneFileDocumentDB, HwInfo())); mgr.forwardConfig(b); mgr.nextGeneration(0ms); - _db = std::make_shared<DocumentDB>(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"), + _db.reset(new DocumentDB(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"), makeBucketSpace(), - *b->getProtonConfigSP(), _myDBOwner, _summaryExecutor, _summaryExecutor, _bucketExecutor, _tls, _dummy, - _fileHeaderContext, std::make_unique<MemoryConfigStore>(), - std::make_shared<vespalib::ThreadStackExecutor>(16, 128 * 1024), _hwInfo); + *b->getProtonConfigSP(), _myDBOwner, _summaryExecutor, _summaryExecutor, _tls, _dummy, + _fileHeaderContext, ConfigStore::UP(new MemoryConfigStore), + std::make_shared<vespalib::ThreadStackExecutor>(16, 128 * 1024), _hwInfo)); _db->start(); _db->waitForOnlineState(); } diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp index af8086941fd..926530c228e 100644 --- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp +++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.cpp @@ -46,27 +46,23 @@ JobTestBase::init(uint32_t allowedLidBloat, { _handler = std::make_unique<MyHandler>(maxOutstandingMoveOps != MAX_OUTSTANDING_MOVE_OPS, useBucketDB()); DocumentDBLidSpaceCompactionConfig compactCfg(interval, allowedLidBloat, allowedLidBloatFactor, - REMOVE_BATCH_BLOCK_RATE, REMOVE_BLOCK_RATE, false, useBucketDB()); + REMOVE_BATCH_BLOCK_RATE, REMOVE_BLOCK_RATE, false); BlockableMaintenanceJobConfig blockableCfg(resourceLimitFactor, maxOutstandingMoveOps); if (useBucketDB()) { - _singleExecutor = std::make_unique<vespalib::ThreadStackExecutor>(1, 0x10000); - _master = std::make_unique<proton::ExecutorThreadService> (*_singleExecutor); _bucketExecutor = std::make_unique<storage::spi::dummy::DummyBucketExecutor>(4); - _job = std::make_unique<lidspace::CompactionJob>(compactCfg, *_handler, _storer, *_master, *_bucketExecutor, - _diskMemUsageNotifier, blockableCfg, _clusterStateHandler, nodeRetired, + _job = std::make_unique<lidspace::CompactionJob>(compactCfg, *_handler, _storer, *_bucketExecutor, _diskMemUsageNotifier, + blockableCfg, _clusterStateHandler, nodeRetired, document::BucketSpace::placeHolder()); } else { _job = std::make_unique<LidSpaceCompactionJob>(compactCfg, *_handler, _storer, _frozenHandler, _diskMemUsageNotifier, blockableCfg, _clusterStateHandler, nodeRetired); } } - void JobTestBase::sync() const { if (_bucketExecutor) { _bucketExecutor->sync(); - _master->sync(); } } diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h index c81f8c8d387..637314e2879 100644 --- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h +++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_jobtest.h @@ -7,8 +7,6 @@ struct JobTestBase : public ::testing::TestWithParam<bool> { std::unique_ptr<storage::spi::BucketExecutor> _bucketExecutor; - std::unique_ptr<vespalib::SyncableThreadExecutor> _singleExecutor; - std::unique_ptr<searchcorespi::index::IThreadService> _master; std::unique_ptr<MyHandler> _handler; MyStorer _storer; MyFrozenBucketHandler _frozenHandler; diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index ab447d5d38f..d6fddf16659 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -862,10 +862,14 @@ void MaintenanceControllerFixture::injectMaintenanceJobs() { if (_injectDefaultJobs) { - MaintenanceJobsInjector::injectJobs(_mc, *_mcCfg, _bucketExecutor, _fh, _gsp, _lscHandlers, _fh, _mc, - _bucketCreateNotifier, _docTypeName.getName(), makeBucketSpace(), _fh, _fh, - _bmc, _clusterStateHandler, _bucketHandler, _calc, _diskMemUsageNotifier, - _jobTrackers, _readyAttributeManager, _notReadyAttributeManager, + MaintenanceJobsInjector::injectJobs(_mc, *_mcCfg, _fh, _gsp, + _lscHandlers, _fh, _mc, _bucketCreateNotifier, _docTypeName.getName(), makeBucketSpace(), + _fh, _fh, _bmc, _clusterStateHandler, _bucketHandler, + _calc, + _diskMemUsageNotifier, + _jobTrackers, + _readyAttributeManager, + _notReadyAttributeManager, std::make_unique<const AttributeConfigInspector>(AttributesConfigBuilder()), std::make_shared<TransientMemoryUsageProvider>(), _attributeUsageFilter); |