blerer commented on code in PR #2488:
URL: https://github.com/apache/cassandra/pull/2488#discussion_r1270442342


##########
src/java/org/apache/cassandra/fql/FullQueryLogger.java:
##########
@@ -380,25 +395,33 @@ public Batch(BatchStatement.Type batchType,
             this.values = values;
             this.batchType = batchType;
 
-            int weight = super.weight();
-
-            // weight, queries, values, batch type
-            weight += Integer.BYTES +            // cached weight
-                      2 * EMPTY_LIST_SIZE +      // queries + values lists
-                      3 * OBJECT_REFERENCE_SIZE; // batchType and two lists 
references
-
+            // We assume that all the lists are ArrayLists and that the size 
of each underlying array is the one of the list 

Review Comment:
   I think that it is too risky. Let's simply assume that it is ArrayList. We 
should be close enough from the reality.



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