[IOTDB-4209] Use .pst to accelerate recovery in SchemaFile mode #7995
Merged
MarcosZyk merged 19 commits intoapache:masterfrom Feb 13, 2023
Merged
[IOTDB-4209] Use .pst to accelerate recovery in SchemaFile mode #7995MarcosZyk merged 19 commits intoapache:masterfrom
MarcosZyk merged 19 commits intoapache:masterfrom
Conversation
# Conflicts: # server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogDescription.java # server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogDescriptionWriter.java # server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
MarcosZyk
reviewed
Feb 12, 2023
MarcosZyk
reviewed
Feb 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In the original process, recovery in SchemaFile mode will overwrite the .pst file and redo all the plans in MLog.
However, it causes unnecessary additional I/O cost. Therefore, the records in the mlog can be removed after flushing the .pst file. When recovering, we only need to redo the plans in the mlog that have not been persisted into the .pst file.
Performance Test
Environment
Benchmark Config:
IoTDB Config:
Do not use check point
Create timeseries ≈ 41.59 second
Recover [root.test.g_0.SchemaRegion[0]] spend: 30612 ms
Use check point
Create timeseries ≈ 41.56 second
Recover [root.test.g_0.SchemaRegion[0]] spend: 1309 ms