Description
Please refer to my test program here: #753 (comment)
In trying to figure out why your "cluster races" test cases succeed while my program fails, I discovered that your cluster client is configured with full addresses like "127.0.0.1:8220"
, while my program uses a port-only address (":7000"
), and indeed, my program stops failing when I instead connect to "127.0.0.1:7000"
. I'm also seeing the exact same behavior on the Redis Cluster booted by your test cases (by inserting a select{} // block forever
somewhere so I could run my program against it).
I'm seeing the same problem when using addresses like "0.0.0.0:8220"
and "localhost:8220"
. Only "127.0.0.1:8220"
works (or actually, the entire 127.0.0.0/8
block seems to work)
I'd like send a test case patch to replicate the problem, but it's non-trivial because there's an internal consistency check (clusterClient.GetState().IsConsistent()
in cluster_test.go
) which fails for these problematic addresses, so it seems like the tests know that these addresses are bad, while there's no indication I'm doing anything wrong (except for cryptic random MOVED errors) when using go-redis
as a package.
Also, I haven't figured out why the errors occur. But it seems like a go-redis
bug (because it only happens under concurrent load), or: if I'm doing something wrong with my addresses, at least go-redis
should give me a better error message?
Anyway, I know how to work around the problem now, but I can spare some time to write up a fix if you give some pointers on how to approach it.