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



##########
File path: src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
##########
@@ -837,7 +842,12 @@ private void maybeFail(ResultSetBuilder result, 
QueryOptions options)
             String clientMsg = msg + " with " + loggableTokens(options);
             ClientWarn.instance.warn(clientMsg);
             logger.warn("{} with query {}", msg, asCQL(options));
-            cfs().metric.clientReadSizeAborts.mark();
+            ColumnFamilyStore store = cfs();
+            if (store != null)
+            {
+                store.metric.clientReadSizeAborts.mark();
+                store.metric.clientReadSize.update(result.getSize());

Review comment:
       We're guaranteed not to update `clientReadSize` twice because we'll 
throw an exception and skip `maybeWarn()`, correct?




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