PragmaTwice commented on code in PR #2272:
URL: https://github.com/apache/kvrocks/pull/2272#discussion_r1580922769
##########
src/cluster/cluster.cc:
##########
@@ -37,11 +37,11 @@
#include "time_util.h"
ClusterNode::ClusterNode(std::string id, std::string host, int port, int role,
std::string master_id,
- std::bitset<kClusterSlots> slots)
+ std::bitset<kClusterSlots> const &slots)
: id(std::move(id)), host(std::move(host)), port(port), role(role),
master_id(std::move(master_id)), slots(slots) {}
Review Comment:
I don't think it will work. The data in bitset is on the stack intead of
heap.
--
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]