This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch autoai_debug_single
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/autoai_debug_single by this
push:
new 1ddcbf0 add log back
1ddcbf0 is described below
commit 1ddcbf046f618e73f886847ec3d2edb52788200c
Author: HTHou <[email protected]>
AuthorDate: Wed Jul 21 18:23:57 2021 +0800
add log back
---
.../db/writelog/node/ExclusiveWriteLogNode.java | 28 +++++++++++-----------
1 file changed, 14 insertions(+), 14 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 0a663cd..7e76c5c 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
@@ -313,8 +313,8 @@ public class ExclusiveWriteLogNode implements WriteLogNode,
Comparable<Exclusive
}
private void switchBufferWorkingToFlushing() throws InterruptedException {
- // logger.warn("[wal] {} switchBufferWorkingToFlushing start",
this.hashCode());
- // long start = System.currentTimeMillis();
+ logger.warn("[wal] {} switchBufferWorkingToFlushing start",
this.hashCode());
+ long start = System.currentTimeMillis();
synchronized (switchBufferCondition) {
while (logBufferFlushing != null && !deleted) {
switchBufferCondition.wait(100);
@@ -323,11 +323,11 @@ public class ExclusiveWriteLogNode implements
WriteLogNode, Comparable<Exclusive
logBufferWorking = null;
switchBufferCondition.notifyAll();
}
- // long elapse = System.currentTimeMillis() - start;
- // if (elapse > 2000) {
- // logger.error("[wal] switch Working -> Flushing cost: {}ms",
elapse);
- // }
- // logger.warn("[wal] {} switchBufferWorkingToFlushing end",
this.hashCode());
+ long elapse = System.currentTimeMillis() - start;
+ if (elapse > 2000) {
+ logger.error("[wal] switch Working -> Flushing cost: {}ms", elapse);
+ }
+ logger.warn("[wal] {} switchBufferWorkingToFlushing end", this.hashCode());
}
private void switchBufferIdleToWorking() throws InterruptedException {
@@ -349,8 +349,8 @@ public class ExclusiveWriteLogNode implements WriteLogNode,
Comparable<Exclusive
}
private void switchBufferFlushingToIdle() throws InterruptedException {
- // logger.warn("[wal] {} switchBufferFlushingToIdle start",
this.hashCode());
- // long start = System.currentTimeMillis();
+ logger.warn("[wal] {} switchBufferFlushingToIdle start", this.hashCode());
+ long start = System.currentTimeMillis();
synchronized (switchBufferCondition) {
while (logBufferIdle != null && !deleted) {
switchBufferCondition.wait(100);
@@ -360,11 +360,11 @@ public class ExclusiveWriteLogNode implements
WriteLogNode, Comparable<Exclusive
logBufferFlushing = null;
switchBufferCondition.notifyAll();
}
- // long elapse = System.currentTimeMillis() - start;
- // if (elapse > 2000) {
- // logger.error("[wal] switch Flushing -> Idle cost: {}ms", elapse);
- // }
- // logger.warn("[wal] {} switchBufferFlushingToIdle end",
this.hashCode());
+ long elapse = System.currentTimeMillis() - start;
+ if (elapse > 2000) {
+ logger.error("[wal] switch Flushing -> Idle cost: {}ms", elapse);
+ }
+ logger.warn("[wal] {} switchBufferFlushingToIdle end", this.hashCode());
}
private ILogWriter getCurrentFileWriter() throws FileNotFoundException {