Skip to content
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

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

mattlord
Copy link
Collaborator

@mattlord mattlord commented Aug 4, 2023

@netlify
Copy link

netlify bot commented Aug 4, 2023

Deploy Preview for vitess ready!

Name Link
🔨 Latest commit db8e9a8
🔍 Latest deploy log https://app.netlify.com/sites/vitess/deploys/64d655d29bb2db00082b0e77
😎 Deploy Preview https://deploy-preview-1555--vitess.netlify.app/docs/18.0/reference/vreplication/movetables
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mattlord mattlord marked this pull request as ready for review August 9, 2023 20:57
@mattlord mattlord requested a review from rohit-nayak-ps August 9, 2023 20:57

<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.
Copy link
Contributor

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?

Copy link
Collaborator Author

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).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Matt Lord <[email protected]>
@rohit-nayak-ps rohit-nayak-ps merged commit 1657711 into prod Aug 11, 2023
@rohit-nayak-ps rohit-nayak-ps deleted the vrepl_seq_init branch August 11, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants