This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch fix_query_deletion_test
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/fix_query_deletion_test by
this push:
new cc5563e call force when closing a TsFile/UnseqFile
cc5563e is described below
commit cc5563ee419dc92939cf128c7292ad9ee94924e4
Author: 江天 <[email protected]>
AuthorDate: Thu Apr 4 10:14:19 2019 +0800
call force when closing a TsFile/UnseqFile
---
.../java/org/apache/iotdb/db/engine/overflow/io/OverflowIO.java | 6 ++++++
.../org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java | 2 ++
2 files changed, 8 insertions(+)
diff --git
a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowIO.java
b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowIO.java
index 90f0423..886d92d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowIO.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/io/OverflowIO.java
@@ -167,7 +167,13 @@ public class OverflowIO extends TsFileIOWriter {
@Override
public void close() throws IOException {
+ raf.getChannel().force(true);
raf.close();
}
+
+ @Override
+ public void flush() throws IOException {
+ raf.getChannel().force(true);
+ }
}
}
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java
index 0ab5e21..19f10cc 100644
---
a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java
+++
b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java
@@ -62,6 +62,7 @@ public class DefaultTsFileOutput implements TsFileOutput {
@Override
public void close() throws IOException {
+ outputStream.getChannel().force(true);
outputStream.close();
}
@@ -73,6 +74,7 @@ public class DefaultTsFileOutput implements TsFileOutput {
@Override
public void flush() throws IOException {
this.outputStream.flush();
+ this.outputStream.getChannel().force(true);
}
@Override