summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-12-04 14:01:07 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-12-04 14:01:07 +0000
commit3c8d867abe551e61e0f64f24f06af3d55c15520b (patch)
tree76950a51491086a4e86686f553079ad4d2f11691 /storage
parent269abb3011a0b7ee85760b497421ac241fca9891 (diff)
Use noexcept for functions that return a reference.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/common/teststorageapp.h2
-rw-r--r--storage/src/vespa/storage/distributor/distributor_operation_context.h12
-rw-r--r--storage/src/vespa/storage/distributor/distributorcomponent.h12
3 files changed, 13 insertions, 13 deletions
diff --git a/storage/src/tests/common/teststorageapp.h b/storage/src/tests/common/teststorageapp.h
index 5fa45fe804d..ce76a9f98c9 100644
--- a/storage/src/tests/common/teststorageapp.h
+++ b/storage/src/tests/common/teststorageapp.h
@@ -87,7 +87,7 @@ public:
{ return _compReg.getDistribution(); }
TestNodeStateUpdater& getNodeStateUpdater() { return _nodeStateUpdater; }
uint16_t getIndex() const { return _compReg.getIndex(); }
- const NodeIdentity& node_identity() const { return _node_identity; }
+ const NodeIdentity& node_identity() const noexcept { return _node_identity; }
// The storage app also implements the done initializer interface, so it can
// be sent to components needing this.
diff --git a/storage/src/vespa/storage/distributor/distributor_operation_context.h b/storage/src/vespa/storage/distributor/distributor_operation_context.h
index 719779bdf0d..083ffcdacf4 100644
--- a/storage/src/vespa/storage/distributor/distributor_operation_context.h
+++ b/storage/src/vespa/storage/distributor/distributor_operation_context.h
@@ -32,18 +32,18 @@ public:
const std::vector<BucketCopy>& changed_nodes,
uint32_t update_flags = 0) = 0;
virtual void remove_node_from_bucket_database(const document::Bucket& bucket, uint16_t node_index) = 0;
- virtual const DistributorBucketSpaceRepo& bucket_space_repo() const = 0;
- virtual DistributorBucketSpaceRepo& bucket_space_repo() = 0;
- virtual const DistributorBucketSpaceRepo& read_only_bucket_space_repo() const = 0;
- virtual DistributorBucketSpaceRepo& read_only_bucket_space_repo() = 0;
+ virtual const DistributorBucketSpaceRepo& bucket_space_repo() const noexcept= 0;
+ virtual DistributorBucketSpaceRepo& bucket_space_repo() noexcept = 0;
+ virtual const DistributorBucketSpaceRepo& read_only_bucket_space_repo() const noexcept = 0;
+ virtual DistributorBucketSpaceRepo& read_only_bucket_space_repo() noexcept = 0;
virtual document::BucketId make_split_bit_constrained_bucket_id(const document::DocumentId& docId) const = 0;
- virtual const DistributorConfiguration& distributor_config() const = 0;
+ virtual const DistributorConfiguration& distributor_config() const noexcept = 0;
virtual void send_inline_split_if_bucket_too_large(document::BucketSpace bucket_space,
const BucketDatabase::Entry& entry,
uint8_t pri) = 0;
virtual OperationRoutingSnapshot read_snapshot_for_bucket(const document::Bucket& bucket) const = 0;
- virtual PendingMessageTracker& pending_message_tracker() = 0;
+ virtual PendingMessageTracker& pending_message_tracker() noexcept = 0;
virtual bool has_pending_message(uint16_t node_index,
const document::Bucket& bucket,
uint32_t message_type) const = 0;
diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.h b/storage/src/vespa/storage/distributor/distributorcomponent.h
index e092aeeee4d..18923c44b1b 100644
--- a/storage/src/vespa/storage/distributor/distributorcomponent.h
+++ b/storage/src/vespa/storage/distributor/distributorcomponent.h
@@ -166,22 +166,22 @@ public:
void remove_node_from_bucket_database(const document::Bucket& bucket, uint16_t node_index) override {
removeNodeFromDB(bucket, node_index);
}
- const DistributorBucketSpaceRepo& bucket_space_repo() const override {
+ const DistributorBucketSpaceRepo& bucket_space_repo() const noexcept override {
return getBucketSpaceRepo();
}
- DistributorBucketSpaceRepo& bucket_space_repo() override {
+ DistributorBucketSpaceRepo& bucket_space_repo() noexcept override {
return getBucketSpaceRepo();
}
- const DistributorBucketSpaceRepo& read_only_bucket_space_repo() const override {
+ const DistributorBucketSpaceRepo& read_only_bucket_space_repo() const noexcept override {
return getReadOnlyBucketSpaceRepo();
}
- DistributorBucketSpaceRepo& read_only_bucket_space_repo() override {
+ DistributorBucketSpaceRepo& read_only_bucket_space_repo() noexcept override {
return getReadOnlyBucketSpaceRepo();
}
document::BucketId make_split_bit_constrained_bucket_id(const document::DocumentId& docId) const override {
return getBucketId(docId);
}
- const DistributorConfiguration& distributor_config() const override {
+ const DistributorConfiguration& distributor_config() const noexcept override {
return getDistributor().getConfig();
}
void send_inline_split_if_bucket_too_large(document::BucketSpace bucket_space,
@@ -192,7 +192,7 @@ public:
OperationRoutingSnapshot read_snapshot_for_bucket(const document::Bucket& bucket) const override {
return getDistributor().read_snapshot_for_bucket(bucket);
}
- PendingMessageTracker& pending_message_tracker() override {
+ PendingMessageTracker& pending_message_tracker() noexcept override {
return getDistributor().getPendingMessageTracker();
}
bool has_pending_message(uint16_t node_index,