maedhroz commented on a change in pull request #1180:
URL: https://github.com/apache/cassandra/pull/1180#discussion_r701396174



##########
File path: src/java/org/apache/cassandra/db/rows/BTreeRow.java
##########
@@ -497,6 +497,19 @@ public int dataSize()
         return Ints.checkedCast(accumulate((cd, v) -> v + cd.dataSize(), 
dataSize));
     }
 
+    @Override
+    public long unsharedHeapSize()
+    {
+        long heapSize = EMPTY_SIZE
+                        + clustering.unsharedHeapSize()
+                        + primaryKeyLivenessInfo.unsharedHeapSize()
+                        + deletion.unsharedHeapSize()

Review comment:
       Aside: Part of me wonders if having something like an `Accountable` 
interface for `unsharedHeapSize()` would make it possible to factor out some 
utilities for adding up the sizes of "Accountables". No action required, but I 
remember this being an interesting concept when I worked on Lucene in a past 
life.
   
   EDIT: ...and I just realized we have `IMeasurableMemory` :)




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