1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-17 20:17:02 +03:00

3 Commits

Author SHA1 Message Date
Alexander Yastrebov
d83436b321
fix: fixes ring.SetAddrs and rebalance race (#2283)
* fix: fixes ring.SetAddrs and rebalance race

The change ensures atomic update of `c.hash` and `c.shards`.

`BenchmarkRingRebalanceLocked` shows rebalance latency:
```
go test . -run=NONE -bench=BenchmarkRingRebalanceLocked -v -count=10 | benchstat /dev/stdin
name                   time/op
RingRebalanceLocked-8  8.50µs ±14%
```

(Note: it essentially reverts a46b053aa626a005a30dfb1ac4e096abcce1ef76)
2022-11-21 11:00:00 +02:00
Vladimir Mihailenco
d9e2420125 Fix build 2020-05-21 10:03:09 +03:00
Vladimir Mihailenco
0d132966a4 Add missing options to UniversalOptions 2018-08-15 08:44:06 +03:00