You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/01/07 08:57:40 UTC

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #709: [IOTDB-401]Correct the calculation of a chunk if there is no data in the chunk

jt2594838 commented on a change in pull request #709: [IOTDB-401]Correct the calculation of a chunk if there is no data in the chunk
URL: https://github.com/apache/incubator-iotdb/pull/709#discussion_r363646954
 
 

 ##########
 File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
 ##########
 @@ -231,6 +231,9 @@ public long estimateMaxSeriesMemSize() {
 
   @Override
   public long getCurrentChunkSize() {
+    if (this.getCurrentDataSize() == 0) {
 
 Review comment:
   You may save the calculation result and use it in line238 to avoid duplicated calculation.
   
   And if all chunks in a chunk group are empty, this chunk group should not be flushed into the file, which will generate an empty ChunkGroupMetadata and waste some space.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services