# ERR Slot 1234 is not owned by this node

- **ID:** `redis/redis-cluster-slot-ownership-error`
- **Domain:** redis
- **Category:** runtime_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

A client sent a request to a Redis cluster node that does not own the requested hash slot, typically due to stale cluster configuration or incomplete slot migration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| redis 6.0 | active | — | — |
| redis 6.2 | active | — | — |
| redis 7.0 | active | — | — |
| redis 7.2 | active | — | — |

## Workarounds

1. **Use `CLUSTER SETSLOT 1234 IMPORTING source-node-id` on the destination node and `CLUSTER SETSLOT 1234 MIGRATING destination-node-id` on the source, then run `redis-cli --cluster reshard <host>:<port> --from <source-id> --to <dest-id> --slots 1234` to migrate the slot.** (85% success)
   ```
   Use `CLUSTER SETSLOT 1234 IMPORTING source-node-id` on the destination node and `CLUSTER SETSLOT 1234 MIGRATING destination-node-id` on the source, then run `redis-cli --cluster reshard <host>:<port> --from <source-id> --to <dest-id> --slots 1234` to migrate the slot.
   ```
2. **Update client cluster configuration by calling `CLUSTER SLOTS` on a known node and reconfiguring the client's slot map, e.g., in redis-py: `r.cluster('slots')` to refresh.** (80% success)
   ```
   Update client cluster configuration by calling `CLUSTER SLOTS` on a known node and reconfiguring the client's slot map, e.g., in redis-py: `r.cluster('slots')` to refresh.
   ```
3. **If slot is unassigned, assign it to a node: `CLUSTER ADDSLOTS 1234` on the target node, then verify with `CLUSTER INFO`.** (75% success)
   ```
   If slot is unassigned, assign it to a node: `CLUSTER ADDSLOTS 1234` on the target node, then verify with `CLUSTER INFO`.
   ```

## Dead Ends

- **Manually adding the slot to the node using CLUSTER ADDSLOTS** — Adding slots without proper migration can cause data loss or inconsistency; CLUSTER ADDSLOTS is only safe for unassigned slots. (95% fail)
- **Restarting the node** — Restart does not update cluster topology; the node still does not own the slot unless a proper migration occurs. (90% fail)
- **Flushing all data on the node** — Deleting data does not reassign slots; the node remains without the slot, and data loss occurs. (98% fail)
