diff options
13 files changed, 54 insertions, 38 deletions
diff --git a/storage/src/tests/bucketdb/lockablemaptest.cpp b/storage/src/tests/bucketdb/lockablemaptest.cpp index 91f273928d6..2e6cd0656e4 100644 --- a/storage/src/tests/bucketdb/lockablemaptest.cpp +++ b/storage/src/tests/bucketdb/lockablemaptest.cpp @@ -349,8 +349,11 @@ namespace { uint32_t _counter; LoadGiver(Map& map) : _map(map), _counter(0) {} + ~LoadGiver() __attribute__((noinline)); }; + LoadGiver::~LoadGiver() { } + struct InsertEraseLoadGiver : public LoadGiver { InsertEraseLoadGiver(Map& map) : LoadGiver(map) {} diff --git a/storage/src/tests/common/teststorageapp.cpp b/storage/src/tests/common/teststorageapp.cpp index 92516f15ee1..b91210f3459 100644 --- a/storage/src/tests/common/teststorageapp.cpp +++ b/storage/src/tests/common/teststorageapp.cpp @@ -274,6 +274,8 @@ TestDistributorApp::TestDistributorApp(NodeIndex index, configure(configId); } +TestDistributorApp::~TestDistributorApp() {} + api::Timestamp TestDistributorApp::getUniqueTimestamp() { diff --git a/storage/src/tests/common/teststorageapp.h b/storage/src/tests/common/teststorageapp.h index 3b64fb6e6fa..119be74a3d2 100644 --- a/storage/src/tests/common/teststorageapp.h +++ b/storage/src/tests/common/teststorageapp.h @@ -146,6 +146,7 @@ class TestDistributorApp : public TestStorageApp, public: TestDistributorApp(vespalib::stringref configId = ""); TestDistributorApp(NodeIndex index, vespalib::stringref configId = ""); + ~TestDistributorApp(); DistributorComponentRegisterImpl& getComponentRegister() { return _compReg; diff --git a/storage/src/tests/storageserver/statemanagertest.cpp b/storage/src/tests/storageserver/statemanagertest.cpp index f9c5c97e6bc..ee55550baf7 100644 --- a/storage/src/tests/storageserver/statemanagertest.cpp +++ b/storage/src/tests/storageserver/statemanagertest.cpp @@ -133,6 +133,7 @@ namespace { MyStateListener(const NodeStateUpdater& upd) : updater(upd), current(*updater.getReportedNodeState()) {} + ~MyStateListener() { } void handleNewState() override { ost << current << " -> "; diff --git a/storage/src/vespa/storage/bucketdb/distribution_hash_normalizer.cpp b/storage/src/vespa/storage/bucketdb/distribution_hash_normalizer.cpp index a204ce112cd..80f82e65a9a 100644 --- a/storage/src/vespa/storage/bucketdb/distribution_hash_normalizer.cpp +++ b/storage/src/vespa/storage/bucketdb/distribution_hash_normalizer.cpp @@ -36,6 +36,7 @@ struct Group { uint16_t index; boost::optional<double> capacity; Children children; + ~Group() {} }; struct GroupSet { diff --git a/storage/src/vespa/storage/bucketdb/judyarray.cpp b/storage/src/vespa/storage/bucketdb/judyarray.cpp index 0e58be29f01..426d8e8a24c 100644 --- a/storage/src/vespa/storage/bucketdb/judyarray.cpp +++ b/storage/src/vespa/storage/bucketdb/judyarray.cpp @@ -11,6 +11,24 @@ JudyArray::~JudyArray() clear(); } +JudyArray::iterator +JudyArray::find(key_type key, bool insertIfNonExisting, bool& preExisted) +{ + Iterator iter(*this, key); + if (insertIfNonExisting && (iter.end() || iter.key() != key)) { + preExisted = false; + insert(key, 0); + iter = Iterator(*this, key); + assert(iter.key() == key); + } else if (iter.key() != key) { + preExisted = false; + iter = Iterator(*this); + } else { + preExisted = true; + } + return iter; +} + void JudyArray::Iterator::setValue(data_type val) { diff --git a/storage/src/vespa/storage/bucketdb/judyarray.h b/storage/src/vespa/storage/bucketdb/judyarray.h index e28d89967b2..9eb202964ee 100644 --- a/storage/src/vespa/storage/bucketdb/judyarray.h +++ b/storage/src/vespa/storage/bucketdb/judyarray.h @@ -148,24 +148,6 @@ JudyArray::find(key_type key) const return iter; } -inline JudyArray::iterator -JudyArray::find(key_type key, bool insertIfNonExisting, bool& preExisted) -{ - Iterator iter(*this, key); - if (insertIfNonExisting && (iter.end() || iter.key() != key)) { - preExisted = false; - insert(key, 0); - iter = Iterator(*this, key); - assert(iter.key() == key); - } else if (iter.key() != key) { - preExisted = false; - iter = Iterator(*this); - } else { - preExisted = true; - } - return iter; -} - inline void JudyArray::insert(key_type key, data_type val) { diff --git a/storage/src/vespa/storage/bucketdb/lockablemap.h b/storage/src/vespa/storage/bucketdb/lockablemap.h index 27945f99568..c254c81601b 100644 --- a/storage/src/vespa/storage/bucketdb/lockablemap.h +++ b/storage/src/vespa/storage/bucketdb/lockablemap.h @@ -49,6 +49,9 @@ public: struct WrappedEntry { WrappedEntry() : _exists(false), _lockKeeper(), _value() {} + WrappedEntry(WrappedEntry &&) = default; + WrappedEntry & operator = (WrappedEntry &&) = default; + ~WrappedEntry() { } mapped_type* operator->() { return &_value; } const mapped_type* operator->() const { return &_value; } diff --git a/storage/src/vespa/storage/bucketmover/htmltable.cpp b/storage/src/vespa/storage/bucketmover/htmltable.cpp index 0fae9e326ba..8290e143c50 100644 --- a/storage/src/vespa/storage/bucketmover/htmltable.cpp +++ b/storage/src/vespa/storage/bucketmover/htmltable.cpp @@ -54,6 +54,15 @@ void HtmlTable::print(std::ostream& out) out << "</table>\n"; } +PercentageColumn::PercentageColumn(const std::string& colName, uint64_t total, HtmlTable* table) + : ValueColumn<double>(colName, " %", table), _total(total), + _values() +{ + if (total != 0) _totalIsAvg = true; +} + +PercentageColumn::~PercentageColumn() {} + void PercentageColumn::finalize() { uint64_t total = _total; diff --git a/storage/src/vespa/storage/bucketmover/htmltable.h b/storage/src/vespa/storage/bucketmover/htmltable.h index bcb66602091..a013eeb6fe4 100644 --- a/storage/src/vespa/storage/bucketmover/htmltable.h +++ b/storage/src/vespa/storage/bucketmover/htmltable.h @@ -145,13 +145,8 @@ struct PercentageColumn : public ValueColumn<double> { uint64_t _total; std::map<uint16_t, uint64_t> _values; - PercentageColumn(const std::string& colName, uint64_t total = 0, - HtmlTable* table = 0) - : ValueColumn<double>(colName, " %", table), _total(total), - _values() - { - if (total != 0) _totalIsAvg = true; - } + PercentageColumn(const std::string& colName, uint64_t total = 0, HtmlTable* table = 0); + ~PercentageColumn(); void finalize() override; diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.cpp b/storage/src/vespa/storage/distributor/distributorcomponent.cpp index a2cca6a830b..291dc10531b 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.cpp +++ b/storage/src/vespa/storage/distributor/distributorcomponent.cpp @@ -1,11 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/storage/distributor/distributorcomponent.h> -#include <vespa/log/log.h> -#include <vespa/vdslib/distribution/distribution.h> -#include <vespa/storageapi/messageapi/storagereply.h> +#include "distributorcomponent.h" #include <vespa/storage/common/bucketoperationlogger.h> +#include <vespa/storageapi/messageapi/storagereply.h> +#include <vespa/vdslib/distribution/distribution.h> +#include <vespa/log/log.h> LOG_SETUP(".distributorstoragelink"); namespace storage { @@ -21,6 +20,8 @@ DistributorComponent::DistributorComponent( { } +DistributorComponent::~DistributorComponent() {} + void DistributorComponent::sendDown(const api::StorageMessage::SP& msg) { diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.h b/storage/src/vespa/storage/distributor/distributorcomponent.h index 7fa366a9d02..6f94d1bdf69 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.h +++ b/storage/src/vespa/storage/distributor/distributorcomponent.h @@ -1,15 +1,15 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/storage/distributor/distributorinterface.h> -#include <vespa/storage/distributor/operationowner.h> -#include <vespa/vdslib/state/clusterstate.h> -#include <vespa/storageapi/messageapi/storagecommand.h> -#include <vespa/storageapi/buckets/bucketinfo.h> +#include "distributorinterface.h" +#include "operationowner.h" +#include "statechecker.h" #include <vespa/storage/common/distributorcomponent.h> -#include <vespa/storage/distributor/statechecker.h> #include <vespa/storage/storageutil/utils.h> #include <vespa/storageframework/storageframework.h> +#include <vespa/storageapi/messageapi/storagecommand.h> +#include <vespa/storageapi/buckets/bucketinfo.h> +#include <vespa/vdslib/state/clusterstate.h> namespace storage { @@ -33,7 +33,7 @@ public: DistributorComponentRegister& compReg, const std::string& name); - virtual ~DistributorComponent() {} + ~DistributorComponent(); /** * Returns the ownership status of a bucket as decided with the given diff --git a/storage/src/vespa/storage/persistence/providershutdownwrapper.h b/storage/src/vespa/storage/persistence/providershutdownwrapper.h index 2a372757283..a7b4879c212 100644 --- a/storage/src/vespa/storage/persistence/providershutdownwrapper.h +++ b/storage/src/vespa/storage/persistence/providershutdownwrapper.h @@ -70,7 +70,7 @@ private: * internally since it calls non-const on _component. */ template <typename ResultType> - inline ResultType checkResult(ResultType&& result) const; + ResultType checkResult(ResultType&& result) const; spi::PersistenceProvider& _impl; ServiceLayerComponent& _component; |