mediocregopher / radix.v2

Redis client for Go
http://godoc.org/github.com/mediocregopher/radix.v2
MIT License
433 stars 92 forks source link

`util.LuaEval` does not follow `MOVED` errors. #91

Closed JacobSieberg closed 5 years ago

JacobSieberg commented 5 years ago

When using LuaEval helper with a Cluster, MOVED errors are not handled.

When LuaEval is called it will attempt to execute the command using a client for the first key by calling withClientForKey. Here the a client is retrieved for that key and the command will be executed on that client. If the command results in a MOVED error, the error is returned instead of the command being forwarded to the correct node as would happen in a typical cluster command.

mediocregopher commented 5 years ago

Hey @JacobSieberg , thanks for the issue! Unfortunately making radix.v2 properly support this case isn't going to be doable without a lot of changes. If it's not too late for you to switch, radix.v3 properly supports this case, and is faster as well. Sorry I'm not able to help your specific problem though :(

JacobSieberg commented 5 years ago

@mediocregopher Thanks for the help. We could handle the error in the next level up; however, I think we are just going to make the upgrade to radix.v3.