# ERR 槽 1234 未分配给任何节点

- **ID:** `redis/err-cluster-slot-unassigned`
- **领域:** redis
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

在 Redis 集群中，某个哈希槽未分配给任何节点，通常是由于集群初始化不完整、重新分片失败或节点移除后未重新分配槽位。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Redis 7.0.14 | active | — | — |
| Redis 7.2.2 | active | — | — |
| redis-cli 7.2.2 | active | — | — |

## 解决方案

1. ```
   Use redis-cli to fix the slot assignment: `redis-cli --cluster fix <any-node-ip>:6379`. This scans for unassigned slots and reassigns them automatically.
   ```
2. ```
   Manually assign the slot to a node using: `redis-cli --cluster addslots <node-ip>:6379 1234` after ensuring the node has the slot range available.
   ```
3. ```
   If resharding was interrupted, resume it: `redis-cli --cluster reshard <source-node-ip>:6379 --from <source-node-id> --to <target-node-id> --slots 1234 --yes`
   ```

## 无效尝试

- **** — Slots are persisted in cluster configuration, not reset on restart. (99% 失败率)
- **** — New nodes need explicit slot assignment via resharding. (80% 失败率)
