jt2594838 commented on a change in pull request #1326:
URL: https://github.com/apache/incubator-iotdb/pull/1326#discussion_r448211252



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/version/SimpleFileVersionController.java
##########
@@ -144,7 +142,9 @@ private void restore() throws IOException {
     } else {
       versionFile = SystemFileFactory.INSTANCE.getFile(directory, FILE_PREFIX 
+ "0");
       prevVersion = 0;
-      new FileOutputStream(versionFile).close();
+      if (!versionFile.createNewFile()) {
+        logger.warn("Cannot create new version file {}", versionFile);
+      }

Review comment:
       create an empty file




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to