summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-02-05 10:53:01 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-02-05 10:53:01 +0000
commitf68aab16a9e45b0341d458f7a6856e2348113a18 (patch)
tree780e12c083878ce36b8309db494dbfb8cb2ba38f
parent3b590870d88f329c9219759d46924571ce3db66d (diff)
Followup on review comments and initialize members explicit.
-rw-r--r--storage/src/vespa/storage/common/global_bucket_space_distribution_converter.cpp2
-rw-r--r--vdslib/src/vespa/vdslib/distribution/distribution.cpp12
2 files changed, 11 insertions, 3 deletions
diff --git a/storage/src/vespa/storage/common/global_bucket_space_distribution_converter.cpp b/storage/src/vespa/storage/common/global_bucket_space_distribution_converter.cpp
index 1d632c14cd5..eb42f19a5e8 100644
--- a/storage/src/vespa/storage/common/global_bucket_space_distribution_converter.cpp
+++ b/storage/src/vespa/storage/common/global_bucket_space_distribution_converter.cpp
@@ -159,7 +159,7 @@ GlobalBucketSpaceDistributionConverter::convert_to_global(const DistributionConf
std::shared_ptr<lib::Distribution>
GlobalBucketSpaceDistributionConverter::convert_to_global(const lib::Distribution& distr) {
- const auto & src_config = distr.serialize();
+ const auto src_config = distr.serialize();
auto global_config = convert_to_global(*string_to_config(src_config));
return std::make_shared<lib::Distribution>(*global_config);
}
diff --git a/vdslib/src/vespa/vdslib/distribution/distribution.cpp b/vdslib/src/vespa/vdslib/distribution/distribution.cpp
index 7ca85998d7e..4a174feffcc 100644
--- a/vdslib/src/vespa/vdslib/distribution/distribution.cpp
+++ b/vdslib/src/vespa/vdslib/distribution/distribution.cpp
@@ -44,6 +44,8 @@ Distribution::Distribution()
_node2Group(),
_redundancy(),
_initialRedundancy(0),
+ _readyCopies(0),
+ _activePerGroup(false),
_ensurePrimaryPersisted(true)
{
auto config(getDefaultDistributionConfig(0, 0));
@@ -60,6 +62,8 @@ Distribution::Distribution(const Distribution& d)
_node2Group(),
_redundancy(),
_initialRedundancy(0),
+ _readyCopies(0),
+ _activePerGroup(false),
_ensurePrimaryPersisted(true),
_serialized(d._serialized)
{
@@ -84,6 +88,8 @@ Distribution::Distribution(const vespa::config::content::StorDistributionConfig
_node2Group(),
_redundancy(),
_initialRedundancy(0),
+ _readyCopies(0),
+ _activePerGroup(false),
_ensurePrimaryPersisted(true)
{
vespalib::asciistream ost;
@@ -99,6 +105,8 @@ Distribution::Distribution(const vespalib::string& serialized)
_node2Group(),
_redundancy(),
_initialRedundancy(0),
+ _readyCopies(0),
+ _activePerGroup(false),
_ensurePrimaryPersisted(true),
_serialized(serialized)
{
@@ -332,7 +340,7 @@ bool
Distribution::allDistributorsDown(const Group& g, const ClusterState& cs)
{
if (g.isLeafGroup()) {
- for (unsigned short node : g.getNodes()) {
+ for (uint16_t node : g.getNodes()) {
const NodeState& ns(cs.getNodeState(Node(NodeType::DISTRIBUTOR, node)));
if (ns.getState().oneOf("ui")) return false;
}
@@ -389,7 +397,7 @@ Distribution::getIdealNodes(const NodeType& nodeType, const ClusterState& cluste
tmpResults.reserve(groupRedundancy);
tmpResults.clear();
tmpResults.resize(groupRedundancy);
- for (unsigned short node : nodes) {
+ for (uint16_t node : nodes) {
// Verify that the node is legal target before starting to grab
// random number. Helps worst case of having to start new random
// seed if the node that is out of order is illegal anyways.