You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "Maxwell-Guo (via GitHub)" <gi...@apache.org> on 2023/06/09 06:28:20 UTC

[GitHub] [cassandra] Maxwell-Guo commented on a diff in pull request #2368: Track the amount of read data per row

Maxwell-Guo commented on code in PR #2368:
URL: https://github.com/apache/cassandra/pull/2368#discussion_r1223894641


##########
src/java/org/apache/cassandra/io/util/TrackedDataInputPlus.java:
##########
@@ -49,53 +66,61 @@ public void reset(long count)
 
     public boolean readBoolean() throws IOException
     {
+        checkCanRead(1);

Review Comment:
   I agree with your point of view. From the perspective of code readability, TypeSizes.BOOL_SIZE is definitely much better than hard code 1.
   What I said above means that if the existing code is already written as 1/4/8, our newly added code also fills in 1/4/8, then it just echoes back and forth, so the readability is not bad.
   Of course, if Jacek is willing to change the existing numbers to TypeSizes, I definitely support your point of view.



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