Skip to content

[CASSANDRA-21538] Fix NullPointerException in nodetool listpendinghints - #4968

Open
Yukei7 wants to merge 1 commit into
apache:cassandra-4.1from
Yukei7:upstream/CASSANDRA-21538-4.1
Open

[CASSANDRA-21538] Fix NullPointerException in nodetool listpendinghints#4968
Yukei7 wants to merge 1 commit into
apache:cassandra-4.1from
Yukei7:upstream/CASSANDRA-21538-4.1

Conversation

@Yukei7

@Yukei7 Yukei7 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

nodetool listpendinghints crashes with a NullPointerException when a hint is still pending for a host id that is no longer part of the ring (the node was removed, decommissioned or replaced).

Fix: guard the null address, skip the snitch/gossip lookups in that case, and report the location fields (Address/Rack/DC/Status) as "Unknown" while still listing the pending hint.

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

nodetool listpendinghints crashes with a NullPointerException when a hint
is still pending for a host id that is no longer part of the ring (the node
was removed, decommissioned or replaced).

Fix: guard the null address, skip the snitch/gossip lookups in that case, and
report the location fields (Address/Rack/DC/Status) as "Unknown" while still
listing the pending hint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant