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



##########
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:
       there is one code path (not this) which hit a null (called from unit 
test), so I retroactively updated all paths to handle null




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