summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-03-17 11:13:24 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-03-17 11:13:24 +0000
commit4e6777f02b47a9da44ea7b86cd58cb88fb93f253 (patch)
treeb91b958db826f42b1eaeb858225fceaf8880fba2 /searchcore
parentb09d7deb64e5a723c5a052dd2b1db225f632405f (diff)
Remove union based fusion schema. It was used to keep data for removed
indexed fields in old documents intact until history was wiped, in case the user wanted to revert the config change.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp2
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/schemautil.cpp53
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/schemautil.h7
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp13
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h2
22 files changed, 17 insertions, 116 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index a8c6cd885a2..60f04bb0fa7 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -188,7 +188,7 @@ Fixture::initViewSet(ViewSet &views)
{
Matchers::SP matchers(new Matchers(_clock, _queryLimiter, _constantValueRepo));
IndexManager::SP indexMgr(new IndexManager(BASE_DIR, searchcorespi::index::WarmupConfig(),
- 2, 0, Schema(), Schema(), views._reconfigurer,
+ 2, 0, Schema(), views._reconfigurer,
views._writeService, _summaryExecutor, TuneFileIndexManager(),
TuneFileAttributes(), views._fileHeaderContext));
AttributeManager::SP attrMgr(new AttributeManager(BASE_DIR,
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 841e7632730..5110d92ce6a 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
@@ -323,11 +323,9 @@ struct FixtureBase
test::runInMaster(_writeService, func);
}
void init() {
- Schema::SP unionSchema(new Schema());
DocumentSubDbInitializer::SP task =
_subDb.createInitializer(*_snapshot->_cfg,
Traits::configSerial(),
- unionSchema,
ProtonConfig::Summary(),
ProtonConfig::Index());
vespalib::ThreadStackExecutor executor(1, 1024 * 1024);
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index ca53364f1b5..27a2706aae8 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -174,7 +174,7 @@ Document::UP Fixture::addDocument(uint32_t id) {
void Fixture::resetIndexManager() {
_index_manager.reset(0);
_index_manager.reset(
- new IndexManager(index_dir, searchcorespi::index::WarmupConfig(), 2, 0, getSchema(), getSchema(),
+ new IndexManager(index_dir, searchcorespi::index::WarmupConfig(), 2, 0, getSchema(),
_reconfigurer, _writeService, _writeService.getMasterExecutor(),
TuneFileIndexManager(), TuneFileAttributes(),
_fileHeaderContext));
@@ -694,8 +694,7 @@ TEST_F("require that wipeHistory updates schema on disk", Fixture) {
Schema empty_schema;
f.addDocument(docid);
f.flushIndexManager();
- f.runAsMaster([&]() { f._index_manager->setSchema(empty_schema,
- empty_schema); });
+ f.runAsMaster([&]() { f._index_manager->setSchema(empty_schema); });
f.addDocument(docid);
f.flushIndexManager();
diff --git a/searchcore/src/vespa/searchcore/proton/common/schemautil.cpp b/searchcore/src/vespa/searchcore/proton/common/schemautil.cpp
index e28fe0d2290..2fcf4a11c9b 100644
--- a/searchcore/src/vespa/searchcore/proton/common/schemautil.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/schemautil.cpp
@@ -145,59 +145,6 @@ SchemaUtil::makeHistorySchema(const Schema &newSchema,
}
-Schema::SP
-SchemaUtil::makeUnionSchema(const Schema &schema,
- const Schema &history)
-{
- Schema::SP uSchema(new Schema);
- *uSchema = schema;
- uint32_t fields = history.getNumIndexFields();
- for (uint32_t fieldId = 0; fieldId < fields; ++fieldId) {
- const Schema::IndexField &field = history.getIndexField(fieldId);
- uint32_t uFieldId = uSchema->getIndexFieldId(field.getName());
- if (uFieldId == Schema::UNKNOWN_FIELD_ID) {
- // Add back field known by history.
- uSchema->addIndexField(field);
- } else {
- LOG(error,
- "Index field '%s' is in both schema and history",
- field.getName().c_str());
- }
- }
- fields = history.getNumAttributeFields();
- for (uint32_t fieldId = 0; fieldId < fields; ++fieldId) {
- const Schema::AttributeField &field =
- history.getAttributeField(fieldId);
- uint32_t uFieldId =
- uSchema->getAttributeFieldId(field.getName());
- if (uFieldId == Schema::UNKNOWN_FIELD_ID) {
- // Add back field known by history.
- uSchema->addAttributeField(field);
- } else {
- LOG(error,
- "Attribute field '%s' is in both schema and history",
- field.getName().c_str());
- }
- }
- fields = history.getNumSummaryFields();
- for (uint32_t fieldId = 0; fieldId < fields; ++fieldId) {
- const Schema::SummaryField &field =
- history.getSummaryField(fieldId);
- uint32_t uFieldId =
- uSchema->getSummaryFieldId(field.getName());
- if (uFieldId == Schema::UNKNOWN_FIELD_ID) {
- // Add back field known by history.
- uSchema->addSummaryField(field);
- } else {
- LOG(error,
- "Summary field '%s' is in both schema and history",
- field.getName().c_str());
- }
- }
- return uSchema;
-}
-
-
void
SchemaUtil::listSchema(const Schema &schema,
std::vector<vespalib::string> &fieldNames,
diff --git a/searchcore/src/vespa/searchcore/proton/common/schemautil.h b/searchcore/src/vespa/searchcore/proton/common/schemautil.h
index bf276ac49e6..36cc952f921 100644
--- a/searchcore/src/vespa/searchcore/proton/common/schemautil.h
+++ b/searchcore/src/vespa/searchcore/proton/common/schemautil.h
@@ -26,13 +26,6 @@ public:
int64_t timestamp);
/**
- * Make union of schema and history, suitable for index fusion.
- */
- static search::index::Schema::SP
- makeUnionSchema(const search::index::Schema &schema,
- const search::index::Schema &history);
-
- /**
* Iterate through the given schema and fill out the given string vectors.
*/
static void
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
index 28567100dea..e7bd37d5f1f 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
@@ -15,7 +15,6 @@ IndexManagerInitializer(const vespalib::string &baseDir,
size_t maxFlushed,
size_t cacheSize,
const search::index::Schema &schema,
- const search::index::Schema &fusionSchema,
searchcorespi::IIndexManager::Reconfigurer & reconfigurer,
searchcorespi::index::IThreadingService & threadingService,
vespalib::ThreadExecutor & warmupExecutor,
@@ -28,7 +27,6 @@ IndexManagerInitializer(const vespalib::string &baseDir,
_maxFlushed(maxFlushed),
_cacheSize(cacheSize),
_schema(schema),
- _fusionSchema(fusionSchema),
_reconfigurer(reconfigurer),
_threadingService(threadingService),
_warmupExecutor(warmupExecutor),
@@ -52,7 +50,6 @@ IndexManagerInitializer::run()
_maxFlushed,
_cacheSize,
_schema,
- _fusionSchema,
_reconfigurer,
_threadingService,
_warmupExecutor,
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
index 056a63c1299..1bf6a13ce49 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
+++ b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
@@ -20,7 +20,6 @@ class IndexManagerInitializer : public initializer::InitializerTask
size_t _maxFlushed;
size_t _cacheSize;
const search::index::Schema _schema;
- const search::index::Schema _fusionSchema;
searchcorespi::IIndexManager::Reconfigurer &_reconfigurer;
searchcorespi::index::IThreadingService &_threadingService;
vespalib::ThreadExecutor &_warmupExecutor;
@@ -35,7 +34,6 @@ public:
size_t maxFlushed,
size_t cacheSize,
const search::index::Schema &schema,
- const search::index::Schema &fusionSchema,
searchcorespi::IIndexManager::Reconfigurer & reconfigurer,
searchcorespi::index::IThreadingService & threadingService,
vespalib::ThreadExecutor & warmupExecutor,
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
index 7e9aa2436b1..9e754432251 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
@@ -86,7 +86,6 @@ IndexManager::IndexManager(const vespalib::string &baseDir,
const size_t maxFlushed,
const size_t cacheSize,
const Schema &schema,
- const Schema &fusionSchema,
Reconfigurer &reconfigurer,
IThreadingService &threadingService,
vespalib::ThreadExecutor & warmupExecutor,
@@ -99,7 +98,6 @@ IndexManager::IndexManager(const vespalib::string &baseDir,
warmup,
maxFlushed,
schema,
- fusionSchema,
tuneFileAttributes),
IndexMaintainerContext(threadingService,
reconfigurer,
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
index f81c949d8b3..face9aefac4 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
@@ -61,7 +61,6 @@ public:
size_t maxFlushed,
size_t cacheSize,
const Schema &schema,
- const Schema &fusionSchema,
Reconfigurer &reconfigurer,
searchcorespi::index::IThreadingService &threadingService,
vespalib::ThreadExecutor & warmupExecutor,
@@ -115,8 +114,8 @@ public:
return _maintainer.getFlushTargets();
}
- virtual void setSchema(const Schema &schema, const Schema &fusionSchema) {
- _maintainer.setSchema(schema, fusionSchema);
+ virtual void setSchema(const Schema &schema) {
+ _maintainer.setSchema(schema);
}
virtual void wipeHistory(SerialNum wipeSerial, const Schema &historyFields) {
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 547c269dc68..79529285706 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -146,7 +146,6 @@ DocumentDB::DocumentDB(const vespalib::string &baseDir,
*this,
tlsDirectWriter),
_historySchema(),
- _unionSchema(),
_subDBs(*this,
*this,
_feedHandler,
@@ -287,7 +286,7 @@ DocumentDB::initManagers()
_initConfigSnapshot.reset();
InitializerTask::SP rootTask =
_subDBs.createInitializer(*configSnapshot, _initConfigSerialNum,
- _unionSchema, _protonSummaryCfg,
+ _protonSummaryCfg,
_protonIndexCfg);
InitializeThreads initializeThreads = _initializeThreads;
_initializeThreads.reset();
@@ -558,7 +557,6 @@ DocumentDB::reconfigureSchema(const DocumentDBConfig &configSnapshot,
Schema::SP oldHistory = _historySchema;
_historySchema =
SchemaUtil::makeHistorySchema(newSchema, oldSchema, *oldHistory);
- _unionSchema = SchemaUtil::makeUnionSchema(newSchema, *_historySchema);
}
@@ -878,8 +876,7 @@ void
DocumentDB::setIndexSchema(const DocumentDBConfig &configSnapshot)
{
// Called by executor thread
- _subDBs.getReadySubDB()->setIndexSchema(configSnapshot.getSchemaSP(),
- _unionSchema);
+ _subDBs.getReadySubDB()->setIndexSchema(configSnapshot.getSchemaSP());
// TODO: Adjust tune.
}
@@ -1022,7 +1019,6 @@ DocumentDB::internalWipeHistory(SerialNum wipeSerial,
// Called by executor thread
_subDBs.wipeHistory(wipeSerial, *newHistorySchema, wipeSchema);
_historySchema.reset(newHistorySchema.release());
- _unionSchema = getActiveConfig()->getSchemaSP();
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index a4b2bfb3da5..43509cde8e3 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -142,8 +142,6 @@ private:
// Members only accessed by executor thread
// (+ ctor and after executor stops)
Schema::SP _historySchema; // Removed fields
- // current schema + _historySchema
- Schema::SP _unionSchema;
// End members only accessed by executor thread.
DocumentSubDBCollection _subDBs;
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
index 293c024081e..42f23fa7cf5 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
@@ -169,7 +169,6 @@ void DocumentSubDBCollection::maintenanceSync(MaintenanceController &mc,
initializer::InitializerTask::SP
DocumentSubDBCollection::createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const ProtonConfig::Summary & protonSummaryCfg,
const ProtonConfig::Index & indexCfg)
{
@@ -179,7 +178,6 @@ DocumentSubDBCollection::createInitializer(const DocumentDBConfig &configSnapsho
DocumentSubDbInitializer::SP
subTask(subDb->createInitializer(configSnapshot,
configSerialNum,
- unionSchema,
protonSummaryCfg,
indexCfg));
task->add(subTask);
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
index b63d78eb378..18d073f60e2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
@@ -96,7 +96,6 @@ public:
initializer::InitializerTask::SP
createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const search::index::Schema::SP &unionSchema,
const vespa::config::search::core::ProtonConfig::Summary &protonSummaryCfg,
const vespa::config::search::core::ProtonConfig::Index & indexCfg);
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 209e9baf280..5accabf7a12 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
@@ -208,11 +208,10 @@ FastAccessDocSubDB::~FastAccessDocSubDB() { }
DocumentSubDbInitializer::UP
FastAccessDocSubDB::createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const search::index::Schema::SP &unionSchema,
const vespa::config::search::core::ProtonConfig::Summary &protonSummaryCfg,
const vespa::config::search::core::ProtonConfig::Index &indexCfg) const
{
- auto result = Parent::createInitializer(configSnapshot, configSerialNum, unionSchema, protonSummaryCfg, indexCfg);
+ auto result = Parent::createInitializer(configSnapshot, configSerialNum, protonSummaryCfg, indexCfg);
auto attrMgrInitTask = createAttributeManagerInitializer(configSnapshot,
configSerialNum,
result->getDocumentMetaStoreInitTask(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
index 0b2764d014e..2897fd3e3e5 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
@@ -104,7 +104,6 @@ public:
virtual std::unique_ptr<DocumentSubDbInitializer>
createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const ProtonConfig::Summary &protonSummaryCfg,
const ProtonConfig::Index &indexCfg) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
index 950a9b0da8f..30887691900 100644
--- a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
@@ -78,7 +78,7 @@ public:
virtual vespalib::string getName() const = 0;
virtual std::unique_ptr<DocumentSubDbInitializer>
- createInitializer(const DocumentDBConfig &configSnapshot, SerialNum configSerialNum, const SchemaSP &unionSchema,
+ createInitializer(const DocumentDBConfig &configSnapshot, SerialNum configSerialNum,
const ProtonConfig::Summary &protonSummaryCfg, const ProtonConfig::Index &indexCfg) const = 0;
// Called by master thread
@@ -123,7 +123,7 @@ public:
*/
virtual SerialNum getNewestFlushedSerial() = 0;
virtual void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) = 0;
- virtual void setIndexSchema(const SchemaSP &schema, const SchemaSP &fusionSchema) = 0;
+ virtual void setIndexSchema(const SchemaSP &schema) = 0;
virtual search::SearchableStats getSearchableStats() const = 0;
virtual std::unique_ptr<IDocumentRetriever> getDocumentRetriever() = 0;
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
index 30e5beb0a00..8fbbc7d3031 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
@@ -28,9 +28,6 @@ using search::GrowStrategy;
using search::TuneFileDocumentDB;
using search::index::Schema;
using search::SerialNum;
-using searchcorespi::IndexManagerConfig;
-using searchcorespi::index::IndexMaintainerConfig;
-using searchcorespi::index::IndexMaintainerContext;
using vespalib::IllegalStateException;
using vespalib::ThreadStackExecutorBase;
using namespace searchcorespi;
@@ -88,7 +85,6 @@ SearchableDocSubDB::getNewestFlushedSerial()
initializer::InitializerTask::SP
SearchableDocSubDB::
createIndexManagerInitializer(const DocumentDBConfig &configSnapshot,
- const Schema::SP &unionSchema,
const ProtonConfig::Index &indexCfg,
std::shared_ptr<searchcorespi::IIndexManager::SP> indexManager) const
{
@@ -101,7 +97,6 @@ createIndexManagerInitializer(const DocumentDBConfig &configSnapshot,
indexCfg.maxflushed,
indexCfg.cache.size,
*schema,
- *unionSchema,
const_cast<SearchableDocSubDB &>(*this),
_writeService,
_warmupExecutor,
@@ -123,17 +118,14 @@ DocumentSubDbInitializer::UP
SearchableDocSubDB::
createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const ProtonConfig::Summary &protonSummaryCfg,
const ProtonConfig::Index &indexCfg) const
{
auto result = Parent::createInitializer(configSnapshot,
configSerialNum,
- unionSchema,
protonSummaryCfg,
indexCfg);
auto indexTask = createIndexManagerInitializer(configSnapshot,
- unionSchema,
indexCfg,
result->writableResult().
writableIndexManager());
@@ -318,15 +310,14 @@ SearchableDocSubDB::wipeHistory(SerialNum wipeSerial,
}
void
-SearchableDocSubDB::setIndexSchema(const Schema::SP &schema,
- const Schema::SP &fusionSchema)
+SearchableDocSubDB::setIndexSchema(const Schema::SP &schema)
{
assert(_writeService.master().isCurrentThread());
SearchView::SP oldSearchView = _rSearchView.get();
IFeedView::SP oldFeedView = _iFeedView.get();
- _indexMgr->setSchema(*schema, *fusionSchema);
+ _indexMgr->setSchema(*schema);
reconfigureIndexSearchable();
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index 489d9b5a5ce..5462a25f75e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -89,7 +89,6 @@ private:
// Note: lifetime of indexManager must be handled by caller.
std::shared_ptr<initializer::InitializerTask>
createIndexManagerInitializer(const DocumentDBConfig &configSnapshot,
- const search::index::Schema::SP &unionSchema,
const vespa::config::search::core::ProtonConfig::Index &indexCfg,
std::shared_ptr<searchcorespi::IIndexManager::SP> indexManager) const;
@@ -116,7 +115,6 @@ public:
std::unique_ptr<DocumentSubDbInitializer>
createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const vespa::config::search::core::
ProtonConfig::Summary &protonSummaryCfg,
const vespa::config::search::core::
@@ -157,7 +155,7 @@ public:
SerialNum getOldestFlushedSerial() override;
SerialNum getNewestFlushedSerial() override;
void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) override;
- void setIndexSchema(const Schema::SP &schema, const Schema::SP &fusionSchema) override;
+ void setIndexSchema(const Schema::SP &schema) override;
size_t getNumActiveDocs() const override;
search::SearchableStats getSearchableStats() const override ;
IDocumentRetriever::UP getDocumentRetriever() override;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index 35ae864b7e1..22f4ee0b6f2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -285,12 +285,10 @@ StoreOnlyDocSubDB::setupDocumentMetaStore(DocumentMetaStoreInitializerResult::SP
DocumentSubDbInitializer::UP
StoreOnlyDocSubDB::createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const ProtonConfig::Summary &
protonSummaryCfg,
const ProtonConfig::Index &indexCfg) const
{
- (void) unionSchema;
(void) configSerialNum;
(void) indexCfg;
auto result = std::make_unique<DocumentSubDbInitializer>
@@ -465,12 +463,10 @@ StoreOnlyDocSubDB::wipeHistory(SerialNum, const Schema &, const Schema &)
}
void
-StoreOnlyDocSubDB::setIndexSchema(const Schema::SP &schema,
- const Schema::SP &fusionSchema)
+StoreOnlyDocSubDB::setIndexSchema(const Schema::SP &schema)
{
assert(_writeService.master().isCurrentThread());
(void) schema;
- (void) fusionSchema;
}
search::SearchableStats
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
index 69b46cd4ead..93cc0e181e3 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
@@ -208,7 +208,6 @@ public:
std::unique_ptr<DocumentSubDbInitializer>
createInitializer(const DocumentDBConfig &configSnapshot,
SerialNum configSerialNum,
- const Schema::SP &unionSchema,
const ProtonConfig::Summary &protonSummaryCfg,
const ProtonConfig::Index &indexCfg) const override;
@@ -251,7 +250,7 @@ public:
SerialNum getNewestFlushedSerial() override;
void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) override;
- void setIndexSchema(const Schema::SP &schema, const Schema::SP &fusionSchema) override;
+ void setIndexSchema(const Schema::SP &schema) override;
search::SearchableStats getSearchableStats() const override;
IDocumentRetriever::UP getDocumentRetriever() override;
matching::MatchingStats getMatcherStats(const vespalib::string &rankProfile) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
index 01b64c245d5..eeef8f46d11 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
@@ -46,7 +46,6 @@ struct DummyDocumentSubDb : public IDocumentSubDB
DocumentSubDbInitializer::UP
createInitializer(const DocumentDBConfig &,
SerialNum,
- const Schema::SP &,
const vespa::config::search::core::ProtonConfig::
Summary &,
const vespa::config::search::core::
@@ -83,7 +82,7 @@ struct DummyDocumentSubDb : public IDocumentSubDB
SerialNum getOldestFlushedSerial() override { return 0; }
SerialNum getNewestFlushedSerial() override { return 0; }
void wipeHistory(SerialNum, const Schema &, const Schema &) override { }
- void setIndexSchema(const Schema::SP &, const Schema::SP &) override { }
+ void setIndexSchema(const Schema::SP &) override { }
search::SearchableStats getSearchableStats() const override {
return search::SearchableStats();
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
index c6fe10ffec2..242cca7c974 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
@@ -26,7 +26,7 @@ struct MockIndexManager : public IIndexManager
virtual searchcorespi::IFlushTarget::List getFlushTargets() override {
return searchcorespi::IFlushTarget::List();
}
- virtual void setSchema(const Schema &, const Schema &) override {}
+ virtual void setSchema(const Schema &) override {}
virtual void wipeHistory(SerialNum, const Schema &) override {}
virtual void heartBeat(SerialNum) override {}
};