You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2020/12/09 03:51:31 UTC

[iotdb] branch check12 created (now 7bce1c0)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a change to branch check12
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 7bce1c0  add 0.11 file check

This branch includes the following new commits:

     new 7bce1c0  add 0.11 file check

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: add 0.11 file check

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch check12
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 7bce1c08610e8c77d3dc4d9a5045600db501f289
Author: HTHou <hh...@outlook.com>
AuthorDate: Wed Dec 9 11:50:31 2020 +0800

    add 0.11 file check
---
 .../java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java   | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
index 72f08cb..9a07734 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfigCheck.java
@@ -191,11 +191,14 @@ public class IoTDBConfigCheck {
       System.exit(-1);
     }
     // check whether upgrading from v0.10 to v0.11
-    if (properties.getProperty(IOTDB_VERSION_STRING).startsWith("0.10")) {
-      logger.info("Upgrading IoTDB from v0.10 to v0.11, checking files...");
-      checkUnClosedTsFileV2();
-      upgradePropertiesFile();
-      logger.info("Upgrade to IoTDB v0.11 successfully!");
+    if (properties.getProperty(IOTDB_VERSION_STRING).startsWith("0.10")
+        || properties.getProperty(IOTDB_VERSION_STRING).startsWith("0.11")) {
+      logger.error("DO NOT Use 0.10 or 0.11 Data Now");
+      System.exit(-1);
+      // logger.info("Upgrading IoTDB from v0.10 to v0.11, checking files...");
+      
+      //checkUnClosedTsFileV2();
+      //upgradePropertiesFile();
     }
     checkProperties();
   }
@@ -203,6 +206,7 @@ public class IoTDBConfigCheck {
   /**
    * upgrade 0.10 properties to 0.11 properties
    */
+  @SuppressWarnings("unused")
   private void upgradePropertiesFile()
       throws IOException {
     // create an empty tmpPropertiesFile
@@ -301,6 +305,7 @@ public class IoTDBConfigCheck {
   /**
    * ensure all TsFiles are closed in 0.10 when starting 0.11
    */
+  @SuppressWarnings("unused")
   private void checkUnClosedTsFileV2() {
     if (SystemFileFactory.INSTANCE.getFile(WAL_DIR).isDirectory()
         && SystemFileFactory.INSTANCE.getFile(WAL_DIR).list().length != 0) {