You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by tw...@apache.org on 2022/06/22 13:27:52 UTC
[incubator-kvrocks] branch unstable updated: Fix unmatched iterator in Cluster::SetClusterNodes (#646)
This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 76e6355 Fix unmatched iterator in Cluster::SetClusterNodes (#646)
76e6355 is described below
commit 76e63553f2332356eef4aec993ef3f0045f83642
Author: Twice <tw...@gmail.com>
AuthorDate: Wed Jun 22 21:27:47 2022 +0800
Fix unmatched iterator in Cluster::SetClusterNodes (#646)
Co-authored-by: tison <wa...@gmail.com>
---
src/cluster.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cluster.cc b/src/cluster.cc
index bd1baa6..7a6c000 100644
--- a/src/cluster.cc
+++ b/src/cluster.cc
@@ -171,7 +171,7 @@ Status Cluster::SetClusterNodes(const std::string &nodes_str, int64_t version, b
// Update replicas info and size
for (auto &n : nodes_) {
if (n.second->role_ == kClusterSlave) {
- if (nodes_.find(n.second->master_id_) != nodes.end()) {
+ if (nodes_.find(n.second->master_id_) != nodes_.end()) {
nodes_[n.second->master_id_]->replicas.push_back(n.first);
}
}