Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool listpendinghints

Cassandra 4.1+

This command is available in Cassandra 4.1 and later.

Lists the pending hints for each node in the cluster.


Terminal window
nodetool [connection_options] listpendinghints

See connection options for connection options.

nodetool listpendinghints displays information about hints that are waiting to be delivered to their target nodes. Hints are stored when a write cannot reach all replica nodes, and are delivered when those nodes become available again.

This command helps monitor hint backlog and identify nodes that may have been unavailable.


Terminal window
nodetool listpendinghints

Host ID Hints
12345678-1234-1234-1234-123456789abc 1523
87654321-4321-4321-4321-cba987654321 42
abcdef12-3456-7890-abcd-ef1234567890 0
FieldDescription
Host IDUUID of the target node
HintsNumber of pending hints for that node

Terminal window
# Check pending hints
nodetool listpendinghints
# High numbers indicate recent node unavailability

Verify hints are being delivered:

Terminal window
# Check hints before and after
nodetool listpendinghints
# Wait and check again
sleep 60
nodetool listpendinghints
# Counts should decrease as hints are delivered

When investigating data inconsistencies:

Terminal window
# Large hint counts for a node suggest recent outage
nodetool listpendinghints
# Consider running repair if hints are old

monitor_pending_hints.sh
#!/bin/bash
THRESHOLD=10000
echo "=== Pending Hints Check ==="
total_hints=0
nodetool listpendinghints | tail -n +2 | while read host_id hints; do
total_hints=$((total_hints + hints))
if [ "$hints" -gt "$THRESHOLD" ]; then
echo "WARNING: $host_id has $hints pending hints"
elif [ "$hints" -gt 0 ]; then
echo "INFO: $host_id has $hints pending hints"
fi
done
echo ""
echo "Total pending hints: $total_hints"

cluster_pending_hints.sh
#!/bin/bash
echo "=== Cluster Pending Hints ==="
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do
echo ""
echo "=== Hints on $node ==="
ssh "$node" 'nodetool listpendinghints 2>/dev/null | tail -n +2 | awk "{sum+=\$2} END {print \"Total:\", sum}"'
done

1. Write received by coordinator
2. Replica unreachable → hint stored locally
3. Replica recovers → hint delivered
4. Successful delivery → hint deleted

Hints are only stored for nodes that have been down less than the hint window. The cassandra.yaml parameter name varies by version:

Cassandra VersionParameter NameExample
Pre-4.1max_hint_window_in_ms10800000 (3 hours)
4.1+max_hint_window3h
# cassandra.yaml (4.1+)
max_hint_window: 3h
# cassandra.yaml (Pre-4.1)
# max_hint_window_in_ms: 10800000

Terminal window
# Check which nodes have pending hints
nodetool listpendinghints
# Check if target nodes are UP
nodetool status
# If target is UP but hints not delivering, check:
nodetool tpstats | grep -i hint
Terminal window
# Check hint delivery status
nodetool statushandoff
# Ensure delivery is not paused
nodetool resumehandoff
# Check for delivery errors
grep -i "hint" /var/log/cassandra/system.log | tail -20
Terminal window
# May indicate network issues
# Check connectivity to target nodes
nodetool status
# Check for intermittent failures
nodetool failuredetector

ScenarioHintsConsistency
Hints deliveredDecreasingBeing restored
Hints stale (expired)May show 0Requires repair
Hints accumulatingIncreasingTarget node down

Hint Expiration

Hints older than max_hint_window are dropped. If a node was down longer than this window, use nodetool repair to restore consistency.


Hint Monitoring Guidelines

  1. Regular checks - Include in monitoring
  2. Alert on high counts - May indicate failing nodes
  3. Watch trends - Increasing hints = problem
  4. Repair after long outages - Don't rely on hints alone
  5. Size hint storage - Ensure adequate disk for hints

Normal Behavior

  • Small hint counts are normal during temporary outages
  • Hints should decrease as target nodes recover
  • Zero hints is ideal but brief non-zero is okay

CommandRelationship
truncatehintsRemove all pending hints
statushandoffCheck handoff status
pausehandoffPause hint delivery
resumehandoffResume hint delivery
repairRestore consistency