You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2021/07/20 09:50:15 UTC
[iotdb] branch autoai_debug_single updated: reduce log
This is an automated email from the ASF dual-hosted git repository.
qiaojialin 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 d468b89 reduce log
d468b89 is described below
commit d468b892ae942a4a5785a69a4615d215aabf8516
Author: qiaojialin <64...@qq.com>
AuthorDate: Tue Jul 20 17:49:36 2021 +0800
reduce log
---
.../db/engine/storagegroup/TsFileProcessor.java | 3 ++-
.../db/writelog/node/ExclusiveWriteLogNode.java | 22 +++++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
index 4675ecd..b54f5bd 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
@@ -260,7 +260,8 @@ public class TsFileProcessor {
getLogNode().write(insertTabletPlan);
}
long elapsed = System.currentTimeMillis() - startTime;
- if (elapsed > 5000) {
+
+ if (elapsed > 3000) {
logger.error("write wal slowly : cost {}ms", elapsed);
}
} catch (Exception e) {
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 d28ed6b..e9f3754 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
@@ -282,7 +282,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
logger.warn("can not found file {}", identifier, e);
} finally {
lock.unlock();
- logger.warn("[wal] {} sync end", this.hashCode());
+ // logger.warn("[wal] {} sync end", this.hashCode());
}
}
@@ -311,11 +311,11 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
- logger.warn("[wal] {} flushBuffer end", this.hashCode());
+ // logger.warn("[wal] {} flushBuffer end", this.hashCode());
}
private void switchBufferWorkingToFlushing() throws InterruptedException {
- logger.warn("[wal] {} switchBufferWorkingToFlushing start", this.hashCode());
+ // logger.warn("[wal] {} switchBufferWorkingToFlushing start", this.hashCode());
long start = System.currentTimeMillis();
synchronized (switchBufferCondition) {
while (logBufferFlushing != null && !deleted) {
@@ -326,14 +326,14 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
switchBufferCondition.notifyAll();
}
long elapse = System.currentTimeMillis() - start;
- if (elapse > 3000) {
+ if (elapse > 2000) {
logger.error("[wal] switch Working -> Flushing cost: {}ms", elapse);
}
- logger.warn("[wal] {} switchBufferWorkingToFlushing end", this.hashCode());
+ // logger.warn("[wal] {} switchBufferWorkingToFlushing end", this.hashCode());
}
private void switchBufferIdleToWorking() throws InterruptedException {
- logger.warn("[wal] {} switchBufferIdleToWorking start", this.hashCode());
+ // logger.warn("[wal] {} switchBufferIdleToWorking start", this.hashCode());
long start = System.currentTimeMillis();
synchronized (switchBufferCondition) {
while (logBufferIdle == null && !deleted) {
@@ -344,14 +344,14 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
switchBufferCondition.notifyAll();
}
long elapse = System.currentTimeMillis() - start;
- if (elapse > 3000) {
+ if (elapse > 2000) {
logger.error("[wal] switch Idle -> Working cost: {}ms", elapse);
}
- logger.warn("[wal] {} switchBufferIdleToWorking end", this.hashCode());
+ // logger.warn("[wal] {} switchBufferIdleToWorking end", this.hashCode());
}
private void switchBufferFlushingToIdle() throws InterruptedException {
- logger.warn("[wal] {} switchBufferFlushingToIdle start", this.hashCode());
+ // logger.warn("[wal] {} switchBufferFlushingToIdle start", this.hashCode());
long start = System.currentTimeMillis();
synchronized (switchBufferCondition) {
while (logBufferIdle != null && !deleted) {
@@ -363,10 +363,10 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
switchBufferCondition.notifyAll();
}
long elapse = System.currentTimeMillis() - start;
- if (elapse > 3000) {
+ if (elapse > 2000) {
logger.error("[wal] switch Flushing -> Idle cost: {}ms", elapse);
}
- logger.warn("[wal] {} switchBufferFlushingToIdle end", this.hashCode());
+ // logger.warn("[wal] {} switchBufferFlushingToIdle end", this.hashCode());
}
private ILogWriter getCurrentFileWriter() throws FileNotFoundException {