-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: support migrating an instance to sharding #48795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I had tried #36313 a while ago |
ec107dc to
756e35a
Compare
756e35a to
3b67641
Compare
3b67641 to
2ad1008
Compare
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks sane, did not test.
2ad1008 to
4766e37
Compare
4766e37 to
748d195
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
748d195 to
0a77ba9
Compare
|
/backport to stable31 |
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.