summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-02-15 13:27:07 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-02-15 13:31:45 +0000
commit96231040fe937da244a5a338236654e6b1e2012d (patch)
tree3306970dd0e785f64810d4a3efdc276fe02bf55c /vdslib
parentfc6c07f1ab63dc6a4be43cb15033ea4ca2122360 (diff)
Allow inhibiting all default bucket space merges if global merges pending
If the cluster controller publishes a cluster state where at least one node is marked as maintenance in the default space but is up in the global space, global bucket merges are pending in the cluster. We want these merges to complete ASAP, and to avoid starvation caused by distributors that finish their global merges quicker than others (or whose global bucket ops get preempted), allow for _completely_ inhibiting merges to buckets in the default space when global buckets are pending. Requires a live config flag to be set to actually be taken into account in the bucket synchronization state checker. Flag is tracked per distributor bucket space (per stripe) and is automatically cleared once a cluster state is received without pending global merges.
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/vespa/vdslib/state/cluster_state_bundle.cpp6
-rw-r--r--vdslib/src/vespa/vdslib/state/cluster_state_bundle.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/vdslib/src/vespa/vdslib/state/cluster_state_bundle.cpp b/vdslib/src/vespa/vdslib/state/cluster_state_bundle.cpp
index 0da172fc789..ce00897acdf 100644
--- a/vdslib/src/vespa/vdslib/state/cluster_state_bundle.cpp
+++ b/vdslib/src/vespa/vdslib/state/cluster_state_bundle.cpp
@@ -62,8 +62,8 @@ ClusterStateBundle::ClusterStateBundle(const ClusterState& baselineClusterState,
ClusterStateBundle::ClusterStateBundle(const ClusterStateBundle&) = default;
ClusterStateBundle& ClusterStateBundle::operator=(const ClusterStateBundle&) = default;
-ClusterStateBundle::ClusterStateBundle(ClusterStateBundle&&) = default;
-ClusterStateBundle& ClusterStateBundle::operator=(ClusterStateBundle&&) = default;
+ClusterStateBundle::ClusterStateBundle(ClusterStateBundle&&) noexcept = default;
+ClusterStateBundle& ClusterStateBundle::operator=(ClusterStateBundle&&) noexcept = default;
ClusterStateBundle::~ClusterStateBundle() = default;
@@ -90,7 +90,7 @@ ClusterStateBundle::getVersion() const
}
bool
-ClusterStateBundle::operator==(const ClusterStateBundle &rhs) const
+ClusterStateBundle::operator==(const ClusterStateBundle &rhs) const noexcept
{
if (!(*_baselineClusterState == *rhs._baselineClusterState)) {
return false;
diff --git a/vdslib/src/vespa/vdslib/state/cluster_state_bundle.h b/vdslib/src/vespa/vdslib/state/cluster_state_bundle.h
index ad9e07407a0..52a952e30bb 100644
--- a/vdslib/src/vespa/vdslib/state/cluster_state_bundle.h
+++ b/vdslib/src/vespa/vdslib/state/cluster_state_bundle.h
@@ -65,8 +65,8 @@ public:
ClusterStateBundle(const ClusterStateBundle&);
ClusterStateBundle& operator=(const ClusterStateBundle&);
- ClusterStateBundle(ClusterStateBundle&&);
- ClusterStateBundle& operator=(ClusterStateBundle&&);
+ ClusterStateBundle(ClusterStateBundle&&) noexcept;
+ ClusterStateBundle& operator=(ClusterStateBundle&&) noexcept;
~ClusterStateBundle();
const std::shared_ptr<const ClusterState> &getBaselineClusterState() const;
@@ -74,15 +74,15 @@ public:
const BucketSpaceStateMapping& getDerivedClusterStates() const noexcept {
return _derivedBucketSpaceStates;
}
- bool block_feed_in_cluster() const {
+ [[nodiscard]] bool block_feed_in_cluster() const noexcept {
return _feed_block.has_value() && _feed_block->block_feed_in_cluster();
}
const std::optional<FeedBlock>& feed_block() const { return _feed_block; }
uint32_t getVersion() const;
bool deferredActivation() const noexcept { return _deferredActivation; }
std::string toString() const;
- bool operator==(const ClusterStateBundle &rhs) const;
- bool operator!=(const ClusterStateBundle &rhs) const { return !operator==(rhs); }
+ bool operator==(const ClusterStateBundle &rhs) const noexcept;
+ bool operator!=(const ClusterStateBundle &rhs) const noexcept { return !operator==(rhs); }
};
std::ostream& operator<<(std::ostream&, const ClusterStateBundle&);