This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch iotdb39-autoreadrepair
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/iotdb39-autoreadrepair by this 
push:
     new fb55aa6  fix isComplete() check for a TsFile
fb55aa6 is described below

commit fb55aa66c2f4aef315ab7a2c977709152fa46432
Author: xiangdong huang <[email protected]>
AuthorDate: Wed Mar 20 15:16:23 2019 +0800

    fix isComplete() check for a TsFile
---
 .../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 6a9ad7b..7107c8b 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
@@ -147,7 +147,7 @@ public class TsFileSequenceReader implements AutoCloseable{
    * @throws IOException
    */
   public boolean isComplete() throws IOException {
-    return tsFileInput.size() == TSFileConfig.MAGIC_STRING.length() * 2 && 
readTailMagic()
+    return tsFileInput.size() >= TSFileConfig.MAGIC_STRING.length() * 2 && 
readTailMagic()
         .equals(readHeadMagic());
   }
 

Reply via email to