Comments (15)
Thank you for your feedback. go-redis has not been adapted for IPv6. Are you interested in submitting a PR?
from go-redis.
Hi, I have a question.
How come ping succeeds and the creation of group fails?
I mean, don't these two commands use/establish the same connection?
Is it possible to point to the differences between Ping and XGroupCreateMkStream, regarding to the connection?
from go-redis.
I'm not sure where the problem lies. In cluster mode, go-redis perceives all nodes within the cluster through the cluster slots command, using their IP addresses and ports to establish connections. However, I've checked all operations involving IP addresses, and they all use net.JoinHostPort(), which requires an IPv6 Redis cluster for testing.
from go-redis.
Can you print the result of cluster slots?
See: https://redis.io/docs/latest/commands/cluster-slots/
from go-redis.
I also encountered this error. Seems like moved, ask, addr = isMovedError(lastErr)
in func (c *ClusterClient) process(ctx context.Context, cmd Cmder) error
function returns IPv6 in bad format. I will try to make PR with a fix.
from go-redis.
from go-redis.
I currently do not have more devices to build an IPv6 cluster for testing. I am not sure about the data format of MOVE ADDR. If it looks like MOVE fd01:abcd::7d03:6379, then it is not a valid IPv6 format. However, after Redis fixes it, it may look like MOVE [fd01:abcd::7d03]:6379, which could cause compatibility issues.
from go-redis.
redis ipv6 issue redis/redis#6238
It looks like we can make some compatibility adjustments to handle both fd01:abcd::7d03:6379 and [fd01:abcd::7d03]:6379 types of IPv6 addresses properly. @daviddzxy, can you continue?
from go-redis.
Moreover, under normal circumstances, go-redis should not encounter MOVE. Before sending a command, go-redis calculates the node for the key and sends the Redis command to that node. This type of issue only occurs when Redis is reassigning slots, and it seems we triggered another bug that caused slot calculation errors.
from go-redis.
redis ipv6 issue redis/redis#6238
It looks like we can make some compatibility adjustments to handle both fd01:abcd::7d03:6379 and [fd01:abcd::7d03]:6379 types of IPv6 addresses properly. @daviddzxy, can you continue?
Sure, I ll update the PR.
from go-redis.
I updated the PR. @monkey92t
from go-redis.
I have done some more debugging. It turns out that when XGroupCreateMkStream
function is called the func cmdFirstKeyPos(cmd Cmder) int
function returns wrong pos number (It returns 1 instead of 2). As a result of this, the function func Slot(key string) int
will receive "create" key argument. This causes incorrectly calculated slot number and therefore we get MOVED error. @monkey92t
from go-redis.
Should I create another issue for this bug? I plan to make a PR with a fix later today.
from go-redis.
Should I create another issue for this bug? I plan to make a PR with a fix later today.
OK!
from go-redis.
from go-redis.
Related Issues (20)
- TSMRange - make fromTimestamp and toTimestamp interface typed instead of int HOT 1
- Incorrect slot calculation for Xgroup commands using Redis cluster
- SetNX returning false for new keys HOT 2
- Feature: Add Hash Field Expiration Commands
- connection pool timeout
- Sending reads to replica nodes on non-zero db not possible?
- "i/o timeout" err not retried when using Watch()
- panic: runtime error: invalid memory address or nil pointer dereference HOT 1
- Add Optional IGNORE Clause for Time Series Commands
- Issue with using Rings + Pipelines in v9
- Extra related packages cannot obtain the latest version HOT 2
- dbsize donot return error when server return a error
- Why does go-redis allow cluster mode cross-shard transactions and pipelines?
- fatal error: concurrent map iteration and map write
- Seeing lot of moved errors when Routebylatency is enabled in ClusterClient HOT 22
- Connection health checks completely ineffective for TLS connections
- Unable to connect to Redis cluster client using kubectl port-forward
- TTL duration overflow
- Why remove reaper() goroutine in pool.go in v9?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-redis.