Document https://github.com/vitessio/vitess/pull/13656#1555
Document https://github.com/vitessio/vitess/pull/13656#1555rohit-nayak-ps merged 4 commits intoprodfrom
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
✅ Deploy Preview for vitess ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
|
||
| <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.
"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.
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.
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 <mattalord@gmail.com>
This adds documentation covering the changes made in: vitessio/vitess#13656
Review shortcuts: