You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by li...@apache.org on 2019/01/20 04:04:53 UTC
[incubator-iotdb] branch force-in-thread-periodically updated:
force before close
This is an automated email from the ASF dual-hosted git repository.
liurui pushed a commit to branch force-in-thread-periodically
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/force-in-thread-periodically by this push:
new a52cd00 force before close
a52cd00 is described below
commit a52cd008a2e66026507a25cae3b801d006e94752
Author: liuruiyiyang <24...@qq.com>
AuthorDate: Sun Jan 20 12:04:42 2019 +0800
force before close
---
.../java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
index 2ba5ce5..1d94c19 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java
@@ -124,13 +124,16 @@ public class ExclusiveWriteLogNode implements WriteLogNode, Comparable<Exclusive
@Override
public void close() throws IOException {
sync();
+ forceWal();
lockForOther();
+ lockForForceOther();
try {
this.currentFileWriter.close();
logger.debug("Log node {} closed successfully", identifier);
} catch (IOException e) {
logger.error("Cannot close log node {} because {}", identifier, e.getMessage());
}
+ unlockForForceOther();
unlockForOther();
}