feat: support migrating an instance to sharding#48795
Merged
icewind1991 merged 1 commit intomasterfrom Feb 25, 2025
Merged
Conversation
Member
I had tried #36313 a while ago |
ec107dc to
756e35a
Compare
756e35a to
3b67641
Compare
3b67641 to
2ad1008
Compare
come-nc
approved these changes
Jan 6, 2025
Contributor
come-nc
left a comment
There was a problem hiding this comment.
Code looks sane, did not test.
Merged
Merged
Merged
provokateurin
approved these changes
Jan 17, 2025
2ad1008 to
4766e37
Compare
4766e37 to
748d195
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
748d195 to
0a77ba9
Compare
Member
|
/backport to stable31 |
Merged
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.
Support migrating existing instances to sharding.
Enabled by setting the sharding configuration and setting the
from_shard_keyandfrom_primaryto the sharding configuration with the next storage/file id (so the first storage/file that will be created after sharding is configured).The schema from the main db will need to be copied to the shard db's before enabling the sharding (having a command to help with this would be a nice stretch-goal)
Any files on the existing storages will still go to the main db, only newly created storages will be sharded.