Commit aa9c5b1
authored
fix(cluster): avoid ClusterAllFailedError in certain cases
Closes #1330
Revert 8524eea. Before 4.24.1, ioredis asked cluster nodes for cluster slot information when connecting and periodically after connected. If all cluster nodes failed to provide the information (ex all nodes were down), ioredis would raise the "Failed to refresh slots cache" error and reconnect to the cluster (and print debug log Reset with [] ) if it hadn't connected, otherwise (when running periodically) it would just ignore.
After 4.24.1, ioredis will raise and reconnect to the cluster even the cluster has already connected. This change is introduced to make failover detection faster.
However, the commit causes `ClusterAllFailedError` in certain cases so we'll revert this and find other solutions.1 parent aafc349 commit aa9c5b1
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
| |||
513 | 520 | | |
514 | 521 | | |
515 | 522 | | |
516 | | - | |
517 | | - | |
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
| |||
0 commit comments