diff options
32 files changed, 72 insertions, 18 deletions
diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp index 56ae361735e..d197d94fda4 100644 --- a/searchcore/src/tests/proton/common/cachedselect_test.cpp +++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp @@ -196,6 +196,7 @@ public: _gets(0) { } + ~MyIntAv() override; virtual uint32_t get(AttributeVector::DocId doc, largeint_t *v, uint32_t sz) const override @@ -211,6 +212,7 @@ public: } }; +MyIntAv::~MyIntAv() = default; class MyAttributeManager : public MockAttributeManager { diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp index acd33ab749d..00694b6b78f 100644 --- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp @@ -148,6 +148,7 @@ struct MoveOperationFeedView : public MyMinimalFeedView { removeIndexFieldsCount(0), onWriteDoneContexts() {} + ~MoveOperationFeedView() override; void putAttributes(SerialNum, search::DocumentIdT, const document::Document &, OnPutDoneType onWriteDone) override { ++putAttributesCount; EXPECT_EQUAL(1, outstandingMoveOps); @@ -192,6 +193,8 @@ struct MoveOperationFeedView : public MyMinimalFeedView { } }; +MoveOperationFeedView::~MoveOperationFeedView() = default; + struct MoveOperationCallback : public IDestructorCallback { std::atomic<int> &outstandingMoveOps; explicit MoveOperationCallback(std::atomic<int> &outstandingMoveOps_) noexcept : outstandingMoveOps(outstandingMoveOps_) { diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp index 7e4980277e7..506313527eb 100644 --- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp +++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp @@ -254,7 +254,7 @@ protected: public: using SP = std::shared_ptr<SimpleTarget>; - SimpleTarget(Task::UP task, const std::string &name) : + SimpleTarget(Task::UP task, const std::string &name) noexcept : test::DummyFlushTarget(name), _flushedSerial(0), _currentSerial(0), diff --git a/searchcore/src/tests/proton/index/index_writer/CMakeLists.txt b/searchcore/src/tests/proton/index/index_writer/CMakeLists.txt index 7a0090a4f38..4b27f0e9556 100644 --- a/searchcore/src/tests/proton/index/index_writer/CMakeLists.txt +++ b/searchcore/src/tests/proton/index/index_writer/CMakeLists.txt @@ -3,6 +3,7 @@ vespa_add_executable(searchcore_index_writer_test_app TEST SOURCES index_writer_test.cpp DEPENDS + searchcore_test searchcore_index searchcore_pcommon ) diff --git a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp index 62a691d72e6..75e6b01b46f 100644 --- a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp +++ b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp @@ -42,6 +42,7 @@ struct MyIndexManager : public test::MockIndexManager wantedLidLimit(0), compactSerial(0) { } + ~MyIndexManager() override; std::string getPut(uint32_t lid) { return toString(puts[lid]); } @@ -72,6 +73,8 @@ struct MyIndexManager : public test::MockIndexManager } }; +MyIndexManager::~MyIndexManager() = default; + struct Fixture { IIndexManager::SP iim; diff --git a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp index f82377c9188..c85ef7f3446 100644 --- a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp +++ b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp @@ -204,6 +204,7 @@ struct RangeChecker : vespalib::Rendezvous<std::reference_wrapper<const WorkTrac size_t docid_limit; RangeChecker(size_t num_threads, size_t docid_limit_in) : vespalib::Rendezvous<std::reference_wrapper<const WorkTracker>,bool>(num_threads), docid_limit(docid_limit_in) {} + ~RangeChecker() override; virtual void mingle() override { std::vector<DocidRange> ranges; for (size_t i = 0; i < size(); ++i) { @@ -230,6 +231,8 @@ struct RangeChecker : vespalib::Rendezvous<std::reference_wrapper<const WorkTrac } }; +RangeChecker::~RangeChecker() = default; + const size_t my_docid_limit = 100001; TEST_MT_FFFF("benchmark different combinations of schedulers and work loads", 8, diff --git a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp index 34bc9ea13ed..4022bd68c92 100644 --- a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp +++ b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp @@ -185,6 +185,7 @@ struct ProtonConfigOwner : public proton::IProtonConfigurer VarHolder<std::shared_ptr<ProtonConfigSnapshot>> _config; ProtonConfigOwner() : _configured(false), _config() { } + ~ProtonConfigOwner() override; bool waitUntilConfigured(vespalib::duration timeout) { vespalib::Timer timer; while (timer.elapsed() < timeout) { @@ -220,6 +221,8 @@ struct ProtonConfigOwner : public proton::IProtonConfigurer } }; +ProtonConfigOwner::~ProtonConfigOwner() = default; + TEST_F("require that bootstrap config manager creats correct key set", BootstrapConfigManager("foo")) { const ConfigKeySet set(f1.createConfigKeySet()); ASSERT_EQUAL(4u, set.size()); diff --git a/searchcore/src/tests/proton/server/health_adapter/health_adapter_test.cpp b/searchcore/src/tests/proton/server/health_adapter/health_adapter_test.cpp index d68b6139835..c779645e7f4 100644 --- a/searchcore/src/tests/proton/server/health_adapter/health_adapter_test.cpp +++ b/searchcore/src/tests/proton/server/health_adapter/health_adapter_test.cpp @@ -7,6 +7,7 @@ using namespace proton; struct MyStatusProducer : public StatusProducer { StatusReport::List list; + ~MyStatusProducer() override; void add(const std::string &comp, StatusReport::State state, const std::string &msg) { @@ -18,6 +19,8 @@ struct MyStatusProducer : public StatusProducer { } }; +MyStatusProducer::~MyStatusProducer() = default; + TEST_FF("require that empty status list passes health check", MyStatusProducer(), HealthAdapter(f1)) { EXPECT_TRUE(f2.getHealth().ok); EXPECT_EQUAL(std::string("All OK"), f2.getHealth().msg); diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index dd7e6c2ab8d..4d94d2629fe 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -121,6 +121,8 @@ Matcher::Matcher(const search::index::Schema &schema, const Properties &props, c } } +Matcher::~Matcher() = default; + MatchingStats Matcher::getStats() { diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.h b/searchcore/src/vespa/searchcore/proton/matching/matcher.h index 62d608279a3..4ef57d69d47 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.h +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.h @@ -77,6 +77,7 @@ public: Matcher(const Matcher &) = delete; Matcher &operator=(const Matcher &) = delete; + ~Matcher(); /** * Create a new matcher. The schema represents the current index diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp index 914753d567d..e80d8033751 100644 --- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp @@ -129,6 +129,7 @@ private: class DaisyChainedFeedToken : public feedtoken::ITransport { public: DaisyChainedFeedToken(FeedToken token) : _token(std::move(token)) {} + ~DaisyChainedFeedToken() override; void send(ResultUP, bool ) override { _token.reset(); } @@ -136,6 +137,8 @@ private: FeedToken _token; }; +DaisyChainedFeedToken::~DaisyChainedFeedToken() = default; + } // namespace void diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.cpp b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.cpp index 969462bac03..0681ff2c40b 100644 --- a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.cpp @@ -8,6 +8,8 @@ LOG_SETUP(".proton.server.memoryconfigstore"); namespace proton { +ConfigMaps::~ConfigMaps() = default; + MemoryConfigStore::MemoryConfigStore() : _maps(new ConfigMaps) {} MemoryConfigStore::MemoryConfigStore(ConfigMaps::SP maps) : _maps(maps) {} MemoryConfigStore::~MemoryConfigStore() = default; diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h index 647ed72da8e..735006389dc 100644 --- a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h +++ b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h @@ -13,6 +13,7 @@ struct ConfigMaps { typedef std::shared_ptr<ConfigMaps> SP; std::map<search::SerialNum, DocumentDBConfig::SP> configs; std::set<search::SerialNum> _valid; + ~ConfigMaps(); }; class MemoryConfigStore : public ConfigStore { diff --git a/searchcore/src/vespa/searchcore/proton/server/searchcontext.cpp b/searchcore/src/vespa/searchcore/proton/server/searchcontext.cpp index 4317823f5e2..095a16390ee 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchcontext.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchcontext.cpp @@ -31,4 +31,6 @@ SearchContext::SearchContext(const std::shared_ptr<IndexSearchable> &indexSearch { } +SearchContext::~SearchContext() = default; + } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/searchcontext.h b/searchcore/src/vespa/searchcore/proton/server/searchcontext.h index 137e75e68e7..b3a1bf7d447 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchcontext.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchcontext.h @@ -26,6 +26,7 @@ private: public: SearchContext(const std::shared_ptr<IndexSearchable> &indexSearchable, uint32_t docIdLimit); + ~SearchContext() override; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt index 28f705716bc..abc8c8450e4 100644 --- a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt +++ b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt @@ -4,9 +4,11 @@ vespa_add_library(searchcore_test STATIC attribute_vectors.cpp bucketfactory.cpp buckethandler.cpp + bucketstatecalculator.cpp clusterstatehandler.cpp documentdb_config_builder.cpp dummy_feed_view.cpp + mock_index_manager.cpp mock_shared_threading_service.cpp userdocumentsbuilder.cpp threading_service_observer.cpp diff --git a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.cpp b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.cpp new file mode 100644 index 00000000000..43610405b87 --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.cpp @@ -0,0 +1,9 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "bucketstatecalculator.h" + +namespace proton::test { + +BucketStateCalculator::~BucketStateCalculator() = default; + +} diff --git a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h index e218058f01e..d8803fd9c27 100644 --- a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h +++ b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h @@ -33,6 +33,7 @@ public: _nodeMaintenance(false) { } + ~BucketStateCalculator() override; BucketStateCalculator &addReady(const document::BucketId &bucket) { _ready.insert(bucket); return *this; diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.cpp b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.cpp new file mode 100644 index 00000000000..a6d7d1aaf42 --- /dev/null +++ b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.cpp @@ -0,0 +1,9 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "mock_index_manager.h" + +namespace proton::test { + +MockIndexManager::~MockIndexManager() = default; + +} 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 bf76dc3d59b..134aeabff58 100644 --- a/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h +++ b/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h @@ -10,6 +10,7 @@ namespace proton::test { */ struct MockIndexManager : public searchcorespi::IIndexManager { + ~MockIndexManager() override; void putDocument(uint32_t, const Document &, SerialNum, OnWriteDoneType) override {} void removeDocuments(LidVector, SerialNum) override {} void commit(SerialNum, OnWriteDoneType) override {} diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index afe5b573f21..d5297fe8f8c 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -77,11 +77,14 @@ public: : _reconfigurer(reconfigurer), _configure(std::move(configure)) { } + ~ReconfigRunnableTask() override; void run() override { _reconfigurer.reconfigure(std::move(_configure)); } }; +ReconfigRunnableTask::~ReconfigRunnableTask() = default; + SerialNum noSerialNumHigh = std::numeric_limits<SerialNum>::max(); @@ -164,6 +167,8 @@ DiskIndexWithDestructorCallback::getSearchableStats() const } // namespace +IndexMaintainer::FrozenMemoryIndexRef::~FrozenMemoryIndexRef() = default; + IndexMaintainer::FusionArgs::FusionArgs() : _new_fusion_id(0u), _changeGens(), diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h index fa7a9145a3c..b4bba209937 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h @@ -57,6 +57,7 @@ class IndexMaintainer : public IIndexManager, _saveInfo(saveInfo.release()), _absoluteId(absoluteId) { } + ~FrozenMemoryIndexRef(); }; class ChangeGens { diff --git a/searchlib/src/tests/queryeval/weak_and/rise_wand.h b/searchlib/src/tests/queryeval/weak_and/rise_wand.h index 87f59eb3d78..7a5e46c05ea 100644 --- a/searchlib/src/tests/queryeval/weak_and/rise_wand.h +++ b/searchlib/src/tests/queryeval/weak_and/rise_wand.h @@ -36,7 +36,7 @@ public: private: // comparator class that compares two streams. The variables a and b are // logically indices into the streams vector. - class StreamComparator : public std::binary_function<uint16_t, uint16_t, bool> + class StreamComparator { private: const docid_t *_streamDocIds; diff --git a/searchlib/src/tests/sort/sort_test.cpp b/searchlib/src/tests/sort/sort_test.cpp index 54a3542e82b..9c48498eae9 100644 --- a/searchlib/src/tests/sort/sort_test.cpp +++ b/searchlib/src/tests/sort/sort_test.cpp @@ -48,7 +48,7 @@ struct LoadedStrings } }; - class ValueCompare : public std::binary_function<LoadedStrings, LoadedStrings, bool> { + class ValueCompare { public: bool operator() (const LoadedStrings & x, const LoadedStrings & y) const { return strcmp(x._value, y._value) < 0; diff --git a/searchlib/src/vespa/searchlib/aggregation/group.h b/searchlib/src/vespa/searchlib/aggregation/group.h index 4b06bcd8cae..202c5085133 100644 --- a/searchlib/src/vespa/searchlib/aggregation/group.h +++ b/searchlib/src/vespa/searchlib/aggregation/group.h @@ -39,7 +39,7 @@ public: using UP = std::unique_ptr<Group>; typedef Group * ChildP; typedef ChildP * GroupList; - struct GroupEqual : public std::binary_function<ChildP, ChildP, bool> { + struct GroupEqual { GroupEqual(const GroupList * v) : _v(v) { } bool operator()(uint32_t a, uint32_t b) { return (*_v)[a]->getId().cmpFast((*_v)[b]->getId()) == 0; } bool operator()(const Group & a, uint32_t b) { return a.getId().cmpFast((*_v)[b]->getId()) == 0; } diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp index 6b692ee4b27..0179841e7fa 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp @@ -99,7 +99,7 @@ void StringDirectAttribute::onSave(IAttributeSaveTarget & saveTarget) } } -class stringComp : public std::binary_function<uint32_t, uint32_t, bool> { +class stringComp { public: stringComp(const char * buffer) : _buffer(buffer) { } bool operator()(uint32_t x, uint32_t y) const { return strcmp(_buffer+x, _buffer+y) < 0; } diff --git a/searchlib/src/vespa/searchlib/attribute/loadedenumvalue.h b/searchlib/src/vespa/searchlib/attribute/loadedenumvalue.h index fdf9ab624ad..96bdc147559 100644 --- a/searchlib/src/vespa/searchlib/attribute/loadedenumvalue.h +++ b/searchlib/src/vespa/searchlib/attribute/loadedenumvalue.h @@ -33,9 +33,7 @@ public: } }; - class EnumCompare : public std::binary_function<LoadedEnumAttribute, - LoadedEnumAttribute, - bool> + class EnumCompare { public: bool diff --git a/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.h b/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.h index bfc636d79b9..934d20d57b2 100644 --- a/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.h +++ b/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.h @@ -20,7 +20,7 @@ struct LoadedNumericValue : public LoadedValue<T> { LoadedNumericValue() : LoadedValue<T>() { } - class ValueCompare : public std::binary_function<LoadedNumericValue<T>, LoadedNumericValue<T>, bool> + class ValueCompare { public: bool operator()(const LoadedNumericValue<T> &x, const LoadedNumericValue<T> &y) const { diff --git a/searchlib/src/vespa/searchlib/attribute/loadedvalue.h b/searchlib/src/vespa/searchlib/attribute/loadedvalue.h index b8f938838d2..ab20c9fbe69 100644 --- a/searchlib/src/vespa/searchlib/attribute/loadedvalue.h +++ b/searchlib/src/vespa/searchlib/attribute/loadedvalue.h @@ -40,9 +40,7 @@ public: } }; - class DocOrderCompare : public std::binary_function<LoadedValue<T>, - LoadedValue<T>, - bool> + class DocOrderCompare { public: bool diff --git a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp index ec9b212fcf8..57882ddf1ae 100644 --- a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp +++ b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp @@ -107,7 +107,7 @@ public: } }; -class StdSortDataCharCompare : public std::binary_function<SortDataChar, SortDataChar, bool> +class StdSortDataCharCompare { public: bool operator() (const SortDataChar & x, const SortDataChar & y) const { diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index 7510ae162ce..8a9af3af828 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -425,7 +425,7 @@ FastS_insertion_sort(T a[], uint32_t n, Compare *compobj) } } -class StdSortDataCompare : public std::binary_function<FastS_SortSpec::SortData, FastS_SortSpec::SortData, bool> +class StdSortDataCompare { public: StdSortDataCompare(const uint8_t * s) : _sortSpec(s) { } diff --git a/searchlib/src/vespa/searchlib/expression/resultvector.h b/searchlib/src/vespa/searchlib/expression/resultvector.h index 171659993ac..81d73e9b1f5 100644 --- a/searchlib/src/vespa/searchlib/expression/resultvector.h +++ b/searchlib/src/vespa/searchlib/expression/resultvector.h @@ -57,20 +57,20 @@ private: template <typename B> struct cmpT { - struct less : public std::binary_function<B, B, bool> { + struct less { bool operator()(const B & a, const B & b) { return a.cmp(b) < 0; } }; - struct equal : public std::binary_function<B, B, bool> { + struct equal { bool operator()(const B & a, const B & b) { return a.cmp(b) == 0; } }; }; template <typename B, typename V> struct contains { - struct less : public std::binary_function<B, V, bool> { + struct less { bool operator()(const B & a, const V & b) { return a.contains(b) < 0; } }; - struct equal : public std::binary_function<B, V, bool> { + struct equal { bool operator()(const B & a, const V & b) { return a.contains(b) == 0; } }; }; |