You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ma...@apache.org on 2022/07/21 12:37:03 UTC

[iotdb] 01/03: avoid logging in shouldFlush

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

marklau99 pushed a commit to branch IOTDB-3164-Allocate-By-Tablets
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 82fb7907d62224f2cf6c5df6deddce6432621188
Author: Liu Xuxin <li...@outlook.com>
AuthorDate: Thu Jul 21 17:33:59 2022 +0800

    avoid logging in shouldFlush
---
 .../java/org/apache/iotdb/db/rescon/memory/WriteMemoryController.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/rescon/memory/WriteMemoryController.java b/server/src/main/java/org/apache/iotdb/db/rescon/memory/WriteMemoryController.java
index a487ffcc43..581294e9bd 100644
--- a/server/src/main/java/org/apache/iotdb/db/rescon/memory/WriteMemoryController.java
+++ b/server/src/main/java/org/apache/iotdb/db/rescon/memory/WriteMemoryController.java
@@ -122,7 +122,8 @@ public class WriteMemoryController extends MemoryController<TsFileProcessor> {
       if (selectedTsFileProcessor == null) {
         break;
       }
-      if (selectedTsFileProcessor.shouldFlush()) {
+      if (selectedTsFileProcessor.getWorkMemTable() == null
+          || selectedTsFileProcessor.getWorkMemTable().shouldFlush()) {
         continue;
       }
       memCost += selectedTsFileProcessor.getWorkMemTableRamCost();