aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-03 11:48:21 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-08 21:38:37 +0000
commit1f5ec300402aeb0f20a8a011c669fcefdd72f847 (patch)
treeda58163192626f4d03edd54e43129843016e8899 /storage
parentbe9df8bfa22cf5a7164f4f3deba44cdbd2b8e7cf (diff)
deinline large destructors
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp24
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h1
-rw-r--r--storage/src/vespa/storage/distributor/statecheckers.cpp4
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp17
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h25
-rw-r--r--storage/src/vespa/storage/visiting/visitorthread.cpp2
-rw-r--r--storage/src/vespa/storage/visiting/visitorthread.h1
7 files changed, 45 insertions, 29 deletions
diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
index af0e016a77c..d0a1e98f0c8 100644
--- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
@@ -7,7 +7,6 @@
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/select/parser.h>
#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storage/distributor/distributormetricsset.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
@@ -38,6 +37,8 @@ TwoPhaseUpdateOperation::TwoPhaseUpdateOperation(
_updateDocBucketId = idFactory.getBucketId(_updateCmd->getDocumentId());
}
+TwoPhaseUpdateOperation::~TwoPhaseUpdateOperation() {}
+
namespace {
struct IntermediateMessageSender : DistributorMessageSender {
@@ -46,13 +47,10 @@ struct IntermediateMessageSender : DistributorMessageSender {
DistributorMessageSender& forward;
std::shared_ptr<api::StorageReply> _reply;
- IntermediateMessageSender(
- SentMessageMap& mm,
- const std::shared_ptr<Operation>& cb,
- DistributorMessageSender & fwd)
- : msgMap(mm), callback(cb), forward(fwd)
- {
- }
+ IntermediateMessageSender(SentMessageMap& mm,
+ const std::shared_ptr<Operation>& cb,
+ DistributorMessageSender & fwd);
+ ~IntermediateMessageSender();
virtual void sendCommand(const std::shared_ptr<api::StorageCommand>& cmd) {
msgMap.insert(cmd->getMsgId(), callback);
@@ -76,6 +74,16 @@ struct IntermediateMessageSender : DistributorMessageSender {
}
};
+IntermediateMessageSender::IntermediateMessageSender(SentMessageMap& mm,
+ const std::shared_ptr<Operation>& cb,
+ DistributorMessageSender & fwd)
+ : msgMap(mm),
+ callback(cb),
+ forward(fwd)
+{
+}
+IntermediateMessageSender::~IntermediateMessageSender() { }
+
}
const char*
diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
index 13d501592d8..361fcd03037 100644
--- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
+++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
@@ -50,6 +50,7 @@ public:
TwoPhaseUpdateOperation(DistributorComponent& manager,
const std::shared_ptr<api::UpdateCommand> & msg,
DistributorMetricSet& metrics);
+ ~TwoPhaseUpdateOperation();
void onStart(DistributorMessageSender& sender);
diff --git a/storage/src/vespa/storage/distributor/statecheckers.cpp b/storage/src/vespa/storage/distributor/statecheckers.cpp
index dd247eb497e..096611e03e1 100644
--- a/storage/src/vespa/storage/distributor/statecheckers.cpp
+++ b/storage/src/vespa/storage/distributor/statecheckers.cpp
@@ -649,6 +649,8 @@ public:
}
}
+ ~MergeNodes();
+
void operator+=(const MergeNodes& other) {
_reason << other._reason.str();
_problemFlags |= other._problemFlags;
@@ -714,6 +716,8 @@ private:
uint8_t _priority;
};
+MergeNodes::~MergeNodes() {}
+
bool
presentInIdealState(const StateChecker::Context& c, uint16_t node)
{
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
index 8de4199f246..27261424894 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
@@ -87,6 +87,23 @@ allDistributorsDownInState(const lib::ClusterState& state) {
}
+ChangedBucketOwnershipHandler::Metrics::Metrics(metrics::MetricSet* owner)
+ : metrics::MetricSet("changedbucketownershiphandler", "", "", owner),
+ averageAbortProcessingTime("avg_abort_processing_time", "", "Average time spent aborting operations for changed buckets", this),
+ idealStateOpsAborted("ideal_state_ops_aborted", "", "Number of outdated ideal state operations aborted", this),
+ externalLoadOpsAborted("external_load_ops_aborted", "", "Number of outdated external load operations aborted", this)
+{}
+ChangedBucketOwnershipHandler::Metrics::~Metrics() { }
+
+ChangedBucketOwnershipHandler::OwnershipState::OwnershipState(const lib::Distribution::SP& distribution,
+ const lib::ClusterState::CSP& state)
+ : _distribution(distribution),
+ _state(state)
+{
+}
+ChangedBucketOwnershipHandler::OwnershipState::~OwnershipState() {}
+
+
uint16_t
ChangedBucketOwnershipHandler::OwnershipState::ownerOf(
const document::BucketId& bucket) const
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
index 1689419d436..4d94f78629b 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
@@ -58,22 +58,8 @@ public:
metrics::LongCountMetric idealStateOpsAborted;
metrics::LongCountMetric externalLoadOpsAborted;
- Metrics(metrics::MetricSet* owner = 0)
- : metrics::MetricSet("changedbucketownershiphandler",
- "", "", owner),
- averageAbortProcessingTime(
- "avg_abort_processing_time", "",
- "Average time spent aborting operations for changed "
- "buckets", this),
- idealStateOpsAborted(
- "ideal_state_ops_aborted", "",
- "Number of outdated ideal state operations aborted",
- this),
- externalLoadOpsAborted(
- "external_load_ops_aborted", "",
- "Number of outdated external load operations aborted",
- this)
- {}
+ Metrics(metrics::MetricSet* owner = 0);
+ ~Metrics();
};
/**
@@ -92,11 +78,8 @@ public:
using CSP = std::shared_ptr<const OwnershipState>;
OwnershipState(const lib::Distribution::SP& distribution,
- const lib::ClusterState::CSP& state)
- : _distribution(distribution),
- _state(state)
- {
- }
+ const lib::ClusterState::CSP& state);
+ ~OwnershipState();
static const uint16_t FAILED_TO_RESOLVE = 0xffff;
diff --git a/storage/src/vespa/storage/visiting/visitorthread.cpp b/storage/src/vespa/storage/visiting/visitorthread.cpp
index 61cdfba1a11..48ff14d9dec 100644
--- a/storage/src/vespa/storage/visiting/visitorthread.cpp
+++ b/storage/src/vespa/storage/visiting/visitorthread.cpp
@@ -31,6 +31,8 @@ VisitorThread::Event::Event(Event&& other)
{
}
+VisitorThread::Event::~Event() {}
+
VisitorThread::Event&
VisitorThread::Event::operator= (Event&& other)
{
diff --git a/storage/src/vespa/storage/visiting/visitorthread.h b/storage/src/vespa/storage/visiting/visitorthread.h
index 545ffc6421f..fdfef7b2073 100644
--- a/storage/src/vespa/storage/visiting/visitorthread.h
+++ b/storage/src/vespa/storage/visiting/visitorthread.h
@@ -61,6 +61,7 @@ class VisitorThread : public framework::Runnable,
Event(api::VisitorId visitor, mbus::Reply::UP reply);
Event(api::VisitorId visitor,
const std::shared_ptr<api::StorageMessage>& msg);
+ ~Event();
bool empty() const noexcept {
return (_type == NONE);