diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-02-02 15:29:14 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-02-02 15:29:14 +0100 |
commit | 87d33539cb73454743cbe901e82a6915f958b277 (patch) | |
tree | c1a6d0fea727ce246972e9499e6575b3fc505bb4 /searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp | |
parent | 0d5d8e73867e44e84e97e8f5b70069e613f5643a (diff) |
Add prepare_reconfig member function to FastAccessDocSubDBConfigurer
and SearchableDocSubDBConfigurer.
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp index 4b66a340a03..3e2bd4f520a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp @@ -2,6 +2,7 @@ #include "fast_access_doc_subdb.h" #include "attribute_writer_factory.h" +#include "document_subdb_reconfig.h" #include "emptysearchview.h" #include "fast_access_document_retriever.h" #include "document_subdb_initializer.h" @@ -242,9 +243,15 @@ FastAccessDocSubDB::initViews(const DocumentDBConfig &configSnapshot) } } +std::unique_ptr<const DocumentSubDBReconfig> +FastAccessDocSubDB::prepare_reconfig(const DocumentDBConfig& new_config_snapshot, const DocumentDBConfig& old_config_snapshot, const ReconfigParams& reconfig_params) +{ + return _configurer.prepare_reconfig(new_config_snapshot, old_config_snapshot, reconfig_params); +} + IReprocessingTask::List FastAccessDocSubDB::applyConfig(const DocumentDBConfig &newConfigSnapshot, const DocumentDBConfig &oldConfigSnapshot, - SerialNum serialNum, const ReconfigParams ¶ms, IDocumentDBReferenceResolver &, const DocumentSubDBReconfig&) + SerialNum serialNum, const ReconfigParams ¶ms, IDocumentDBReferenceResolver &, const DocumentSubDBReconfig& prepared_reconfig) { AllocStrategy alloc_strategy = newConfigSnapshot.get_alloc_config().make_alloc_strategy(_subDbType); reconfigure(newConfigSnapshot.getStoreConfig(), alloc_strategy); @@ -263,7 +270,7 @@ FastAccessDocSubDB::applyConfig(const DocumentDBConfig &newConfigSnapshot, const std::unique_ptr<AttributeCollectionSpec> attrSpec = createAttributeSpec(newConfigSnapshot.getAttributesConfig(), alloc_strategy, serialNum); IReprocessingInitializer::UP initializer = - _configurer.reconfigure(newConfigSnapshot, oldConfigSnapshot, std::move(*attrSpec)); + _configurer.reconfigure(newConfigSnapshot, oldConfigSnapshot, std::move(*attrSpec), prepared_reconfig); if (initializer->hasReprocessors()) { tasks.push_back(IReprocessingTask::SP(createReprocessingTask(*initializer, newConfigSnapshot.getDocumentTypeRepoSP()).release())); |