-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Reset in-memory sequence info on vttablet on UpdateSequenceTables request #18415
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
Merged
rohit-nayak-ps
merged 2 commits into
vitessio:main
from
beingnoble03:seq-reset-switch-traffic
Jul 13, 2025
Merged
Reset in-memory sequence info on vttablet on UpdateSequenceTables request #18415
rohit-nayak-ps
merged 2 commits into
vitessio:main
from
beingnoble03:seq-reset-switch-traffic
Jul 13, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…uest Signed-off-by: Noble Mittal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18415 +/- ##
==========================================
- Coverage 67.51% 67.50% -0.01%
==========================================
Files 1607 1607
Lines 262684 262714 +30
==========================================
+ Hits 177343 177344 +1
- Misses 85341 85370 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Noble Mittal <[email protected]>
rohit-nayak-ps
approved these changes
Jul 11, 2025
shlomi-noach
approved these changes
Jul 13, 2025
morgo
added a commit
to morgo/vitess
that referenced
this pull request
Jul 21, 2025
* origin/master: bugfix: Fix impossible query for UNION (vitessio#18463) fix topo use in local_example (vitessio#18357) fix: update go-upgrade tool to check patch number (vitessio#18252) (vitessio#18402) Update MAINTAINERS.md and CODEOWNERS (vitessio#18462) Add logging to binlog watcher actions (vitessio#18264) `schemadiff`: `RelatedForeignKeyTables()` (vitessio#18195) `vtorc`: allow recoveries to be disabled from startup (vitessio#18005) Fix `vttablet` not being marked as not serving when MySQL stalls (vitessio#17883) make xtrabackup ShouldDrainForBackup configurable (vitessio#18431) Reset in-memory sequence info on vttablet on UpdateSequenceTables request (vitessio#18415) Fix watcher storm during topo outages (vitessio#18434) Online DDL: resume vreplication after cut-over/RENAME failure (vitessio#18428) Online DDL cutover enhancements (vitessio#18423) VStreamer: change in filter logic (vitessio#18319) Online DDL metrics: `OnlineDDLStaleMigrationMinutes` (vitessio#18417) Signed-off-by: Morgan Tocker <[email protected]>
shlomi-noach
pushed a commit
that referenced
this pull request
Jul 23, 2025
…uenceTables request (#18415) (#18444) Signed-off-by: Noble Mittal <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Noble Mittal <[email protected]>
shlomi-noach
pushed a commit
that referenced
this pull request
Jul 23, 2025
…uenceTables request (#18415) (#18445) Signed-off-by: Noble Mittal <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Noble Mittal <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Backport to: release-21.0
Needs to be backport to release-21.0
Backport to: release-22.0
Needs to be backport to release-22.0
Component: VReplication
Component: VTTablet
Type: Bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the bug where outdated in-memory sequence info was being used after switching traffic even when we updated the
next_idin sequence tables usingintialize-target-sequences, resulting in duplicate entry errors on the vttablet.To fix this, we reset sequence counters on sequence tables on the tablet containing the sequence tables whenever we switch traffic. This allows tablet to refetch the updated
next_idfrom the database.Also added an e2e test
TestSequenceResetOnSwitchTrafficwhich confirms this behaviour.Related Issue(s)
Checklist
Deployment Notes