You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2019/01/20 03:01:04 UTC
[incubator-iotdb] branch delete_dev2 updated: fix tsfile writer
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch delete_dev2
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/delete_dev2 by this push:
new a6dbdbc fix tsfile writer
a6dbdbc is described below
commit a6dbdbcce83956f7201349596d308b5c6c89f6be
Author: 江天 <jt...@163.com>
AuthorDate: Sun Jan 20 11:00:24 2019 +0800
fix tsfile writer
---
tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java
index 93af2f3..3b8e819 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java
@@ -23,6 +23,7 @@ import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+
import org.apache.iotdb.tsfile.common.conf.TSFileConfig;
import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
import org.apache.iotdb.tsfile.exception.write.NoMeasurementException;
@@ -73,6 +74,7 @@ public class TsFileWriter {
**/
private long recordCountForNextMemCheck = 100;
private long chunkGroupSizeThreshold;
+ private long version = 0;
/**
* init this TsFileWriter.
@@ -261,7 +263,7 @@ public class TsFileWriter {
chunkGroupFooter.getDataSize(), fileWriter.getPos() - pos));
}
- fileWriter.endChunkGroup(chunkGroupFooter);
+ fileWriter.endChunkGroup(chunkGroupFooter, version++);
}
long actualTotalChunkGroupSize = fileWriter.getPos() - totalMemStart;
LOG.info("total chunk group size:{}", actualTotalChunkGroupSize);