diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-03 22:31:03 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-05 23:07:08 +0200 |
commit | dff6169faab318931c8c3ca4d0dc7df4ea763594 (patch) | |
tree | 094ff5bd2fdcab25999a863987131a8bf7a8c84c /searchcore/src/tests/proton/documentdb/document_subdbs | |
parent | 6fe9751702a2ccbe431944d36dc6fae339e093ab (diff) |
Wire in for live reconfiguration of DocumentStore.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/document_subdbs')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
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 b14eb9051d0..cd88666662e 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 @@ -262,25 +262,26 @@ struct MyConfigSnapshot Schema _schema; DocBuilder _builder; DocumentDBConfig::SP _cfg; + BootstrapConfig::SP _bootstrap; MyConfigSnapshot(const Schema &schema, const vespalib::string &cfgDir) : _schema(schema), _builder(_schema), - _cfg() + _cfg(), + _bootstrap() { DocumentDBConfig::DocumenttypesConfigSP documenttypesConfig (new DocumenttypesConfig(_builder.getDocumenttypesConfig())); TuneFileDocumentDB::SP tuneFileDocumentDB(new TuneFileDocumentDB()); - BootstrapConfig::SP bootstrap - (new BootstrapConfig(1, + _bootstrap = std::make_shared<BootstrapConfig>(1, documenttypesConfig, _builder.getDocumentTypeRepo(), std::make_shared<ProtonConfig>(), std::make_shared<FiledistributorrpcConfig>(), - tuneFileDocumentDB)); + tuneFileDocumentDB); config::DirSpec spec(cfgDir); DocumentDBConfigHelper mgr(spec, "searchdocument"); - mgr.forwardConfig(bootstrap); + mgr.forwardConfig(_bootstrap); mgr.nextGeneration(1); _cfg = mgr.getConfig(); } @@ -292,8 +293,8 @@ struct FixtureBase ExecutorThreadingService _writeService; ThreadStackExecutor _summaryExecutor; typename Traits::Config _cfg; - std::shared_ptr<BucketDBOwner> _bucketDB; - BucketDBHandler _bucketDBHandler; + std::shared_ptr<BucketDBOwner> _bucketDB; + BucketDBHandler _bucketDBHandler; typename Traits::Context _ctx; typename Traits::Schema _baseSchema; MyConfigSnapshot::UP _snapshot; @@ -354,12 +355,8 @@ struct FixtureBase cmpResult.documenttypesChanged = true; cmpResult.documentTypeRepoChanged = true; MyDocumentDBReferenceResolver resolver; - IReprocessingTask::List tasks = - _subDb.applyConfig(*newCfg->_cfg, - *_snapshot->_cfg, - serialNum, - ReconfigParams(cmpResult), - resolver); + auto tasks = _subDb.applyConfig(newCfg->_bootstrap->getProtonConfig(), *newCfg->_cfg, *_snapshot->_cfg, + serialNum, ReconfigParams(cmpResult), resolver); _snapshot = std::move(newCfg); if (!tasks.empty()) { ReprocessingRunner runner; |