1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-11 22:42:42 +03:00

better cluster nodes discorvery strategy after MOVED error, add PubSub test

This commit is contained in:
leibale
2021-06-11 17:29:20 -04:00
parent 71242304bc
commit c29c1bb7d2
7 changed files with 312 additions and 9 deletions

View File

@@ -61,7 +61,7 @@ export default class RedisCluster {
if (err.message.startsWith('ASK')) {
// TODO
} else if (err.message.startsWith('MOVED')) {
await this.#slots.discover();
await this.#slots.discover(client);
if (redirections < (this.#options.maxCommandRedirections ?? 16)) {
return this.sendCommand(args, firstKeyIndex, isReadonly, redirections + 1);