Jialin Qiao created IOTDB-324: --------------------------------- Summary: Inaccurate Statistics when write batch Key: IOTDB-324 URL: https://issues.apache.org/jira/browse/IOTDB-324 Project: Apache IoTDB Issue Type: Bug Affects Versions: 0.9.0 Reporter: Jialin Qiao
When writing a batch in ChunkWriterImpl, the statistics are updated without considering the batchSize. When writing a 100 size array, batch size is 90, the last 10 points is also calculated in the Statistics. In ChunkWirterImpl: ``` public void write(long[] timestamps, double[] values, int batchSize) { this.maxTimestamp = timestamps[batchSize - 1]; valueCountInOnePage += batchSize; if (minTimestamp == Long.MIN_VALUE) { minTimestamp = timestamps[0]; } pageWriter.write(timestamps, values, batchSize); pageStatistics.updateStats(values); ****************** this line is not correct checkPageSizeAndMayOpenANewPage(); } ``` -- This message was sent by Atlassian Jira (v8.3.4#803005)