summaryrefslogtreecommitdiffstats
path: root/vdslib
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 /vdslib
parent3b590870d88f329c9219759d46924571ce3db66d (diff)
Followup on review comments and initialize members explicit.
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/vespa/vdslib/distribution/distribution.cpp12
1 files changed, 10 insertions, 2 deletions
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.