-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: support migrating an instance to sharding #48795
base: master
Are you sure you want to change the base?
Conversation
I had tried #36313 a while ago |
ec107dc
to
756e35a
Compare
756e35a
to
3b67641
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
3b67641
to
2ad1008
Compare
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.
Support migrating existing instances to sharding.
Enabled by setting the sharding configuration and setting the
from_shard_key
andfrom_primary
to 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.