Commit 0e909af
committed
Fix: treat empty hostname in CLUSTER SLOTS metadata as absent
AWS ElastiCache (plaintext, cluster mode, Redis 7.2.4) returns
`hostname: ""` (empty string) in the CLUSTER SLOTS metadata for
every node. The parser was wrapping this in `Some("")`, which
caused `unwrap_or_else` at line 252 to use the empty string
instead of falling back to the IP address from the primary
identifier.
This resulted in connection addresses like `:6379` (no host),
which fail immediately. Because `refresh_slots_inner()` silently
drops connection errors, `createClient` resolves successfully but
the client has zero usable connections. Every subsequent command
fails with `AllConnectionsUnavailable`.
The fix filters out empty hostname strings at parse time, so they
are treated the same as absent hostnames, and the IP from the
primary identifier is used instead.
Signed-off-by: Daniel Rinehart <danielr@philo.com>1 parent 6f96c84 commit 0e909af
File tree
2 files changed
+45
-2
lines changed- glide-core/redis-rs/redis/src
2 files changed
+45
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
| |||
946 | 948 | | |
947 | 949 | | |
948 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
949 | 991 | | |
950 | 992 | | |
951 | 993 | | |
| |||
0 commit comments