Proper World Migration for existing Worlds#13722
Open
OstlerDev wants to merge 1 commit intoPaperMC:dev/26.1from
Open
Proper World Migration for existing Worlds#13722OstlerDev wants to merge 1 commit intoPaperMC:dev/26.1from
OstlerDev wants to merge 1 commit intoPaperMC:dev/26.1from
Conversation
Fixes issues where world migration was not happening properly for nether and end dimensions. Also fixes the shared-data routing for scoreboard/maps.
Author
|
I had reviewed the contributor documentation to try and understand the right branch to open my PR against. I understand if the code is not something that will be used or implemented, since I know you all prefer to implement it yourselves when they are new dev/snapshot/version branches. No worries if help is not desired for implementing the world migration support, from what I could tell in #paper-contrib there was difficulty with finding time/team resources to dedicate to rewrite the migration code. Feel free to close the PR if it is not helpful and/or if it is not desired at this time. I wasn't sure the best way to communicate with the dev team to see if help was wanted in that area, and I guess I should have done that first. |
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.
Summary
World migration for existing worlds was completely broken, and we were not using the new folder layouts, instead defaulting to falling back to the legacy world folder structure, causing existing worlds to be inaccessible.
Fixes
I have verified migration now succeeds as expected in all of the broken scenarios that were seen previously.
The Problem
Paper 26.1 seemed to only be looking for the old folder structure when actually loading the files. I tested out a few different migration scenarios and found the following results.
Vanilla 1.21.11 -> Paper 26.1 & Vanilla 26.1 -> Paper 26.1
All dimensions are completely inaccessible.
All region/world files for each of the three worlds/dimensions end up nested inside
world/dimensions/minecraft, causing the Overworld, Nether, and End to regenerate. The region/world files do still exist, however are improperly referenced, causing none of the existing worlds to be accessible.Paper creates/uses the old
world/region,world_nether/DIM-1/region, andworld_the_end/DIM1/regionpaths instead of the new migrated file paths. It does not properly split out the world dimension files into each of their individual world folders.Paper 1.21.11 -> Paper 26.1
Migrating a PaperMC 1.21.11 split world structure was a little better in that it did partially reorganize both
worldandworld_netherinto their respective new structures, however it still referenced the old world paths forDIM-1andDIM1, which was causing the server to just hard crash when it was unable to find the expected files. If it had finished starting up, the world dimensions still would have been inaccessible for the above issues with the Vanilla file migration, since Paper 26.1 just wasn't loading the files from the proper location even though the migration had been triggered.Logs: