mna / redisc

A Go redis cluster client built on top of redigo.
BSD 3-Clause "New" or "Revised" License
227 stars 35 forks source link

Improve the reliability of the refresh process due to the loss of slots #52

Closed ljfuyuan closed 11 months ago

ljfuyuan commented 11 months ago

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.

mna commented 11 months ago

Thanks for your contribution!