You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/11/20 07:24:31 UTC

[incubator-iotdb] 01/01: merge bugfix 264 Lake checking datatype before writing WAL

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

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

commit ca0155b067193bab785fe4292f225eb940343f3a
Author: qiaojialin <64...@qq.com>
AuthorDate: Wed Oct 23 16:05:15 2019 +0800

    merge bugfix 264 Lake checking datatype before writing WAL
---
 .../org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
index d27db69..ced1ad1 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
@@ -143,6 +143,9 @@ public class TsFileProcessor {
       }
     }
 
+    // insert insertPlan to the work memtable
+    workMemTable.insert(insertPlan);
+
     if (IoTDBDescriptor.getInstance().getConfig().isEnableWal()) {
       try {
         getLogNode().write(insertPlan);
@@ -151,6 +154,7 @@ public class TsFileProcessor {
         return false;
       }
     }
+
     // update start time of this memtable
     tsFileResource.updateStartTime(insertPlan.getDeviceId(), insertPlan.getTime());
     //for sequence tsfile, we update the endTime only when the file is prepared to be closed.
@@ -159,9 +163,6 @@ public class TsFileProcessor {
       tsFileResource.updateEndTime(insertPlan.getDeviceId(), insertPlan.getTime());
     }
 
-    // insert insertPlan to the work memtable
-    workMemTable.insert(insertPlan);
-
     return true;
   }