You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2020/12/27 06:52:15 UTC

[iotdb] branch restrict_memtable_11 updated: fix wait

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

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


The following commit(s) were added to refs/heads/restrict_memtable_11 by this push:
     new 105f38a  fix wait
     new 05c8be1  Merge branch 'restrict_memtable_11' of https://github.com/apache/iotdb into restrict_memtable_11
105f38a is described below

commit 105f38a0b5cb14108d48d391ca27bbfde14d8dc8
Author: HTHou <hh...@outlook.com>
AuthorDate: Sun Dec 27 14:49:41 2020 +0800

    fix wait
---
 .../src/main/java/org/apache/iotdb/db/rescon/MemTableManager.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/rescon/MemTableManager.java b/server/src/main/java/org/apache/iotdb/db/rescon/MemTableManager.java
index eca59b7..1920ad3 100644
--- a/server/src/main/java/org/apache/iotdb/db/rescon/MemTableManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/rescon/MemTableManager.java
@@ -61,12 +61,14 @@ public class MemTableManager {
           return new PrimitiveMemTable();
         }
         try {
-          TimeUnit.MILLISECONDS.sleep(WAIT_TIME);
+          wait(WAIT_TIME);
         } catch (InterruptedException e) {
           logger.error("{} fails to wait for memtables {}, continue to wait", tsFileResource, e);
           Thread.currentThread().interrupt();
         }
-        logger.info("{} has waited for a memtable for {}ms", tsFileResource, waitCount++ * 100);
+        if (waitCount++ % 500 == 0) {
+          logger.info("{} has waited for a memtable for {}ms", tsFileResource, waitCount * 500);
+        }
       }
     }
   }