OneSizeFitsQuorum commented on code in PR #339:
URL: https://github.com/apache/tsfile/pull/339#discussion_r1889845494


##########
java/common/src/main/java/org/apache/tsfile/utils/PooledBinary.java:
##########
@@ -166,10 +134,11 @@ public int getArenaIndex() {
 
   @Override
   public long ramBytesUsed() {
-    return INSTANCE_SIZE + binary.ramBytesUsed();
+    return INSTANCE_SIZE + sizeOf(values);
   }
 
-  public Binary toBinary() {
-    return binary;
+  @Override
+  public long ramShallowBytesUsed() {

Review Comment:
   没发现被用到



##########
java/common/src/main/java/org/apache/tsfile/utils/Binary.java:
##########
@@ -70,7 +70,7 @@ public int compareTo(Binary other) {
   }
 
   // avoid overflow
-  private char getChar(byte[] val, int index) {
+  protected char getChar(byte[] val, int index) {

Review Comment:
   看起来 tsfile 包里面没有用到这个 protect 属性的?是在 iotdb 包里面吗?我没在 
https://github.com/MrQuansy/iotdb/commit/f99caa1733ee6b51abe72809e9fc37bb5a26c8cb
 搜到用到这个的



##########
java/common/src/main/java/org/apache/tsfile/utils/Binary.java:
##########
@@ -125,4 +149,12 @@ public void setValues(byte[] values) {
   public long ramBytesUsed() {
     return INSTANCE_SIZE + sizeOf(values);
   }
+
+  public long ramShallowBytesUsed() {

Review Comment:
   没发现被用到



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

Reply via email to