mediocregopher / radix.v2

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

Create new client for IOErr #45

Closed liuaifu closed 7 years ago

mediocregopher commented 7 years ago

Hi there, I'm really sorry to do this, but I have to reject this PR as it is. Unfortunately retrying commands is not a general purpose solution to almost any problem, this one included. The main reason being that we don't really know if the original attempt made it to the server or not. It may well have made it, but then we didn't receive the response for whatever reason. For commands like INCR or LPOP this will result in inconsistent data from the program's point of view.

Again really sorry, in the future feel free to submit an issue for what you plan to do for a PR before doing it, so we can avoid this kind of thing. I'll respond to your issue now too. Thanks!