samperson1997 commented on a change in pull request #1384:
URL: https://github.com/apache/incubator-iotdb/pull/1384#discussion_r442063302
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MLogWriter.java
##########
@@ -158,17 +149,23 @@ public static void upgradeMLog(String schemaDir, String
logFileName) throws IOEx
writer.write(buf.toString());
writer.newLine();
writer.flush();
-
}
}
// upgrade finished, delete old mlog file
if (!logFile.delete()) {
throw new IOException("Deleting " + logFile + "failed.");
}
-
+
// rename tmpLogFile to mlog
FSFactoryProducer.getFSFactory().moveFile(tmpLogFile, logFile);
}
-
+
+ private int newLine() throws IOException {
+ writer.newLine();
+ writer.flush();
+
+ // Every MTREE_SNAPSHOT_INTERVAL lines, create a checkpoint and save the
MTree as a snapshot
+ return lineNumber++;
Review comment:
Fixed
----------------------------------------------------------------
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:
[email protected]