You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ru...@apache.org on 2020/04/10 00:32:55 UTC

[cassandra] 06/06: minor tweaks

This is an automated email from the ASF dual-hosted git repository.

rustyrazorblade pushed a commit to branch client-metrics
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 6a05bbd5fd817c91cc709bae63179e94365cc58a
Author: Jon Haddad jon@jonhaddad.com <jo...@jonhaddad.com>
AuthorDate: Thu Apr 9 17:32:33 2020 -0700

    minor tweaks
---
 src/java/org/apache/cassandra/transport/Frame.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/java/org/apache/cassandra/transport/Frame.java b/src/java/org/apache/cassandra/transport/Frame.java
index 4a20a50..b597cc2 100644
--- a/src/java/org/apache/cassandra/transport/Frame.java
+++ b/src/java/org/apache/cassandra/transport/Frame.java
@@ -303,12 +303,12 @@ public class Frame
             header.writeByte(type.opcode);
             header.writeInt(frame.body.readableBytes());
 
-            results.add(header);
-            results.add(frame.body);
-
-            int messageSize = header.writerIndex() + frame.body.writerIndex();
+            int messageSize = header.readableBytes() + frame.body.readableBytes();
             ClientRequestSizeMetrics.totalBytesWritten.inc(messageSize);
             ClientRequestSizeMetrics.bytesTransmittedPerFrame.update(messageSize);
+
+            results.add(header);
+            results.add(frame.body);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org