[IOTDB-294]online upgrade from v0.8.0 to current version#467
Conversation
| tsfilePathBefore + DOT_SEPERATOR + tsfilePathAfter + DOT_SEPERATOR | ||
| + UpgradeCheckStatus.AFTER_UPGRADE_FILE, upgradePostion); | ||
| } catch (IOException e) { | ||
| logger.error("generate upgrade file failed, the file to be upgraded:{}", tsfilePathBefore); |
There was a problem hiding this comment.
When the upgrade occurs an error, you just throw an Exception and move the incomplete file to the data directory?
There was a problem hiding this comment.
in recovery process, system will remove the imcomplete tsfile
There was a problem hiding this comment.
When it occurs in the running of the system, the system engine may read this file which lead to errors.
| oldVersionTsfileDirs.add("/Users/tianyu/incubator-iotdb/data/data/sequence/root.group_10"); | ||
| newVersionTsfileDirs.add("/Users/tianyu/incubator-iotdb/data/data/sequence/root.group_8"); | ||
| for (int i = 0; i < oldVersionTsfileDirs.size(); i++) { | ||
| updateTsfiles(oldVersionTsfileDirs.get(i), newVersionTsfileDirs.get(i)); |
There was a problem hiding this comment.
How about making this a real tool.
There was a problem hiding this comment.
good idea,I will make it a sh script then.
|
|
||
| public static boolean writeUpgradeLogFile(String content) { | ||
| UpgradeUtils.getUpgradeLogLock().writeLock().lock(); | ||
| try (BufferedWriter upgradeLogWriter = new BufferedWriter( |
There was a problem hiding this comment.
I think it is not necessary to open a writer every time, you can reuse one.
| tsfilePathBefore + DOT_SEPERATOR + tsfilePathAfter + DOT_SEPERATOR | ||
| + UpgradeCheckStatus.AFTER_UPGRADE_FILE, upgradePostion); | ||
| } catch (IOException e) { | ||
| logger.error("generate upgrade file failed, the file to be upgraded:{}", tsfilePathBefore); |
There was a problem hiding this comment.
When it occurs in the running of the system, the system engine may read this file which lead to errors.
However, it still has some conflict with merge as you have said. I will discuss with jt to solve the problem. |
No description provided.