nodetool resumehandoff
Resumes the delivery of hints that was previously paused.
Synopsis
Section titled “Synopsis”nodetool [connection_options] resumehandoffSee connection options for connection options.
Description
Section titled “Description”nodetool resumehandoff resumes the delivery of stored hints to their target nodes after it was paused with pausehandoff. When resumed, the node begins replaying accumulated hints to recovered replicas, restoring data consistency.
This command only affects hint delivery—it does not change whether new hints are being stored (controlled by enablehandoff/disablehandoff).
Resume After Pause
Use this command after pausehandoff to restore normal hint delivery behavior. If hints were disabled with disablehandoff, use enablehandoff instead.
Behavior
Section titled “Behavior”When hint delivery is resumed:
- Hint delivery threads become active
- Accumulated hints begin replaying to target nodes
- Recovered replicas receive their missing writes
- Consistency is progressively restored
Delivery Process
Section titled “Delivery Process”Resume Hint Delivery:
1. resumehandoff command received2. Hint delivery threads activated3. For each target node: - Check if node is UP via gossip - Begin streaming hints to node - Mark delivered hints for deletion4. Consistency restored without repairExamples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool resumehandoffResume and Monitor
Section titled “Resume and Monitor”nodetool resumehandoff
# Watch hint delivery progresswatch -n 2 'nodetool tpstats | grep -i hint'When to Use
Section titled “When to Use”After Temporary Pause
Section titled “After Temporary Pause”Resume normal operation after a maintenance pause:
# Maintenance complete, resume deliverynodetool resumehandoff
# Verify delivery is activenodetool tpstats | grep -i hintAfter Node Stabilization
Section titled “After Node Stabilization”When a recovering node is ready to receive hints:
# Node has stabilized after recoverynodetool resumehandoff
# Monitor hint deliverynodetool listpendinghintsAfter Troubleshooting
Section titled “After Troubleshooting”When hint-related investigation is complete:
# Issue resolved, resume deliverynodetool resumehandoff
# Check for pending hintsnodetool listpendinghintsDuring Maintenance Window
Section titled “During Maintenance Window”Resume hint delivery during off-peak hours:
# Off-peak hours, safe to resumenodetool resumehandoff
# Monitor progress until hints are deliveredwatch 'nodetool listpendinghints'Impact Assessment
Section titled “Impact Assessment”Immediate Effects
Section titled “Immediate Effects”| Aspect | Impact |
|---|---|
| Hint delivery threads | Activate immediately |
| Network traffic | Increases (hint streaming) |
| Target node load | Increases (processing hints) |
| Coordinator disk | Begins freeing (delivered hints removed) |
Short-term Effects
Section titled “Short-term Effects”| Aspect | Impact |
|---|---|
| Pending hint count | Decreases progressively |
| Data consistency | Improves as hints delivered |
| Hints table size | Shrinks as hints are delivered |
| Read performance | May improve on target nodes |
Gradual Delivery
Hints are delivered gradually based on hinted_handoff_throttle to prevent overwhelming target nodes.
Monitoring After Resume
Section titled “Monitoring After Resume”Track Hint Delivery
Section titled “Track Hint Delivery”# Watch hint delivery progresswatch -n 5 'nodetool listpendinghints'Monitor Thread Activity
Section titled “Monitor Thread Activity”# Check hint delivery threadsnodetool tpstats | grep -i hintExample output when delivering:
Pool Name Active Pending Completed Blocked All time blockedHintedHandoff 2 0 1523 0 0Track Hints Directory Size
Section titled “Track Hints Directory Size”# Monitor hints directory shrinking (hints stored as files)watch -n 30 'du -sh /var/lib/cassandra/hints/'Workflow: Complete Pause/Resume Cycle
Section titled “Workflow: Complete Pause/Resume Cycle”#!/bin/bashecho "=== Hint Delivery Pause/Resume Cycle ==="
# 1. Initial statusecho "1. Initial Status:"echo "Pending hints:"nodetool listpendinghintsecho ""echo "Hint threads:"nodetool tpstats | grep -i hint
# 2. Pause deliveryecho ""echo "2. Pausing hint delivery..."nodetool pausehandoff
# 3. Perform maintenance or waitecho ""echo "3. Hint delivery paused. Perform maintenance or press Enter to resume."read -p "Press Enter to continue..."
# 4. Resume deliveryecho ""echo "4. Resuming hint delivery..."nodetool resumehandoff
# 5. Monitor delivery progressecho ""echo "5. Monitoring delivery (Ctrl+C to exit):"while true; do pending=$(nodetool listpendinghints 2>/dev/null | tail -n +2 | awk '{sum+=$2} END {print sum+0}') echo "$(date '+%H:%M:%S') - Pending hints: $pending"
if [ "$pending" -eq 0 ]; then echo "All hints delivered!" break fi sleep 5done
echo ""echo "=== Cycle Complete ==="Throttling Hint Delivery
Section titled “Throttling Hint Delivery”Default Throttling
Section titled “Default Throttling”Hint delivery is throttled by default to prevent overwhelming target nodes. Parameter names vary by version:
| Cassandra Version | Throttle Parameter | Example |
|---|---|---|
| Pre-4.1 | hinted_handoff_throttle_in_kb | 1024 |
| 4.1+ | hinted_handoff_throttle | 1024KiB |
# cassandra.yaml (4.1+)hinted_handoff_throttle: 1024KiBmax_hints_delivery_threads: 2
# cassandra.yaml (Pre-4.1)# hinted_handoff_throttle_in_kb: 1024# max_hints_delivery_threads: 2Adjust During Delivery
Section titled “Adjust During Delivery”# If delivery is too slow and nodes can handle morenodetool sethintedhandoffthrottlekb 2048
# If target nodes are strugglingnodetool sethintedhandoffthrottlekb 512Monitor Delivery Rate
Section titled “Monitor Delivery Rate”#!/bin/bash# Monitor hint delivery rate
prev_completed=0while true; do completed=$(nodetool tpstats 2>/dev/null | grep "HintedHandoff" | awk '{print $4}') if [ -n "$prev_completed" ] && [ "$prev_completed" -gt 0 ]; then rate=$((completed - prev_completed)) echo "$(date '+%H:%M:%S') - Hints delivered in last interval: $rate" fi prev_completed=$completed sleep 10doneCluster-Wide Operations
Section titled “Cluster-Wide Operations”Resume on All Nodes
Section titled “Resume on All Nodes”#!/bin/bashecho "Resuming hint delivery cluster-wide..."
# Get list of node IPs from local nodetool statusnodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do echo -n "$node: " ssh "$node" 'nodetool resumehandoff 2>/dev/null && echo "resumed" || echo "FAILED"'done
echo ""echo "Verification (hint thread activity):"for node in $nodes; do echo "=== $node ===" ssh "$node" "nodetool tpstats 2>/dev/null | grep -i hint"doneMonitor Cluster-Wide Delivery
Section titled “Monitor Cluster-Wide Delivery”#!/bin/bashecho "=== Cluster Hint Delivery Status ==="
# Get list of node IPs from local nodetool statusnodes=$(nodetool status | grep "^UN" | awk '{print $2}')
total_pending=0for node in $nodes; do pending=$(ssh "$node" "nodetool listpendinghints 2>/dev/null | tail -n +2 | awk '{sum+=$2} END {print sum+0}')" echo "$node: $pending pending hints" total_pending=$((total_pending + pending))done
echo ""echo "Total cluster pending hints: $total_pending"Troubleshooting
Section titled “Troubleshooting”Hints Not Being Delivered After Resume
Section titled “Hints Not Being Delivered After Resume”# Check if target nodes are UPnodetool status
# Check hint thread activitynodetool tpstats | grep -i hint
# Check for errors in logsgrep -i "hint" /var/log/cassandra/system.log | tail -20Slow Hint Delivery
Section titled “Slow Hint Delivery”# Check current throttle settingnodetool gethintedhandoffthrottlekb
# Increase if nodes can handle morenodetool sethintedhandoffthrottlekb 2048
# Check hint delivery threadsnodetool tpstats | grep -i hintHint Delivery Errors
Section titled “Hint Delivery Errors”# Check logs for hint delivery failuresgrep -i "hint" /var/log/cassandra/system.log | grep -i "error\|fail" | tail -20
# Check target node connectivitynodetool ring | head -20
# Verify target node is responsivessh <target_node> "nodetool info"Hints Expired During Pause
Section titled “Hints Expired During Pause”If hints expired while delivery was paused:
# Check pending hints (may show 0 if expired)nodetool listpendinghints
# Run repair to restore consistencynodetool repair -prRecovery After Extended Pause
Section titled “Recovery After Extended Pause”If hints were paused for an extended period:
#!/bin/bashecho "=== Recovery After Extended Hint Pause ==="
# 1. Resume hint deliveryecho "1. Resuming hint delivery..."nodetool resumehandoff
# 2. Check for pending hintsecho ""echo "2. Pending hints:"nodetool listpendinghints
pending=$(nodetool listpendinghints 2>/dev/null | tail -n +2 | awk '{sum+=$2} END {print sum+0}')
if [ "$pending" -eq 0 ]; then echo "" echo "WARNING: No pending hints found." echo "If hints were paused longer than the hint window, they may have expired." echo "" echo "3. Running repair to restore consistency..." nodetool repair -prelse echo "" echo "3. $pending hints pending, monitoring delivery..." # Monitor until complete while [ "$pending" -gt 0 ]; do sleep 10 pending=$(nodetool listpendinghints 2>/dev/null | tail -n +2 | awk '{sum+=$2} END {print sum+0}') echo "Pending: $pending" done echo "All hints delivered!"fi
echo ""echo "=== Recovery Complete ==="Best Practices
Section titled “Best Practices”Resume Guidelines
- Resume promptly - Don't leave hints paused beyond the hint window
- Monitor after resume - Watch hint delivery progress
- Check throttling - Adjust if delivery is too slow or fast
- Verify target nodes - Ensure target nodes are UP before resuming
- Plan for expired hints - Run repair if hints may have expired
- Resume cluster-wide - If paused cluster-wide, resume on all nodes
After Extended Pause
If hints were paused longer than max_hint_window (default 3 hours), some hints may have expired. Run nodetool repair -pr after resuming to ensure full consistency.
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| pausehandoff | Pause hint delivery |
| enablehandoff | Enable hint storage |
| disablehandoff | Disable hint storage and delivery |
| statushandoff | Check handoff status |
| listpendinghints | List pending hints |
| truncatehints | Remove all hints |
| sethintedhandoffthrottlekb | Control delivery throttle |