Split configuration and add resetPeerList for region migration#12101
Merged
OneSizeFitsQuorum merged 5 commits intoapache:region_migrationfrom Mar 5, 2024
Merged
Split configuration and add resetPeerList for region migration#12101OneSizeFitsQuorum merged 5 commits intoapache:region_migrationfrom
OneSizeFitsQuorum merged 5 commits intoapache:region_migrationfrom
Conversation
liyuheng55555
requested changes
Mar 1, 2024
| Files.deleteIfExists(configurationPath); | ||
| Files.move(tmpConfigurationPath, configurationPath); | ||
| } | ||
| buffer = ByteBuffer.wrap(Files.readAllBytes(configurationPath)); |
Collaborator
There was a problem hiding this comment.
After the configuration.dat file is split, seems Files.readAllBytes(configurationPath) will cause IOException, then line 637 will catch this exception and handle it with the new getConfiguration method.
Thus, there are some other code also throw IOException. This makes the code here somewhat unclear.

It is hoped to use a clearer method to determine whether the current processing is a new version file or an old version file (for example, whether the CONFIGURATION_FILE_NAME file exists or not).
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
Split configuration and add resetPeerList for region migration, see feishu-doc for details.