Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clusterutil print dereference bug #578

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/groups/mqb/mqbc/mqbc_clusterutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1675,11 +1675,11 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
// Validate partition information
bsl::vector<ClusterStatePartitionInfo> incorrectPartitions;
for (size_t pid = 0; pid < state.partitions().size(); ++pid) {
const ClusterStatePartitionInfo& stateInfo = state.partitions()[pid];
const ClusterStatePartitionInfo& stateInfo = state.partition(pid);
BSLS_ASSERT_SAFE(stateInfo.partitionId() == pid);

const ClusterStatePartitionInfo& referenceInfo =
reference.partitions()[pid];
const ClusterStatePartitionInfo& referenceInfo = reference.partition(
pid);
BSLS_ASSERT_SAFE(referenceInfo.partitionId() == pid);
if (stateInfo.primaryLeaseId() != referenceInfo.primaryLeaseId()) {
// Partition information mismatch. Note that we don't compare
Expand All @@ -1699,7 +1699,7 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
bdlb::Print::newlineAndIndent(out, level);
out << "---------------------------";
bdlb::Print::newlineAndIndent(out, level);
out << "Incorrect Partition Infos :";
out << "Incorrect Partition Infos:";
bdlb::Print::newlineAndIndent(out, level);
out << "---------------------------";
for (bsl::vector<ClusterStatePartitionInfo>::const_iterator citer =
Expand Down Expand Up @@ -1791,9 +1791,9 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
citer != incorrectQueues.cend();
++citer) {
bdlb::Print::newlineAndIndent(out, level + 1);
out << citer->first;
out << *citer->first;
bdlb::Print::newlineAndIndent(out, level + 1);
out << "(correct queue info) " << citer->second;
out << "(correct queue info) " << *citer->second;
}
}

Expand All @@ -1809,7 +1809,7 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
citer != extraQueues.cend();
++citer) {
bdlb::Print::newlineAndIndent(out, level + 1);
out << *citer;
out << **citer;
}
}

Expand Down Expand Up @@ -1862,7 +1862,7 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
citer != missingQueues.cend();
++citer) {
bdlb::Print::newlineAndIndent(out, level + 1);
out << *citer;
out << **citer;
}
}

Expand All @@ -1885,7 +1885,7 @@ int ClusterUtil::validateState(bsl::ostream& errorDescription,
citer != domCit->second->queuesInfo().cend();
++citer) {
bdlb::Print::newlineAndIndent(out, level + 1);
out << citer->second;
out << *citer->second;
}
}
}
Expand Down
Loading
Loading