[slack-22.0] restore tablet type during the tabletmanager initialization#741
Merged
tanjinx merged 4 commits intoslack-22.0from Nov 6, 2025
Merged
[slack-22.0] restore tablet type during the tabletmanager initialization#741tanjinx merged 4 commits intoslack-22.0from
slack-22.0] restore tablet type during the tabletmanager initialization#741tanjinx merged 4 commits intoslack-22.0from
Conversation
Signed-off-by: Stephen Baker <s.baker@slack-corp.com>
tanjinx
added a commit
that referenced
this pull request
Nov 10, 2025
…ation (#741) * backport tablet type lookup to v22 Signed-off-by: Stephen Baker <s.baker@slack-corp.com> * more txt adjustments --------- Signed-off-by: Stephen Baker <s.baker@slack-corp.com> Co-authored-by: Tanjin Xu <109303790+tanjinx@users.noreply.github.com>
sbaker617
added a commit
that referenced
this pull request
Feb 5, 2026
…ation (#741) * backport tablet type lookup to v22 Signed-off-by: Stephen Baker <s.baker@slack-corp.com> * more txt adjustments --------- Signed-off-by: Stephen Baker <s.baker@slack-corp.com> Co-authored-by: Tanjin Xu <109303790+tanjinx@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 backports the tablet type restoration feature from upstream Vitess to the
slack-22.0branch. It introduces an experimental--init-tablet-type-lookupflag that allows vttablets to restore their previous tablet type from topology records on restart, rather than always reverting to the--init_tablet_typevalue.Problem Statement
Currently, when a vttablet restarts, it always reverts to the type specified by the
--init_tablet_typeflag, regardless of any runtime changes made to the tablet type. This creates operational friction during:Solution
This change adds a new experimental startup flag
--init-tablet-type-lookupthat enables tablets to query the topology system for their existing record and restore the previous type. The implementation:--init_tablet_typevalueImplementation Details
This backport includes the latest refinements from upstream:
--init_tablet_typehelp text to include valid values and defaultFlag Naming Convention
Note that this v22 backport maintains consistency with existing v22 flag naming:
--init_tablet_type(with underscores)--init-tablet-type-lookup(with dashes, matching upstream)Related Issue(s)
Upstream Vitess:
Related Slack backports:
slack-19.0] restore tablet type during the tabletmanager initialization #732Checklist
Deployment Notes
This change is opt-in and requires explicitly enabling the
--init-tablet-type-lookupflag. The feature is marked as experimental and should be tested thoroughly before production deployment.When enabled, tablets will maintain their assigned types (RDONLY, DRAINED, etc.) across restarts without requiring service file modifications. This is particularly useful for:
Recommendation: Test in staging environments first to validate behavior with your specific deployment patterns.