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/28 08:09:37 UTC
[iotdb] branch autoai_debug updated: remove force wal
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 8444086 remove force wal
8444086 is described below
commit 8444086df94d91ac9ec7fd2922620f0c564c0cda
Author: qiaojialin <64...@qq.com>
AuthorDate: Wed Jul 28 16:09:00 2021 +0800
remove force wal
---
.../org/apache/iotdb/db/writelog/io/LogWriter.java | 3 ---
.../db/writelog/node/ExclusiveWriteLogNode.java | 23 ----------------------
2 files changed, 26 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java b/server/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
index de716c3..3fd85b8 100644
--- a/server/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
+++ b/server/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
@@ -102,9 +102,6 @@ public class LogWriter implements ILogWriter {
if (elapse > 3_000_000_000L) {
logger.warn("[WAL] LogWriter channel.force cost {}ms", elapse / 1_000_000L);
}
- if (this.forceEachWrite) {
- channel.force(true);
- }
} catch (ClosedChannelException ignored) {
logger.warn("someone interrupt current thread, so no need to do write for io safety");
}
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 80cbcc3..fbed153 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,7 +138,6 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
@Override
public void close() {
sync();
- forceWal();
long start = System.nanoTime();
lock.lock();
try {
@@ -175,7 +174,6 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
return;
}
sync();
- forceWal();
}
@Override
@@ -262,27 +260,6 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
}
}
- private void forceWal() {
- lock.lock();
- try {
- try {
- if (currentFileWriter != null) {
- long start = System.nanoTime();
- currentFileWriter.force();
- long elapse = System.nanoTime() - start;
- if (elapse > 3_000_000_000L) {
- logger.warn(
- "[WAL] {} flushBuffer write log cost {}ms", this.hashCode(), elapse / 1_000_000L);
- }
- }
- } catch (IOException e) {
- logger.warn("Log node {} force failed.", identifier, e);
- }
- } finally {
- lock.unlock();
- }
- }
-
private void sync() {
lock.lock();
try {