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 2020/09/22 18:29:05 UTC

[GitHub] [cassandra] clohfink commented on a change in pull request #743: CASSANDRA-16116 emit oversized mutation metric

clohfink commented on a change in pull request #743:
URL: https://github.com/apache/cassandra/pull/743#discussion_r492947830



##########
File path: src/java/org/apache/cassandra/db/commitlog/CommitLog.java
##########
@@ -261,7 +261,15 @@ public CommitLogPosition add(Mutation mutation) throws CDCWriteException
     {
         assert mutation != null;
 
-        mutation.validateSize(MessagingService.current_version, ENTRY_OVERHEAD_SIZE);
+        try
+        {
+            mutation.validateSize(MessagingService.current_version, ENTRY_OVERHEAD_SIZE);
+        }
+        catch (MutationExceededMaxSizeException e)
+        {
+            metrics.oversizedMutations.mark();

Review comment:
       can we increment this metric inside of `mutation.validateSize` so its captured in the BlockingReadRepairs mutation case earlier as well? Also then we dont need to catch and rethrow the exception.




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

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