-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis 7.0 cluster access fails with an error: got 4 elements in cluster info address, expected 2 or 3 #3031
Comments
Hi @vamsidarbhamulla 👋🏻 thanks for reporting it! We're not users of the cluster mode internally so it's good to get feedback on that feature specifically. I really appreciate that you even offered a docker-compose file to reproduce the issue. I'll give it a spin, and see if upgrading to go-redis v9 does solve this issue. If that's the case we'll look into upgrading the dependency indeed 👍🏻 |
I was able to reproduce the issue indeed 👍🏻 I've put together a branch of xk6-redis with go-redis updated to version 9, and it seems to sort the issue out. If you could give it a try and build a k6 executable, using xk6, including that xk6-redis branch, that would be much appreciated 🙇🏻 go install go.k6.io/xk6/cmd/xk6@latest
xk6 build v0.43.1 --with github.com/grafana/xk6-redis=.
./k6 run cluster.js I've included a docker-compose setup similar to yours in the branch to spin up a cluster, but ran into weird issues on MacOS where nodes can't talk to each other (it seems to work on linux). Thus, if you could take it for a spin to verify that it addresses your use case, that would raise our level of confidence that we're going in the right direction 👍🏻 Besides that, once we update the dependency some of our tests break, and some API changes have been made to the options, and I believe we'd need to put a bit more work into the changes to be able to deliver it to the |
Hi @oleiade , Thanks for looking into it and providing a working example using the xk6-redis repo branch. Before raising this bug, I did try to verify redis 7.0 cluster connection using go-redis v9 and it did work on local branch changes. But after looking into I can confirm the xk6-redis branch is working with redis 7.0 cluster, I will see if I can create a local build with these changes for my use-case till the next version of k6 releases. |
Thanks a lot for looking into it and giving it a try. Let me know if you need any support in producing a build with the fix 👍🏻 I'll take a look at why the tests break currently when I upgrade the redis dependency. Depending on the complexity of the problem, I might be able to get the updated dependency merged for the next version of k6 indeed, but not promises. I'll keep you updated as I make progress 🙇🏻♂️ |
Hi @oleiade - Thanks again. If it is possible I would request to get an xk6-redis build version with this fix for the cluster connection logic. I can directly build a local k6 executable if this change is available as a specific version. |
Hey @vamsidarbhamulla 👋🏻 We have recently updated the go-redis dependency of xk6-redis, updated how the If you have the opportunity, could you take it for a spin and let us know if your issue is addressed? Thank you 🙇🏻 |
Brief summary
When trying to pass in multiple node names as strings for redis 7.0
addrs
option property we receive back an error mentioning as belowERRO[0000] Uncaught (in promise) got 4 elements in cluster info address, expected 2 or 3
.Looks like go-redis has documented this observation and suggested to use go-redis v9 as a comment in one of their issues:
redis/go-redis#2085 (comment)
k6 version
k6 v0.43.1 ((devel), go1.20.1, )
OS
mac os 12 , darwin/arm64
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Simple k6 script to interact with redis 7.0 cluster :
Example docker-compose.yml for redis cluster 7.0:
Expected behaviour
k6 redis script should be able to interact with redis 7.0 cluster.
Actual behaviour
ERRO[0000] Uncaught (in promise) got 4 elements in cluster info address, expected 2 or 3
Specific issues identified related to the same:
Might need to use go-redis v9 :
redis/go-redis#2082
redis/redis#9530
The text was updated successfully, but these errors were encountered: