cluster slots not rediscovered on scale-down cluster
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, redis, typescript
调研方向
从 packages/client/lib/cluster/index.ts 开始,重点查看针对 MOVED 和 ASK 回复所示的 #slots.rediscover() 调用。重现 reshard、del-node 和 shutdown 序列,然后跟踪过时的集群拓扑如何仍处于活动状态。当 scale-down 情况刷新 slots 并避免报告的 “connection closed” 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Description
#slots.rediscover() is correctly called when MOVED or ASK reply is received:
there is a problem / race-condition on scale-down cluster (rebalance hash slots away, forget node, shutdown):
#slots.rediscover() might never be called, if the leaving node has not been queried (after it's slots migrated away) before shutdown (hence it never got a chance to reply with MOVED and trigger a rediscover)
this results in connection closed errors, because node-redis cluster.#slots is keeping a client active for an outdated cluster topology.
steps to reproduce:
- start a redis cluster
- create node-redis client and connect
- redis-cli reshard all slots away from a redis cluster node
- redis-cli del-node the now empty node, then shutdown
- node-redis client execute command for a key, which is sharded the (now shutdown) node
connection closederror
an option to fix this would be to provide an option for a slot refresh interval (ioredis does this too), will send a pull request
Node.js Version
No response
Redis Server Version
No response
Node Redis Version
No response
Platform
No response
Logs
No response
- 主要语言
- TypeScript
- 星标
- 17.6k
- 派生
- 2k
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 62
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redis/node-redis 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
redis/node-redis#3664 · 1 条评论 ·
维护者通常 1 天内回复
-
After a MOVING handoff, a client never becomes ready again on reconnect可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 68/100
redis/node-redis#3705 ·
维护者通常 1 天内回复
-
accepted Bug
难度 3/5 1-2 天 新手友好度 52/100
redis/node-redis#3674 · 1 条评论 ·
维护者通常 1 天内回复
-
Support Uint8Array values for zero-copy transfer to worker_threads可能已有人在做 @umeshmore45 于 286 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
redis/node-redis#3106 · 3 条评论 ·
维护者通常 1 天内回复
-
`RedisClientType` type is slow to typecheck (TS performance issue)可能重新可做 @nkaradzhov 于 556 天前认领,目前没有进行中的 PR。 未关闭Bug
redis/node-redis#2975 · 30 条评论 · 27 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
agent/guide documentation help wanted stage/010-actionable
难度 1/5 1 小时以内 新手友好度 82/100
kubestellar/console-marketplace#1101 ·
维护者通常 1 天内回复
-
Java Edition Tests
难度 2/5 1-3 小时 新手友好度 72/100
JSPrismarine/JSPrismarine#4178 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
totec448-spec/chat-on-steroids#2394 ·
维护者通常 1 天内回复
-
github_actions
难度 2/5 1-3 小时 新手友好度 70/100
StellarHyperion/stellarhyperion-backend#499 ·
维护者通常 1 天内回复