maedhroz commented on a change in pull request #1180:
URL: https://github.com/apache/cassandra/pull/1180#discussion_r701427651



##########
File path: src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
##########
@@ -818,12 +819,16 @@ private void maybeWarn(ResultSetBuilder result, 
QueryOptions options)
     {
         if (!options.isClientTrackWarningsEnabled())
             return;
+        ColumnFamilyStore store = cfs();
+        if (store != null)
+            store.metric.clientReadSize.update(result.getSize());
         if (result.shouldWarn(options.getClientLargeReadWarnThresholdKb()))
         {
             String msg = String.format("Read on table %s has exceeded the size 
warning threshold of %,d kb", table, 
options.getClientLargeReadWarnThresholdKb());
             ClientWarn.instance.warn(msg + " with " + loggableTokens(options));
             logger.warn("{} with query {}", msg, asCQL(options));
-            cfs().metric.clientReadSizeWarnings.mark();

Review comment:
       Was it possible for this to be `null` before and we weren't checking, or 
is it only now possible and hence the check?




-- 
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]

Reply via email to