You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently checking the difference between using RouteRandomly and without (so both RouteRandomly and RouteLatency disabled)
From this line https://github.com/go-redis/redis/blob/4bda6ec2fb4a836bbffc0032ad3a0f2f79528ccb/cluster.go#L737 , it seems all nodes, including master, are considered in random checks, so for example if master node happens to be index 0 after shuffling, it will use master node, is this intended? I'm under assumption that this should only returns slave node if possible.
Also in fallback if all nodes failed in https://github.com/go-redis/redis/blob/4bda6ec2fb4a836bbffc0032ad3a0f2f79528ccb/cluster.go#L743, it just returns first randomly index. but this one is guaranteed failed (because this is checked first in for loop above this code). Alternative for this are:
Beta Was this translation helpful? Give feedback.
All reactions