You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/07/21 14:59:29 UTC
[incubator-iotdb] 01/01: fix truncate bug
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch bug/truncate
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit eb5c088005b58bfe648d6bdc96b2092278837e03
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Jul 21 22:59:09 2020 +0800
fix truncate bug
---
.../main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
index 48452ac..d259f1d 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
@@ -851,7 +851,7 @@ public class TsFileSequenceReader implements AutoCloseable {
}
boolean newChunkGroup = true;
// not a complete file, we will recover it...
- long truncatedPosition = TSFileConfig.MAGIC_STRING.getBytes().length;
+ long truncatedPosition = headerLength;
byte marker;
int chunkCnt = 0;
List<MeasurementSchema> measurementSchemaList = new ArrayList<>();