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/09 19:27:11 UTC

[GitHub] [cassandra] leeyutang opened a new pull request #743: CASSANDRA-16116 emit oversized mutation metric

leeyutang opened a new pull request #743:
URL: https://github.com/apache/cassandra/pull/743


   


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


[GitHub] [cassandra] smiklosovic closed pull request #743: CASSANDRA-16116 emit oversized mutation metric

Posted by GitBox <gi...@apache.org>.
smiklosovic closed pull request #743:
URL: https://github.com/apache/cassandra/pull/743


   


-- 
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: pr-unsubscribe@cassandra.apache.org

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


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

Posted by GitBox <gi...@apache.org>.
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.

##########
File path: src/java/org/apache/cassandra/db/Mutation.java
##########
@@ -127,6 +128,7 @@ public void validateSize(int version, int overhead)
         long totalSize = serializedSize(version) + overhead;
         if(totalSize > MAX_MUTATION_SIZE)
         {
+            CommitLog.instance.metrics.oversizedMutations.mark();;

Review comment:
       nit: extra ;




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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
clohfink commented on a change in pull request #743:
URL: https://github.com/apache/cassandra/pull/743#discussion_r493073908



##########
File path: src/java/org/apache/cassandra/db/Mutation.java
##########
@@ -127,6 +128,7 @@ public void validateSize(int version, int overhead)
         long totalSize = serializedSize(version) + overhead;
         if(totalSize > MAX_MUTATION_SIZE)
         {
+            CommitLog.instance.metrics.oversizedMutations.mark();;

Review comment:
       nit: extra ;




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