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/21 10:10:31 UTC
[iotdb] 02/03: add hashcode to flush wal thread
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch clear_wal
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 0012a9467b5319a6afdd8d564b6c52dabb2b9891
Author: qiaojialin <64...@qq.com>
AuthorDate: Wed Jul 21 17:03:01 2021 +0800
add hashcode to flush wal thread
---
.../org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java | 6 +++---
1 file changed, 3 insertions(+), 3 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 152d7ef..9b5d475 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
@@ -69,7 +69,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
private final Object switchBufferCondition = new Object();
private final ReentrantLock lock = new ReentrantLock();
private final ExecutorService FLUSH_BUFFER_THREAD_POOL =
- Executors.newSingleThreadExecutor(r -> new Thread(r, "Flush-WAL-Thread"));
+ Executors.newSingleThreadExecutor(r -> new Thread(r, "Flush-WAL-Thread-" + this.hashCode()));
private long fileId = 0;
private long lastFlushedId = 0;
@@ -287,7 +287,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
}
long elapse1 = System.currentTimeMillis() - start1;
if (elapse1 > 3000) {
- logger.error("[wal] {} switch Working -> Flushing cost: {}ms", this.hashCode(), elapse1);
+ logger.error("[wal] {} flushBuffer cost: {}ms", this.hashCode(), elapse1);
}
// switch buffer flushing to idle and notify the sync thread
@@ -299,7 +299,7 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
}
long elapse2 = System.currentTimeMillis() - start2;
if (elapse2 > 3000) {
- logger.error("[wal] {} switch Working -> Flushing cost: {}ms", this.hashCode(), elapse2);
+ logger.error("[wal] {} switch Flushing -> idle cost: {}ms", this.hashCode(), elapse2);
}
logger.warn("[wal] {} flushBuffer end, notify all", this.hashCode());
}