New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IOTDB-294]online upgrade from v0.8.0 to current version #467
Conversation
server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/TsfileUpgradeToolV0_8_0.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkBuffer.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeCheckStatus.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in recovery process, system will remove the imcomplete tsfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it occurs in the running of the system, the system engine may read this file which lead to errors.
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/upgrade/UpgradeTask.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/utils/UpgradeUtils.java
Outdated
Show resolved
Hide resolved
tsfile/src/main/java/org/apache/iotdb/tsfile/tool/upgrade/UpgradeTool.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making this a real tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not necessary to open a writer every time, you can reuse one.
server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it occurs in the running of the system, the system engine may read this file which lead to errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the "reading TsFile-0.8.0" bug fixed?
However, it still has some conflict with merge as you have said. I will discuss with jt to solve the problem. |
No description provided.