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

ejttianyu pushed a commit to branch dev_sliding_mem_table
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev_sliding_mem_table by this 
push:
     new 72490ff  finish sliding window version 4
72490ff is described below

commit 72490ff79fd5e4d376d012b3803adf464d354a64
Author: EJTTianyu <[email protected]>
AuthorDate: Tue Dec 8 10:29:18 2020 +0800

    finish sliding window version 4
---
 .../apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index 537b36a..f717637 100755
--- 
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -681,6 +681,9 @@ public class StorageGroupProcessor {
         return;
       }
 
+      if (config.isEnableSlidingMemTable()) {
+        flushingLatestTimeForEachDevice.computeIfAbsent(timePartitionId, l -> 
new HashMap<>());
+      }
       latestTimeForEachDevice.computeIfAbsent(timePartitionId, l -> new 
HashMap<>());
       // insert to sequence or unSequence file
       insertToTsFileProcessor(insertRowPlan, isSequence);
@@ -912,9 +915,6 @@ public class StorageGroupProcessor {
    * judge whether a insert plan should be inserted into the flushingMemtable
    */
   private boolean isInsertToFlushingMemTable(long timePartitionId, 
InsertRowPlan insertRowPlan){
-    if (!flushingLatestTimeForEachDevice.containsKey(timePartitionId)){
-      return false;
-    }
     return flushingLatestTimeForEachDevice.get(timePartitionId).
         getOrDefault(insertRowPlan.getDeviceId().getFullPath(), 
Long.MIN_VALUE) > insertRowPlan.getTime();
   }

Reply via email to