You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ej...@apache.org on 2020/12/11 03:45:14 UTC
[iotdb] 04/06: finish sliding window version 4
This is an automated email from the ASF dual-hosted git repository.
ejttianyu pushed a commit to branch sliding_mem_table
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit f857865ae819847032dfcc821899c1628b91a3b0
Author: EJTTianyu <16...@qq.com>
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 1ef24fb..b3b1f91 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
@@ -679,6 +679,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, timePartitionId);
@@ -921,9 +924,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();
}