You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/09/11 02:26:41 UTC

[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1721: [IOTDB-868] fix comma bug for mlog

mychaow commented on a change in pull request #1721:
URL: https://github.com/apache/incubator-iotdb/pull/1721#discussion_r486736109



##########
File path: server/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java
##########
@@ -41,13 +42,26 @@
   private IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
   private ByteBuffer lengthBuffer = ByteBuffer.allocate(4);
   private ByteBuffer checkSumBuffer = ByteBuffer.allocate(8);
+  private long forcePeriodInMs = 0;
 
-  public LogWriter(String logFilePath) {
+  public LogWriter(String logFilePath, long forcePeriodInMs) throws FileNotFoundException {
     logFile = SystemFileFactory.INSTANCE.getFile(logFilePath);
+    this.forcePeriodInMs = forcePeriodInMs;
+
+    if (channel == null) {
+      fileOutputStream = new FileOutputStream(logFile, true);
+      channel = fileOutputStream.getChannel();
+    }
   }

Review comment:
       Yes, I will add some comments.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org