PragmaTwice commented on code in PR #2272:
URL: https://github.com/apache/kvrocks/pull/2272#discussion_r1580771443
##########
src/cluster/cluster.h:
##########
@@ -97,18 +97,18 @@ class Cluster {
private:
std::string getNodeIDBySlot(int slot) const;
std::string genNodesDescription();
- std::string genNodesInfo();
- std::map<std::string, std::string> getClusterNodeSlots() const;
+ std::string genNodesInfo() const;
+ std::map<std::string, std::string, std::less<>> getClusterNodeSlots() const;
SlotInfo genSlotNodeInfo(int start, int end, const
std::shared_ptr<ClusterNode> &n);
static Status parseClusterNodes(const std::string &nodes_str, ClusterNodes
*nodes,
std::unordered_map<int, std::string>
*slots_nodes);
Server *srv_;
std::vector<std::string> binds_;
int port_;
- int size_;
- int64_t version_;
+ int size_ = 0;
+ int64_t version_ = -1;
std::string myid_;
- std::shared_ptr<ClusterNode> myself_;
+ std::shared_ptr<ClusterNode> myself_ = nullptr;
Review Comment:
It's useless.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]