diff options
13 files changed, 7 insertions, 52 deletions
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp index 618467fd966..620b4cb80bb 100644 --- a/searchcore/src/tests/proton/index/indexmanager_test.cpp +++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp @@ -712,18 +712,6 @@ TEST_F("require that setSchema updates schema on disk, wiping removed fields", F TEST_DO(expectSchemaIndexFields(0)); } -TEST_F("require that wipeHistory updates schema on disk", Fixture) -{ - Schema empty_schema; - f.addDocument(docid); - f.flushIndexManager(); - TEST_DO(expectSchemaIndexFields(1)); - f.runAsMaster([&]() { f._index_manager->setSchema(empty_schema, f._serial_num); }); - TEST_DO(expectSchemaIndexFields(1)); - f.runAsMaster([&]() { f._index_manager->wipeHistory(++f._serial_num); }); - TEST_DO(expectSchemaIndexFields(0)); -} - TEST_F("require that indexes manager stats can be generated", Fixture) { TEST_DO(f.assertStats(0, 1, 0, 0)); diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h index 7db5d954aa0..45e7b30b8f1 100644 --- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h +++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h @@ -114,10 +114,6 @@ public: virtual void setSchema(const Schema &schema, SerialNum serialNum) override { _maintainer.setSchema(schema, serialNum); } - - virtual void wipeHistory(SerialNum wipeSerial) override { - _maintainer.wipeHistory(wipeSerial); - } }; } // namespace proton 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 e51ceebdbce..70d5fa61737 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 @@ -144,6 +144,12 @@ FastAccessDocSubDB::getFlushTargetsInternal() } void +FastAccessDocSubDB::wipeHistory(SerialNum wipeSerial) +{ + getAttributeManager()->wipeHistory(wipeSerial); +} + +void FastAccessDocSubDB::reconfigureAttributeMetrics(const proton::IAttributeManager &newMgr, const proton::IAttributeManager &oldMgr) { 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 cd35d9204b1..2f1c56fab51 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 @@ -124,6 +124,7 @@ public: void onReprocessDone(SerialNum serialNum) override; SerialNum getOldestFlushedSerial() override; SerialNum getNewestFlushedSerial() override; + virtual void wipeHistory(SerialNum wipeSerial) override; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h index c481c05b421..02060fd6490 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h @@ -74,7 +74,6 @@ private: void triggerFlush(FRT_RPCRequest *req); void prepareRestart(FRT_RPCRequest *req); - void wipeHistory(FRT_RPCRequest * req); void enableSearching(FRT_RPCRequest * req); void disableSearching(FRT_RPCRequest * req); void checkState(StateArg::UP arg); @@ -116,7 +115,6 @@ public: void rpc_die(FRT_RPCRequest *req); void rpc_triggerFlush(FRT_RPCRequest *req); void rpc_prepareRestart(FRT_RPCRequest *req); - void rpc_wipeHistory(FRT_RPCRequest *req); void rpc_listDocTypes(FRT_RPCRequest *req); void rpc_listSchema(FRT_RPCRequest *req); void rpc_getConfigGeneration(FRT_RPCRequest *req); diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp index 6c3de875e22..2bba58f0522 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp @@ -298,17 +298,6 @@ SearchableDocSubDB::getFlushTargetsInternal() } void -SearchableDocSubDB::wipeHistory(SerialNum wipeSerial) -{ - assert(_writeService.master().isCurrentThread()); - SearchView::SP oldSearchView = _rSearchView.get(); - IFeedView::SP oldFeedView = _iFeedView.get(); - _indexMgr->wipeHistory(wipeSerial); - reconfigureIndexSearchable(); - getAttributeManager()->wipeHistory(wipeSerial); -} - -void SearchableDocSubDB::setIndexSchema(const Schema::SP &schema, SerialNum serialNum) { assert(_writeService.master().isCurrentThread()); diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h index 780295a7cc0..23f2ac2a8ac 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h @@ -155,7 +155,6 @@ public: SerialNum getOldestFlushedSerial() override; SerialNum getNewestFlushedSerial() override; - void wipeHistory(SerialNum wipeSerial) override; void setIndexSchema(const Schema::SP &schema, SerialNum serialNum) override; size_t getNumActiveDocs() const override; search::SearchableStats getSearchableStats() const override ; 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 07891c1ac66..e28d4f53e95 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,6 @@ struct MockIndexManager : public searchcorespi::IIndexManager return searchcorespi::IFlushTarget::List(); } virtual void setSchema(const Schema &, SerialNum) override {} - virtual void wipeHistory(SerialNum) override {} virtual void heartBeat(SerialNum) override {} }; diff --git a/searchcorespi/src/tests/plugin/plugin.cpp b/searchcorespi/src/tests/plugin/plugin.cpp index 839c026607c..f5e36cc17a3 100644 --- a/searchcorespi/src/tests/plugin/plugin.cpp +++ b/searchcorespi/src/tests/plugin/plugin.cpp @@ -35,7 +35,6 @@ public: return l; } virtual void setSchema(const Schema &, SerialNum) override { } - virtual void wipeHistory(SerialNum) override { } }; class IndexManagerFactory : public searchcorespi::IIndexManagerFactory diff --git a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.cpp b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.cpp index eb47aaf043e..01161f6f7a1 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.cpp @@ -3,12 +3,6 @@ namespace searchcorespi { -void -IIndexManager::wipeHistory(SerialNum wipeSerial) -{ - (void) wipeSerial; -} - IIndexManager::Reconfigurer::~Reconfigurer() { } diff --git a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h index c2976699edb..567a4b0b208 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h +++ b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h @@ -157,13 +157,6 @@ public: * @param schema The new schema to start using. **/ virtual void setSchema(const Schema &schema, SerialNum serialNum) = 0; - - /** - * Wipes remains of removed fields from this index manager. - * - * @param wipeSerial The serial number of this wipe operation. - **/ - virtual void wipeHistory(SerialNum wipeSerial); }; } // namespace searchcorespi diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index 795bf67f48e..1d0bd08ea98 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -1224,11 +1224,5 @@ IndexMaintainer::internalWipeHistory(const Schema &schema, SerialNum wipeSerial) } } -void -IndexMaintainer::wipeHistory(SerialNum wipeSerial) -{ - internalWipeHistory(getSchema(), wipeSerial); -} - } // namespace index } // namespace searchcorespi diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h index b8f5e668701..3d28bf72b94 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h @@ -383,7 +383,6 @@ public: IFlushTarget::List getFlushTargets() override; void setSchema(const Schema & schema, SerialNum serialNum) override ; - void wipeHistory(SerialNum wipeSerial) override; }; } // namespace index |