Skip to content

mysqlctl init --server_id#795

Open
neil-harkins-sf wants to merge 1 commit intoslack-22.0from
nh_allow_server_id_cli_arg_override
Open

mysqlctl init --server_id#795
neil-harkins-sf wants to merge 1 commit intoslack-22.0from
nh_allow_server_id_cli_arg_override

Conversation

@neil-harkins-sf
Copy link

mysqlctl init allows many values to be set via cli args, however {{.ServerID}} is not one of them.
sites which use vitess should have the ability to set this according to a site policy.
strictly random generation is technically flawed as it could possibly result in a primary and replica with the same server_id.
although VERY low probability, the result would be lost replication events, as described in vitess' own comments at https://github.com/slackhq/vitess/blob/slack-22.0/go/vt/mysqlctl/cmd.go#L30-L48

more internal slack discussion here:
https://slack-pde.slack.com/archives/CLLEUERMK/p1770773133707789

@neil-harkins-sf neil-harkins-sf requested a review from a team as a code owner February 11, 2026 02:15
@github-actions github-actions bot added this to the v22.0.3 milestone Feb 11, 2026
@sbaker617
Copy link

I think we'd want to see if upstream would accept this before considering merging, not something we'd want to carry as a custom change on our fork.

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.

3 participants