Some logic problem in routing cmds, bug or feature? #2142
Odysseusailoon
started this conversation in
General
Replies: 1 comment
-
@vmihailenco hi~ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that in V8/V9 there is a function name SlaveForKey, which aims to route the readonly cmds to slave node: fd6643d
however, it calls the slotReadOnlyNode, actually in this function if the client is in RouteByLatency || RouteRandomly mode, the cmd still can be routed to the master node.
is there any plan to modify this?
I noticed this because I'm implementing a feature that wrap Go-Redis with Circuit Breaker and I want to do a separate circuit breaker for master and slave nodes to handle the different read/write conditions, but in current implementation of client, I can't know if cmds have been routed to slave nodes or not in readonly mode.
Further more, I want the circuit breaker can gather information by node. however, we can't know which node the Go-redis route to, e.g. in routeByLatency or routeByRandom mode, we can not know which exact node the cmd route to. Is there any way to expose the node's addr or name? Can we modify the code to do this to make my circuit breaker fine-grained?
Beta Was this translation helpful? Give feedback.
All reactions