maedhroz commented on code in PR #3526:
URL: https://github.com/apache/cassandra/pull/3526#discussion_r1759228358
##########
src/java/org/apache/cassandra/hints/HintVerbHandler.java:
##########
@@ -89,6 +92,20 @@ else if
(!StorageProxy.instance.appliesLocally(hint.mutation))
// the topology has changed, and we are no longer a replica of the
mutation - since we don't know which node(s)
// it has been handed over to, re-address the hint to all
replicas; see CASSANDRA-5902.
HintsService.instance.writeForAllReplicas(hint);
+
+ HintsService.instance.metrics.incrHintsReceivedForUnownedRanges();
+ if (DatabaseDescriptor.getLogOutOfTokenRangeRequests())
+ {
+ // Log at most 1 message per second
+ NoSpamLogger.log(logger,
+ NoSpamLogger.Level.WARN,
+ 1,
+ TimeUnit.SECONDS,
+ "Received hint containing mutation from {}
for token {} outside valid range",
+ message.from(),
+ hint.mutation.key().getToken());
Review Comment:
I guess this applies to any `NoSpamLogger` usage across the whole codebase,
but no, you would see something like this:
```
WARN 17:14:06 Received mutation from /127.0.0.4:7012 for token
-3485513579396041028 outside valid range for keyspace distributed_test_keyspace
```
The interval is pretty small here at 1 second. I would hope operators
wouldn't attempt to use this as a comprehensive listing of all out-of-token
operations. (Although even if they did, they could cross reference with
`outOfRangeTokenWrites`.)
Is this something you'd want to address as a general problem with
`NoSpamLogger` or something where our messaging should indicate this is a
sample?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]