aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-10 22:14:22 +0200
committerGitHub <noreply@github.com>2017-08-10 22:14:22 +0200
commit5b391c10e67cf0baf686b388921fbaffcf38174c (patch)
tree01508b5b20abb144fc2dfe25688a22f4e42d7295
parenta35807d95255625553daa0db745df0e422172fd8 (diff)
parent62396707053440afe51dbf7e81cbb3219b319dd7 (diff)
Merge pull request #3073 from vespa-engine/toregge/remove-inlining-warning-1
Eliminate inlining warnings
-rw-r--r--document/src/vespa/document/repo/configbuilder.cpp35
-rw-r--r--document/src/vespa/document/repo/configbuilder.h27
-rw-r--r--storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.cpp16
-rw-r--r--storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h18
4 files changed, 66 insertions, 30 deletions
diff --git a/document/src/vespa/document/repo/configbuilder.cpp b/document/src/vespa/document/repo/configbuilder.cpp
index fa77f728f12..45433c2a606 100644
--- a/document/src/vespa/document/repo/configbuilder.cpp
+++ b/document/src/vespa/document/repo/configbuilder.cpp
@@ -28,5 +28,40 @@ void DatatypeConfig::addNestedType(const TypeOrId &t) {
}
}
+namespace {
+
+void addType(const DatatypeConfig &type,
+ DocumenttypesConfig::Documenttype &doc_type) {
+ doc_type.datatype.insert(doc_type.datatype.end(),
+ type.nested_types.begin(),
+ type.nested_types.end());
+ doc_type.datatype.push_back(type);
+}
+
+}
+
+DocTypeRep &
+DocTypeRep::annotationType(int32_t id, const vespalib::string &name, const DatatypeConfig &type) {
+ addType(type, doc_type);
+ return annotationType(id, name, type.id);
+}
+
+
+DocTypeRep
+DocumenttypesConfigBuilderHelper::document(int32_t id, const vespalib::string &name,
+ const DatatypeConfig &header,
+ const DatatypeConfig &body) {
+ assert(header.type == DatatypeConfig::STRUCT);
+ assert(body.type == DatatypeConfig::STRUCT);
+ _config.documenttype.resize(_config.documenttype.size() + 1);
+ _config.documenttype.back().id = id;
+ _config.documenttype.back().name = name;
+ _config.documenttype.back().headerstruct = header.id;
+ _config.documenttype.back().bodystruct = body.id;
+ addType(header, _config.documenttype.back());
+ addType(body, _config.documenttype.back());
+ return DocTypeRep(_config.documenttype.back());
+}
+
} // namespace config_builder
} // namespace document
diff --git a/document/src/vespa/document/repo/configbuilder.h b/document/src/vespa/document/repo/configbuilder.h
index 949b9fb412d..598c72f6358 100644
--- a/document/src/vespa/document/repo/configbuilder.h
+++ b/document/src/vespa/document/repo/configbuilder.h
@@ -100,14 +100,6 @@ struct AnnotationRef : DatatypeConfig {
}
};
-inline void addType(const DatatypeConfig &type,
- DocumenttypesConfig::Documenttype &doc_type) {
- doc_type.datatype.insert(doc_type.datatype.end(),
- type.nested_types.begin(),
- type.nested_types.end());
- doc_type.datatype.push_back(type);
-}
-
struct DocTypeRep {
DocumenttypesConfig::Documenttype &doc_type;
@@ -127,10 +119,8 @@ struct DocTypeRep {
return *this;
}
DocTypeRep &annotationType(int32_t id, const vespalib::string &name,
- const DatatypeConfig &type) {
- addType(type, doc_type);
- return annotationType(id, name, type.id);
- }
+ const DatatypeConfig &type);
+
DocTypeRep& referenceType(int32_t id, int32_t target_type_id) {
doc_type.referencetype.resize(doc_type.referencetype.size() + 1);
doc_type.referencetype.back().id = id;
@@ -149,18 +139,7 @@ public:
DocTypeRep document(int32_t id, const vespalib::string &name,
const DatatypeConfig &header,
- const DatatypeConfig &body) {
- assert(header.type == DatatypeConfig::STRUCT);
- assert(body.type == DatatypeConfig::STRUCT);
- _config.documenttype.resize(_config.documenttype.size() + 1);
- _config.documenttype.back().id = id;
- _config.documenttype.back().name = name;
- _config.documenttype.back().headerstruct = header.id;
- _config.documenttype.back().bodystruct = body.id;
- addType(header, _config.documenttype.back());
- addType(body, _config.documenttype.back());
- return DocTypeRep(_config.documenttype.back());
- }
+ const DatatypeConfig &body);
::document::DocumenttypesConfigBuilder &config() { return _config; }
};
diff --git a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.cpp b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.cpp
index bf2bc258d6e..61e67b40f44 100644
--- a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.cpp
+++ b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.cpp
@@ -7,6 +7,18 @@
namespace storage {
namespace distributor {
+BucketDBMetricUpdater::Stats::Stats()
+ : _docCount(0),
+ _byteCount(0),
+ _tooFewCopies(0),
+ _tooManyCopies(0),
+ _noTrusted(0),
+ _totalBuckets(0)
+{
+}
+
+BucketDBMetricUpdater::Stats::Stats(const Stats &rhs) = default;
+
BucketDBMetricUpdater::BucketDBMetricUpdater()
: _workingStats(),
_lastCompleteStats(),
@@ -15,6 +27,10 @@ BucketDBMetricUpdater::BucketDBMetricUpdater()
{
}
+BucketDBMetricUpdater::~BucketDBMetricUpdater()
+{
+}
+
void
BucketDBMetricUpdater::resetStats()
{
diff --git a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
index fe1b7747e7d..07b9e2a48a6 100644
--- a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
+++ b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
@@ -19,12 +19,16 @@ class BucketDBMetricUpdater {
public:
/** Bucket statistics for a single database iteration */
struct Stats {
- uint64_t _docCount {0};
- uint64_t _byteCount {0};
- uint64_t _tooFewCopies {0};
- uint64_t _tooManyCopies {0};
- uint64_t _noTrusted {0};
- uint64_t _totalBuckets {0};
+ uint64_t _docCount;
+ uint64_t _byteCount;
+ uint64_t _tooFewCopies;
+ uint64_t _tooManyCopies;
+ uint64_t _noTrusted;
+ uint64_t _totalBuckets;
+
+ Stats();
+ Stats(const Stats &rhs);
+ ~Stats() { }
/**
* For each node N, look at all the buckets that have or should have a
@@ -61,6 +65,8 @@ private:
public:
BucketDBMetricUpdater();
+ ~BucketDBMetricUpdater();
+
void setMinimumReplicaCountingMode(ReplicaCountingMode mode) noexcept {
_replicaCountingMode = mode;
}