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/07/08 03:40:16 UTC

[incubator-iotdb] branch fix_unclosed_broken_file created (now 8941255)

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

jiangtian pushed a change to branch fix_unclosed_broken_file
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 8941255  fix unclosed broken file

This branch includes the following new commits:

     new 8941255  fix unclosed broken file

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: fix unclosed broken file

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 89412555c5b8ea74684d85be82022d5a9cd34cd3
Author: 江天 <jt...@163.com>
AuthorDate: Mon Jul 8 11:37:58 2019 +0800

    fix unclosed broken file
---
 .../writelog/recover/TsFileRecoverPerformer.java   | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/TsFileRecoverPerformer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/TsFileRecoverPerformer.java
index 0afc926..dcf850e 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/TsFileRecoverPerformer.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/TsFileRecoverPerformer.java
@@ -112,20 +112,20 @@ public class TsFileRecoverPerformer {
 
     // redo logs
     logReplayer.replayLogs();
-    if (!recoverMemTable.isEmpty()) {
-      // flush logs
-      MemTableFlushTask tableFlushTask = new MemTableFlushTask(recoverMemTable, fileSchema,
-          restorableTsFileIOWriter,
-          logNodePrefix);
-      try {
+    try {
+      if (!recoverMemTable.isEmpty()) {
+        // flush logs
+        MemTableFlushTask tableFlushTask = new MemTableFlushTask(recoverMemTable, fileSchema,
+            restorableTsFileIOWriter,
+            logNodePrefix);
         tableFlushTask.syncFlushMemTable();
-        // close file
-        restorableTsFileIOWriter.endFile(fileSchema);
-        tsFileResource.serialize();
-      } catch (ExecutionException | InterruptedException | IOException e) {
-        Thread.currentThread().interrupt();
-        throw new ProcessorException(e);
       }
+      // close file
+      restorableTsFileIOWriter.endFile(fileSchema);
+      tsFileResource.serialize();
+    } catch (ExecutionException | InterruptedException | IOException e) {
+      Thread.currentThread().interrupt();
+      throw new ProcessorException(e);
     }
 
     // clean logs