summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-10-30 15:16:00 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-10-30 15:45:02 +0100
commit340868dd141c0ffe413d151a021b4a8d54cddc0c (patch)
tree0b5890fe06f6a81975d586042469f08cd01ae426 /searchcore
parent0ed0cb858ea09522f05669b2d9e211c5bf8738fb (diff)
FeedView has not used SearchView since we had support for the remove
batch feed operation which contained a query.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp36
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp6
4 files changed, 13 insertions, 50 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 4d15dd6209e..cb7fccea50f 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -443,11 +443,7 @@ TEST_F("require that we can reconfigure index searchable", Fixture)
}
{ // verify feed view
FeedViewComparer cmp(o.fv, n.fv);
- cmp.expect_not_equal();
- cmp.expect_equal_index_adapter();
- cmp.expect_equal_attribute_writer();
- cmp.expect_equal_summary_adapter();
- cmp.expect_equal_schema();
+ cmp.expect_equal();
}
}
@@ -601,11 +597,7 @@ TEST_F("require that we can reconfigure matchers", Fixture)
}
{ // verify feed view
FeedViewComparer cmp(o.fv, n.fv);
- cmp.expect_not_equal();
- cmp.expect_equal_index_adapter();
- cmp.expect_equal_attribute_writer();
- cmp.expect_equal_summary_adapter();
- cmp.expect_equal_schema();
+ cmp.expect_equal();
}
}
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 d7ef4bf98bd..7a15d7122c6 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
@@ -26,36 +26,21 @@ using matching::OnnxModels;
typedef AttributeReprocessingInitializer::Config ARIConfig;
void
-SearchableDocSubDBConfigurer::reconfigureFeedView(const SearchView::SP &searchView)
-{
- SearchableFeedView::SP curr = _feedView.get();
- reconfigureFeedView(curr->getIndexWriter(),
- curr->getSummaryAdapter(),
- curr->getAttributeWriter(),
- curr->getSchema(),
- curr->getDocumentTypeRepo(),
- searchView);
-}
-
-void
-SearchableDocSubDBConfigurer::reconfigureFeedView(const IIndexWriter::SP &indexWriter,
- const ISummaryAdapter::SP &summaryAdapter,
- IAttributeWriter::SP attrWriter,
+SearchableDocSubDBConfigurer::reconfigureFeedView(IAttributeWriter::SP attrWriter,
const Schema::SP &schema,
- const std::shared_ptr<const DocumentTypeRepo> &repo,
- const SearchView::SP &searchView)
+ const std::shared_ptr<const DocumentTypeRepo> &repo)
{
SearchableFeedView::SP curr = _feedView.get();
_feedView.set(std::make_shared<SearchableFeedView>(
- StoreOnlyFeedView::Context(summaryAdapter,
+ StoreOnlyFeedView::Context(curr->getSummaryAdapter(),
schema,
- searchView->getDocumentMetaStore(),
+ curr->getDocumentMetaStore(),
curr->getGidToLidChangeHandler(),
repo,
curr->getWriteService()),
curr->getPersistentParams(),
FastAccessFeedView::Context(std::move(attrWriter), curr->getDocIdLimit()),
- SearchableFeedView::Context(indexWriter)));
+ SearchableFeedView::Context(curr->getIndexWriter())));
}
void
@@ -144,8 +129,6 @@ SearchableDocSubDBConfigurer::reconfigureIndexSearchable()
const IIndexWriter::SP &indexWriter = feedView->getIndexWriter();
const searchcorespi::IIndexManager::SP &indexManager = indexWriter->getIndexManager();
reconfigureMatchView(indexManager->getSearchable());
- const SearchView::SP searchView(_searchView.get());
- reconfigureFeedView(searchView);
}
void
@@ -246,7 +229,6 @@ SearchableDocSubDBConfigurer::reconfigure(const DocumentDBConfig &newConfig,
IndexSearchable::SP indexSearchable = searchView->getIndexSearchable();
reconfigureMatchView(matchers, indexSearchable, attrMgr);
searchView = _searchView.get();
- shouldFeedViewChange = true;
}
if (shouldSearchViewChange) {
@@ -254,13 +236,9 @@ SearchableDocSubDBConfigurer::reconfigure(const DocumentDBConfig &newConfig,
}
if (shouldFeedViewChange) {
- SearchableFeedView::SP curr = _feedView.get();
- reconfigureFeedView(curr->getIndexWriter(),
- curr->getSummaryAdapter(),
- std::move(attrWriter),
+ reconfigureFeedView(std::move(attrWriter),
newConfig.getSchemaSP(),
- newConfig.getDocumentTypeRepoSP(),
- searchView);
+ newConfig.getDocumentTypeRepoSP());
}
return initializer;
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
index b9e97320025..6fe0826d578 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
@@ -45,14 +45,9 @@ private:
vespalib::string _subDbName;
uint32_t _distributionKey;
- void reconfigureFeedView(const SearchView::SP &searchView);
-
- void reconfigureFeedView(const IIndexWriter::SP &indexWriter,
- const ISummaryAdapter::SP &summaryAdapter,
- IAttributeWriter::SP attrWriter,
+ void reconfigureFeedView(IAttributeWriter::SP attrWriter,
const search::index::Schema::SP &schema,
- const std::shared_ptr<const document::DocumentTypeRepo> &repo,
- const SearchView::SP &searchView);
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo);
void reconfigureMatchView(const searchcorespi::IndexSearchable::SP &indexSearchable);
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
index 5cf72854b38..7f2b8fcaa63 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
@@ -240,9 +240,8 @@ SearchableDocSubDB::initFeedView(IAttributeWriter::SP attrWriter,
/**
* Handle reconfigure caused by index manager changing state.
*
- * Flush engine is disabled (for all document dbs) during initial replay and
- * recovery feed modes, the flush engine has not started. For a resurrected
- * document type, flushing might occur during replay.
+ * Flush engine is disabled (for all document dbs) during initial replay, the
+ * flush engine has not started.
*/
bool
SearchableDocSubDB::reconfigure(vespalib::Closure0<bool>::UP closure)
@@ -254,7 +253,6 @@ SearchableDocSubDB::reconfigure(vespalib::Closure0<bool>::UP closure)
// Everything should be quiet now.
SearchView::SP oldSearchView = _rSearchView.get();
- IFeedView::SP oldFeedView = _iFeedView.get();
bool ret = true;