diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-02-06 18:57:47 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-02-06 18:57:47 +0100 |
commit | 70d7c0795a395e71442088868b63166720788f50 (patch) | |
tree | 200aa554b3fbcb52d6fb4f07f9b0c61a255ba52d /searchcore | |
parent | 5337bc72e789586875f4732950841c9720eaff5b (diff) |
Move asserts that are only valid when attribute manager should change.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp index f3b83e08546..a934a445470 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp @@ -202,14 +202,14 @@ SearchableDocSubDBConfigurer::reconfigure(const DocumentDBConfig &newConfig, bool shouldMatchViewChange = prepared_reconfig.has_matchers_changed(); bool shouldSearchViewChange = false; bool shouldFeedViewChange = params.shouldSchemaChange(); - auto& attr_spec_serial_num = attrSpec.getCurrentSerialNum(); - assert(!attr_spec_serial_num.has_value() || attr_spec_serial_num.value() == serial_num); SearchView::SP searchView = _searchView.get(); auto matchers = prepared_reconfig.matchers(); IReprocessingInitializer::UP initializer; IAttributeManager::SP attrMgr = searchView->getAttributeManager(); IAttributeWriter::SP attrWriter = _feedView.get()->getAttributeWriter(); if (params.shouldAttributeManagerChange()) { + auto attr_spec_serial_num = attrSpec.getCurrentSerialNum(); + assert(!attr_spec_serial_num.has_value() || attr_spec_serial_num.value() == serial_num); IAttributeManager::SP newAttrMgr = attrMgr->create(std::move(attrSpec)); newAttrMgr->setImportedAttributes(resolver.resolve(*newAttrMgr, *attrMgr, searchView->getDocumentMetaStore(), |