When the cluster slots information has not yet been allocated, getNodeAddrs may return empty data, causing the masters and replicas information to be cleared and unable to be restored to the correct state.
In addition, we should regard the getNodeAddrs parameter preferReplicas, such as EachNode's replicas or getRandomConn's readonly, we cannot simply fill in the address of the replicas directly in getNodeAddrs.
When the cluster slots information has not yet been allocated,
getNodeAddrs
may return empty data, causing the masters and replicas information to be cleared and unable to be restored to the correct state.In addition, we should regard the
getNodeAddrs
parameterpreferReplicas
, such asEachNode
'sreplicas
orgetRandomConn
'sreadonly
, we cannot simply fill in the address of the replicas directly ingetNodeAddrs
.