You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When it starts to do the GC, the generation it uses is from 1 minute ago. This will result in a gap between clusterNode.generation and GC generation and causes activeAddrs are not updated in time. I add some support log to verify this:
time 2025-02-19 09:01:44: GC, generation: 1
time 2025-02-19 09:01:44: GC, current nodes: 7
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.12:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.16:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.11:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.15:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.13:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: 172.19.0.14:6379, generation: 6
time 2025-02-19 09:01:44: GC, node addr: redis.example.com:6379, generation: 0
time 2025-02-19 09:01:44: GC, current activeAddrs: [172.19.0.12:6379 172.19.0.16:6379 172.19.0.11:6379 172.19.0.15:6379 172.19.0.13:6379 172.19.0.14:6379]
We can find that nodes generation(which is 6) is greater than GC generation(which is 1).
If I wanna switch a redis cluster by operating the DNS record and shutting down the old cluster, it will take one minute to make the activeAddrs be the new cluster IPs. If the old cluster reboot in this one minute, it will causes the real connection drift between the two clusters.
I wanna check is it an expected action or to prevent some problems?
The text was updated successfully, but these errors were encountered:
Hello @DingYuan0118, thank you for reaching out. We are officially supporting v9+ at the moment. If I have the bandwidth I will review this issue in the following weeks.
Discussed in #3283
Originally posted by DingYuan0118 February 19, 2025
version: github.com/go-redis/redis/v8 v8.11.5
Since redis cluster client start to reload state every 10 seconds (Assume traffic always exists) likes below
and do
GC
one minute after theReload()
like:When it starts to do the GC, the generation it uses is from 1 minute ago. This will result in a gap between
clusterNode.generation
andGC generation
and causesactiveAddrs
are not updated in time. I add some support log to verify this:output like
We can find that nodes generation(which is 6) is greater than GC generation(which is 1).
If I wanna switch a redis cluster by operating the DNS record and shutting down the old cluster, it will take one minute to make the
activeAddrs
be the new cluster IPs. If the old cluster reboot in this one minute, it will causes the real connection drift between the two clusters.I wanna check is it an expected action or to prevent some problems?
The text was updated successfully, but these errors were encountered: