Skip to content

Conversation

@LadyForest
Copy link
Contributor

@LadyForest LadyForest commented Jun 13, 2022

Otherwise rewrite may get an IllegalArgumentException when upgrading the level.

Call chain

CompactManager#rewrite 
    => CompactManager#upgrade
        => DataFileMeta#upgrade

@LadyForest LadyForest marked this pull request as ready for review June 13, 2022 06:10
List<DataFileMeta> restoredFiles) {
return new CompactWriter(
CompactUnit.fromFiles(options.numLevels - 1, restoredFiles),
CompactUnit.fromFiles(getRestoreMaxLevel(restoredFiles) - 1, restoredFiles),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use Levels to produce CompactUnit by CompactUnit.fromLevelRuns.
In this way, we don't need to change Levels.
And we should add a test case here.

@LadyForest LadyForest requested a review from JingsongLi June 13, 2022 08:02
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for the update.

@JingsongLi JingsongLi merged commit 9e62517 into apache:master Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants