You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/05/05 21:39:46 UTC

[GitHub] [cassandra] dcapwell commented on a diff in pull request #1606: CASSANDRA-17593: StorageService read threshold get methods throw NullPointerException due to not handling null configs

dcapwell commented on code in PR #1606:
URL: https://github.com/apache/cassandra/pull/1606#discussion_r866334835


##########
src/java/org/apache/cassandra/locator/TokenMetadata.java:
##########
@@ -601,7 +601,7 @@ public Collection<Token> getTokens(InetAddressAndPort endpoint)
         lock.readLock().lock();
         try
         {
-            assert isMember(endpoint); // don't want to return nulls
+            assert isMember(endpoint): String.format("Unable to get tokens for %s; it is not a member", endpoint); // don't want to return nulls

Review Comment:
   was found in testing, I don't like `null` messages, so added message



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org