summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-03-17 13:08:10 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-03-17 13:08:10 +0000
commit8b8d2fd29f88296fc6b50074e9de7c6a237a6c4c (patch)
tree3e45292d420b8c9c28b2392f398826f29fe248c0 /searchcore
parentd5075caaad0423f2057e7945e8087e87d733eb47 (diff)
Reduce arguments to wipe history method in index maintainer.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h2
12 files changed, 12 insertions, 16 deletions
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index 27a2706aae8..77d52d46cb4 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -702,8 +702,7 @@ TEST_F("require that wipeHistory updates schema on disk", Fixture) {
s.loadFromFile("test_data/index.flush.1/schema.txt");
EXPECT_EQUAL(1u, s.getNumIndexFields());
- f.runAsMaster([&]() { f._index_manager->wipeHistory(f._serial_num,
- empty_schema); });
+ f.runAsMaster([&]() { f._index_manager->wipeHistory(f._serial_num); });
s.loadFromFile("test_data/index.flush.1/schema.txt");
EXPECT_EQUAL(0u, s.getNumIndexFields());
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
index face9aefac4..b28df9fa02c 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
@@ -118,8 +118,8 @@ public:
_maintainer.setSchema(schema);
}
- virtual void wipeHistory(SerialNum wipeSerial, const Schema &historyFields) {
- _maintainer.wipeHistory(wipeSerial, historyFields);
+ virtual void wipeHistory(SerialNum wipeSerial) {
+ _maintainer.wipeHistory(wipeSerial);
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 79529285706..ff1724c30e8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -1017,7 +1017,7 @@ DocumentDB::internalWipeHistory(SerialNum wipeSerial,
const Schema &wipeSchema)
{
// Called by executor thread
- _subDBs.wipeHistory(wipeSerial, *newHistorySchema, wipeSchema);
+ _subDBs.wipeHistory(wipeSerial, wipeSchema);
_historySchema.reset(newHistorySchema.release());
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
index 42f23fa7cf5..5582571ba74 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
@@ -247,11 +247,10 @@ DocumentSubDBCollection::getNewestFlushedSerial()
void
DocumentSubDBCollection::wipeHistory(SerialNum wipeSerial,
- const Schema &newHistorySchema,
const Schema &wipeSchema)
{
for (auto subDb : _subDBs) {
- subDb->wipeHistory(wipeSerial, newHistorySchema, wipeSchema);
+ subDb->wipeHistory(wipeSerial, wipeSchema);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
index 18d073f60e2..cc856fbc4aa 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
@@ -111,7 +111,6 @@ public:
void
wipeHistory(SerialNum wipeSerial,
- const search::index::Schema &newHistorySchema,
const search::index::Schema &wipeSchema);
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
index 30887691900..075e1068690 100644
--- a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
@@ -122,7 +122,7 @@ public:
* last part of transaction log.
*/
virtual SerialNum getNewestFlushedSerial() = 0;
- virtual void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) = 0;
+ virtual void wipeHistory(SerialNum wipeSerial, const Schema &wipeSchema) = 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 8fbbc7d3031..0c63b2d32e6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
@@ -298,13 +298,12 @@ SearchableDocSubDB::getFlushTargetsInternal()
void
SearchableDocSubDB::wipeHistory(SerialNum wipeSerial,
- const Schema &newHistorySchema,
const Schema &wipeSchema)
{
assert(_writeService.master().isCurrentThread());
SearchView::SP oldSearchView = _rSearchView.get();
IFeedView::SP oldFeedView = _iFeedView.get();
- _indexMgr->wipeHistory(wipeSerial, newHistorySchema);
+ _indexMgr->wipeHistory(wipeSerial);
reconfigureIndexSearchable();
getAttributeManager()->wipeHistory(wipeSchema);
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index 5462a25f75e..5d4bdd9e64c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -154,7 +154,7 @@ public:
SerialNum getOldestFlushedSerial() override;
SerialNum getNewestFlushedSerial() override;
- void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) override;
+ void wipeHistory(SerialNum wipeSerial, const Schema &wipeSchema) override;
void setIndexSchema(const Schema::SP &schema) override;
size_t getNumActiveDocs() const override;
search::SearchableStats getSearchableStats() const override ;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index 22f4ee0b6f2..e1ed63dc8d8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -458,7 +458,7 @@ StoreOnlyDocSubDB::getIndexWriter() const
}
void
-StoreOnlyDocSubDB::wipeHistory(SerialNum, const Schema &, const Schema &)
+StoreOnlyDocSubDB::wipeHistory(SerialNum, const Schema &)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
index 93cc0e181e3..53dcb51643b 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
@@ -249,7 +249,7 @@ public:
SerialNum getOldestFlushedSerial() override;
SerialNum getNewestFlushedSerial() override;
- void wipeHistory(SerialNum wipeSerial, const Schema &newHistorySchema, const Schema &wipeSchema) override;
+ void wipeHistory(SerialNum wipeSerial, const Schema &wipeSchema) override;
void setIndexSchema(const Schema::SP &schema) override;
search::SearchableStats getSearchableStats() const override;
IDocumentRetriever::UP getDocumentRetriever() 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 eeef8f46d11..05c63a4ef48 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
@@ -81,7 +81,7 @@ struct DummyDocumentSubDb : public IDocumentSubDB
void onReprocessDone(SerialNum) override { }
SerialNum getOldestFlushedSerial() override { return 0; }
SerialNum getNewestFlushedSerial() override { return 0; }
- void wipeHistory(SerialNum, const Schema &, const Schema &) override { }
+ void wipeHistory(SerialNum, const Schema &) 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 242cca7c974..b40b15eb429 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
@@ -27,7 +27,7 @@ struct MockIndexManager : public IIndexManager
return searchcorespi::IFlushTarget::List();
}
virtual void setSchema(const Schema &) override {}
- virtual void wipeHistory(SerialNum, const Schema &) override {}
+ virtual void wipeHistory(SerialNum) override {}
virtual void heartBeat(SerialNum) override {}
};