nodetool resetlocalschema¶
Resets the local schema by fetching it from another node.
Synopsis¶
nodetool [connection_options] resetlocalschema
Description¶
nodetool resetlocalschema discards the local schema and fetches a fresh copy from another node in the cluster. This is useful for resolving schema disagreements when a node has incorrect or corrupted schema.
Destructive Operation
This discards the local schema entirely. Ensure other nodes have the correct schema before running.
Examples¶
Basic Usage¶
nodetool resetlocalschema
When to Use¶
Persistent Schema Disagreement¶
# Check schema versions
nodetool describecluster | grep -A 5 "Schema versions"
# If this node has unique/wrong schema
nodetool resetlocalschema
After Failed Schema Migration¶
# If schema migration left node in bad state
nodetool resetlocalschema
Process Flow¶
1. Local schema tables are truncated
2. Schema is fetched from another node
3. Local schema is rebuilt
4. Node should match cluster schema
Best Practices¶
Guidelines
- Verify cluster schema - Ensure other nodes are correct
- Last resort - Try reloadlocalschema first
- Monitor after - Verify schema agreement
Related Commands¶
| Command | Relationship |
|---|---|
| reloadlocalschema | Reload local schema |
| describecluster | View schema versions |