-
Notifications
You must be signed in to change notification settings - Fork 208
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
Document https://github.com/vitessio/vitess/pull/13656 #1555
Conversation
Signed-off-by: Matt Lord <[email protected]>
✅ Deploy Preview for vitess ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Matt Lord <[email protected]>
|
||
<div class="cmd"> | ||
|
||
When switching write (primary tablet) traffic for tables that are being moved from an unsharded keyspace to a sharded one, initialize any sequences being used by those tables on the target. They are initialized using the current maximum value for the column used on the target. This ensures that the sequence values on the target are greater than the maximum value seen on the source and ensure seamless auto generated primary key values when going from [MySQL auto_increment](https://dev.mysql.com/doc/refman/en/example-auto-increment.html) columns on the unsharded source to [Vitess Sequences](../../features/vitess-sequences/) on the sharded target. |
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.
"from an unsharded keyspace to a sharded one" => do we only support this from unsharded to sharded: it should work for any shard configuration for source or target, right?
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.
That's specifically what the feature request was about and it's the primary use case.
It's assumed that if the source is sharded then the sequences are already in use and the transition will be seamless — sharded to sharded (both using the same sequence seamlessly) or sharded to unsharded (the sequence is not used on the target).
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.
I've tried to add some clarification around this: https://deploy-preview-1555--vitess.netlify.app/docs/18.0/reference/vreplication/movetables/#--initialize-target-sequences
Signed-off-by: Matt Lord <[email protected]>
This adds documentation covering the changes made in: vitessio/vitess#13656
Review shortcuts: