You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/06/21 07:32:35 UTC

[incubator-iotdb] branch feature_async_close_tsfile updated: fix TsFileResource bug

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

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


The following commit(s) were added to refs/heads/feature_async_close_tsfile by this push:
     new 14c1c74  fix TsFileResource bug
14c1c74 is described below

commit 14c1c7496653061da657038d04d2f8553f32039f
Author: qiaojialin <64...@qq.com>
AuthorDate: Fri Jun 21 15:32:22 2019 +0800

    fix TsFileResource bug
---
 .../apache/iotdb/db/engine/filenodeV2/TsFileResourceV2.java | 13 ++++---------
 .../db/engine/filenodeV2/UnsealedTsFileProcessorV2.java     |  2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TsFileResourceV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TsFileResourceV2.java
index b9dac47..159ebc2 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TsFileResourceV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TsFileResourceV2.java
@@ -41,7 +41,7 @@ public class TsFileResourceV2 {
    */
   private Map<String, Long> endTimeMap;
 
-  private UnsealedTsFileProcessorV2 unsealedFileProcessor;
+  private UnsealedTsFileProcessorV2 processor;
 
   private transient ModificationFile modFile;
 
@@ -58,16 +58,11 @@ public class TsFileResourceV2 {
    */
   private ReadOnlyMemChunk readOnlyMemChunk;
 
-  public TsFileResourceV2(File file) {
+  public TsFileResourceV2(File file, UnsealedTsFileProcessorV2 processor) {
     this.file = file;
     this.startTimeMap = new HashMap<>();
     this.endTimeMap = new HashMap<>();
-  }
-
-  public TsFileResourceV2(File file, Map<String, Long> startTimeMap, Map<String, Long> endTimeMap) {
-    this.file = file;
-    this.startTimeMap = startTimeMap;
-    this.endTimeMap = endTimeMap;
+    this.processor = processor;
   }
 
   public TsFileResourceV2(File file,
@@ -127,6 +122,6 @@ public class TsFileResourceV2 {
   }
 
   public UnsealedTsFileProcessorV2 getUnsealedFileProcessor() {
-    return unsealedFileProcessor;
+    return processor;
   }
 }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
index e365ca6..1d85bd1 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
@@ -88,7 +88,7 @@ public class UnsealedTsFileProcessorV2 {
       throws IOException {
     this.storageGroupName = storageGroupName;
     this.fileSchema = fileSchema;
-    this.tsFileResource = new TsFileResourceV2(tsfile);
+    this.tsFileResource = new TsFileResourceV2(tsfile, this);
     this.versionController = versionController;
     this.writer = new NativeRestorableIOWriter(tsfile);
     this.closeUnsealedFileCallback = closeUnsealedFileCallback;