Giter Club home page Giter Club logo

Comments (15)

monkey92t avatar monkey92t commented on July 17, 2024

Thank you for your feedback. go-redis has not been adapted for IPv6. Are you interested in submitting a PR?

from go-redis.

panagiotspappas avatar panagiotspappas commented on July 17, 2024

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.

monkey92t avatar monkey92t commented on July 17, 2024

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.

monkey92t avatar monkey92t commented on July 17, 2024

Can you print the result of cluster slots?

See: https://redis.io/docs/latest/commands/cluster-slots/

from go-redis.

daviddzxy avatar daviddzxy commented on July 17, 2024

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.

daviddzxy avatar daviddzxy commented on July 17, 2024

Here is the PR @monkey92t

from go-redis.

monkey92t avatar monkey92t commented on July 17, 2024

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.

monkey92t avatar monkey92t commented on July 17, 2024

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.

monkey92t avatar monkey92t commented on July 17, 2024

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.

daviddzxy avatar daviddzxy commented on July 17, 2024

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.

daviddzxy avatar daviddzxy commented on July 17, 2024

I updated the PR. @monkey92t

from go-redis.

daviddzxy avatar daviddzxy commented on July 17, 2024

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.

daviddzxy avatar daviddzxy commented on July 17, 2024

Should I create another issue for this bug? I plan to make a PR with a fix later today.

from go-redis.

monkey92t avatar monkey92t commented on July 17, 2024

Should I create another issue for this bug? I plan to make a PR with a fix later today.

OK!

from go-redis.

daviddzxy avatar daviddzxy commented on July 17, 2024

Here is the issue

from go-redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.