Redis C++ client, support the data slice storage, support redis cluster, thread-safe,multi-platform,connection pool, read/write separation.
GNU General Public License v3.0
337
stars
153
forks
source link
redis cluster模式下主从切换后崩溃在集群连接处 #44
Closed
bulingma closed 5 years ago
redis cluster模式下,宕机一台主节点,发生主从切换后,宕机的主节点显示disconnected状态,则xRedisClusterClient::ConnectRedis函数内的逻辑会导致连接集群崩溃(访问非法内存nodeinfo[8]注:master fail状态时没有nodeinfo[8]),但是当前集群是可用的,该段代码建议增加如下代码: bool xRedisClusterClient::ConnectRedis(const char *host, uint32_t port, uint32_t poolsize) {
...
....
}