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

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


The following commit(s) were added to refs/heads/autoai_debug by this push:
     new 9e1e887  add log for forceWal
9e1e887 is described below

commit 9e1e887e14016ec760a02aba33898a6142c7310d
Author: qiaojialin <[email protected]>
AuthorDate: Wed Jul 28 14:12:51 2021 +0800

    add log for forceWal
---
 .../org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
 
b/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
index 07ee8fe..c4ca5eb 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
@@ -138,6 +138,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, 
Comparable<Exclusive
   @Override
   public void close() {
     sync();
+    logger.warn("[WAL] {} close!!!", this.hashCode());
     forceWal();
     long start = System.nanoTime();
     lock.lock();
@@ -263,6 +264,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, 
Comparable<Exclusive
   }
 
   private void forceWal() {
+    logger.warn("[WAL] {} forceWal start", this.hashCode());
     long start = System.nanoTime();
     lock.lock();
     try {
@@ -280,6 +282,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, 
Comparable<Exclusive
     if (elapse > 3_000_000_000L) {
       logger.warn("[WAL] {} flushBuffer write log cost {}ms", this.hashCode(), 
elapse / 1_000_000L);
     }
+    logger.warn("[WAL] {} forceWal end", this.hashCode());
   }
 
   private void sync() {
@@ -298,7 +301,6 @@ public class ExclusiveWriteLogNode implements WriteLogNode, 
Comparable<Exclusive
             elapse / 1_000_000L);
       }
       ILogWriter currWriter = getCurrentFileWriter();
-      logger.warn("[WAL] {} submit flushBuffer task", this.hashCode());
       FLUSH_BUFFER_THREAD_POOL.submit(() -> flushBuffer(currWriter));
       bufferedLogNum = 0;
       logger.debug("Log node {} ends sync.", identifier);
@@ -343,7 +345,6 @@ public class ExclusiveWriteLogNode implements WriteLogNode, 
Comparable<Exclusive
           this.hashCode(),
           elapse / 1_000_000L);
     }
-    logger.warn("[WAL] {} flushBuffer task end", this.hashCode());
   }
 
   private void switchBufferWorkingToFlushing() throws InterruptedException {

Reply via email to