Skip to content

vtorc: add StaleTopoPrimary analysis and recovery#19173

Merged
mhamza15 merged 9 commits intovitessio:mainfrom
mhamza15:vtorc-primary-topo
Jan 27, 2026
Merged

vtorc: add StaleTopoPrimary analysis and recovery#19173
mhamza15 merged 9 commits intovitessio:mainfrom
mhamza15:vtorc-primary-topo

Conversation

@mhamza15
Copy link
Collaborator

@mhamza15 mhamza15 commented Jan 18, 2026

Description

When demoting a primary during ERS, if the update of the tablet's type in the topology fails and it remains PRIMARY, the tablet will remain PRIMARY indefinitely, and vtorc will continuously run LockedSemiSyncPrimaryHypothesis. This adds a new analysis StaleTopoPrimary, which finds tablets of type PRIMARY in the topology, but there exists a tablet with a more recent primary term start time.

The recovery will demote this primary (forcefully, as this usually means there are pending acks), attempt to reattach the tablet to the current primary (and likely fail), and update the topology with the correct type REPLICA.

Related Issue(s)

Closes #19172

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

AI Disclosure

Help from GPT 5.2 Codex.

When demoting a primary during ERS, if the update of the tablet's type
in the topology fails and it remains `PRIMARY`, the tablet will remain
`PRIMARY` indefinitely, and vtorc will continuously run `LockedSemiSyncPrimaryHypothesis`.
This adds a new analysis `StaleTopoPrimary`, which finds tablets of type `PRIMARY` in
the topology, but there exists a tablet with a more recent primary term start time.

The recovery will demote this primary (forcefully, as this usually means there are
pending acks), attempt to reattach the tablet to the current primary
(and likely fail), and update the topology with the correct type
`REPLICA`.

Closes vitessio#19172

Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
@mhamza15 mhamza15 self-assigned this Jan 18, 2026
@mhamza15 mhamza15 added the Component: VTOrc Vitess Orchestrator integration label Jan 18, 2026
@github-actions github-actions bot added this to the v24.0.0 milestone Jan 18, 2026
@vitess-bot vitess-bot bot added NeedsWebsiteDocsUpdate What it says NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Jan 18, 2026
@vitess-bot
Copy link
Contributor

vitess-bot bot commented Jan 18, 2026

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
@promptless
Copy link
Contributor

promptless bot commented Jan 18, 2026

📝 Documentation updates detected!

New suggestion: Document StaleTopoPrimary VTOrc analysis and recovery

Comment on lines +139 to +141
if t, err := time.Parse(time.RFC3339Nano, rm.GetString(key)); err == nil {
return t
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was needed because we seem to be storing the timestamp in RFC3339Nano format, but then reading it as DateTimeFormat (ISO8601). I find this hard to believe because somehow that means we haven't needed to read timestamps back out at all? But it seems like that's the case 🤷

Copy link
Member

Choose a reason for hiding this comment

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

We use that format for histograms buckets in the stats package. I'm not aware of any other usage. Where was this needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When vtorc is reading the primary term start time, I was getting parsing errors leading to it being parsed as the zero value.

@mhamza15 mhamza15 removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Jan 18, 2026
@timvaillancourt
Copy link
Contributor

timvaillancourt commented Jan 19, 2026

@mhamza15 I haven't done a full review, but this feels like it might overlap the existing stale PRIMARYs fix in VTOrc. Does that not resolve the problem? If it doesn't, I wonder if there is a bug in the current implementation, or perhaps our first approach wasn't ideal

Existing problem here: https://github.com/vitessio/vitess/blob/main/go/vt/vtorc/inst/analysis_dao.go#L459

@mhamza15
Copy link
Collaborator Author

@mhamza15 I haven't done a full review, but this feels like it might overlap the existing stale PRIMARYs fix in VTOrc. Does that not resolve the problem? If it doesn't, I wonder if there is a bug in the current implementation, or perhaps our first approach wasn't ideal

Existing problem here: https://github.com/vitessio/vitess/blob/main/go/vt/vtorc/inst/analysis_dao.go#L459

That one looks to be the inverse, where the current primary is not running as a primary tablet. The new one added here is for a primary that isn't the current primary but still has a tablet type of primary in the topology. Since there exists a more recent and currently active primary, we can demote the stale one.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 18.86792% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.89%. Comparing base (66b1671) to head (f20e9d6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
go/vt/vtorc/logic/topology_recovery.go 0.00% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19173      +/-   ##
==========================================
- Coverage   69.91%   69.89%   -0.03%     
==========================================
  Files        1611     1611              
  Lines      215958   216011      +53     
==========================================
- Hits       150988   150981       -7     
- Misses      64970    65030      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mattlord
Copy link
Member

@mhamza15 is this a bug or an enhancement? If it's truly a bug, we might want to backport it to v23. What do you think?

@mhamza15
Copy link
Collaborator Author

@mhamza15 is this a bug or an enhancement? If it's truly a bug, we might want to backport it to v23. What do you think?

I think it makes sense to backport it! Any reason you didn't include v22?

Copy link
Member

@mattlord mattlord left a comment

Choose a reason for hiding this comment

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

This seems fine to me. I do wonder though if the underlying cause is often that the tablet is unable to successfully complete the state transition for some reason. Do you have any thoughts on that?

Comment on lines +139 to +141
if t, err := time.Parse(time.RFC3339Nano, rm.GetString(key)); err == nil {
return t
}
Copy link
Member

Choose a reason for hiding this comment

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

We use that format for histograms buckets in the stats package. I'm not aware of any other usage. Where was this needed here?

Comment on lines +1187 to +1192
// Demote the tablet, forcing it to drop any pending transactions that are waiting for an ack.
_, err = tmc.DemotePrimary(ctx, analyzedTablet, true)
if err != nil {
return true, topologyRecovery, fmt.Errorf("failed to demote stale primary: %w", err)
}
logger.Info("Successfully demoted the stale primary " + analysisEntry.AnalyzedInstanceAlias)
Copy link
Member

Choose a reason for hiding this comment

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

What if this is the problem, the demotion is stuck for some reason. Do we have any other more forceful means at our disposal?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, never mind! 🤣 I was forgetting that we/Arthur recently added the "force" option to DemotePrimary and we are setting that to true here. ❤️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, and this would likely fail without it as the stale primary will more often than not have errant GTIDs.

Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
This was referenced Jan 23, 2026
Copy link
Collaborator

@nickvanw nickvanw left a comment

Choose a reason for hiding this comment

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

one question about a comment.

Comment on lines +1149 to +1151
// demoteStaleTopoPrimary demotes a tablet that has a stale type of PRIMARY in the topology when a newer primary has
// been elected. It sets the tablet to read-only, updates its type to REPLICA in the topology, and repoints replication
// to the newest primary.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We say that this method repoints replication, but I don't think this is right - it doesn't actually call SetReplicationSource I think, right?

I'm guessing we expect a later analysis to fix replication, but it might be worth making the comment right or calling setReplicationSource.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, it must've slipped through. I'll update it to actually do what it says it does.

Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
@mhamza15 mhamza15 enabled auto-merge (squash) January 27, 2026 21:00
@mhamza15 mhamza15 merged commit c3c9914 into vitessio:main Jan 27, 2026
103 checks passed
@promptless
Copy link
Contributor

promptless bot commented Jan 27, 2026

📝 Documentation updates detected!

Updated existing suggestion: Document StaleTopoPrimary VTOrc analysis and recovery

@eseokoh
Copy link

eseokoh commented Jan 28, 2026

I think demoteStaleTopoPrimary also needs setReadOnly, right?
If the tablet was demoted as writable, I believe fixReplica will resolve it later, but we can do it here to make it sure.

@mhamza15
Copy link
Collaborator Author

mhamza15 commented Jan 28, 2026

I think demoteStaleTopoPrimary also needs setReadOnly, right? If the tablet was demoted as writable, I believe fixReplica will resolve it later, but we can do it here to make it sure.

The DemotePrimary RPC handles that for us:

// DemotePrimary prepares a PRIMARY tablet to give up leadership to another tablet.
//
// It attempts to idempotently ensure the following guarantees upon returning
// successfully:
// - No future writes will be accepted.
// - No writes are in-flight.
// - MySQL is in read-only mode.
// - Semi-sync settings are consistent with a REPLICA tablet.
//
// If necessary, it waits for all in-flight writes to complete or time out.
//
// It should be safe to call this on a PRIMARY tablet that was already demoted,
// or on a tablet that already transitioned to REPLICA.
//
// If a step fails in the middle, it will try to undo any changes it made.
func (tm *TabletManager) DemotePrimary(ctx context.Context, force bool) (*replicationdatapb.PrimaryStatus, error) {

mhamza15 added a commit that referenced this pull request Jan 28, 2026
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
mhamza15 added a commit that referenced this pull request Jan 28, 2026
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
mhamza15 added a commit that referenced this pull request Jan 28, 2026
…19173) (#19237)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
mhamza15 added a commit that referenced this pull request Jan 28, 2026
…19173) (#19236)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
tanjinx pushed a commit to slackhq/vitess that referenced this pull request Feb 5, 2026
…itessio#19173) (vitessio#19236)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>
jwangace pushed a commit to jwangace/vitess that referenced this pull request Feb 5, 2026
jwangace pushed a commit to jwangace/vitess that referenced this pull request Feb 5, 2026
…itessio#19173) (vitessio#19237)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Jun Wang <jun.wang@demonware.net>
jwangace pushed a commit to jwangace/vitess that referenced this pull request Feb 5, 2026
…itessio#19173) (vitessio#19237)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Jun Wang <jun.wang@demonware.net>
jwangace pushed a commit to jwangace/vitess that referenced this pull request Feb 5, 2026
…itessio#19173) (vitessio#19237)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Jun Wang <jun.wang@demonware.net>
tanjinx added a commit to slackhq/vitess that referenced this pull request Feb 5, 2026
* [release-22.0] Bump to `v22.0.1-SNAPSHOT` after the `v22.0.0` release (vitessio#18225)

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>

* [release-22.0] fix: Preserve multi-column TupleExpr in tuple simplifier (vitessio#18216) (vitessio#18220)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] Properly handle grpc dial errors in the throttler metric aggregation (vitessio#18073) (vitessio#18231)

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Signed-off-by: Mohamed Hamza <mhamza15@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza15@github.com>

* [release-22.0] test: TestQueryTimeoutWithShardTargeting fix flaky test (vitessio#18242) (vitessio#18250)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] make sure to give MEMBER OF the correct precedence (vitessio#18237) (vitessio#18245)

Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Andrés Taylor <andres@planetscale.com>

* [release-22.0] Fix evalengine crashes on unexpected types (vitessio#18254) (vitessio#18258)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix subquery merging regression introduced in vitessio#11379 (vitessio#18260) (vitessio#18263)

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Andrés Taylor <andres@planetscale.com>

* [release-22.0] json array insert test (vitessio#18284) (vitessio#18286)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] Fix `SET` and `START TRANSACTION` in create procedure statements (vitessio#18279) (vitessio#18293)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix deadlock in semi-sync monitor (vitessio#18276) (vitessio#18290)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Upgrade the Golang version to `go1.24.3` (vitessio#18239)

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: frouioui <frouioui@users.noreply.github.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>

* [release-22.0] Atomic Copy: Handle error that was ignored while streaming tables and log it (vitessio#18313) (vitessio#18316)

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] fix: handle dml query for None opcode (vitessio#18326) (vitessio#18345)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] fix: keep LIMIT/OFFSET even when merging UNION queries (vitessio#18361) (vitessio#18363)

Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>

* [release-22.0] Fix: Deadlock in `Close` and `write` in semi-sync monitor. (vitessio#18359) (vitessio#18368)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Upgrade the Golang version to `go1.24.4` (vitessio#18329)

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: frouioui <frouioui@users.noreply.github.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>

* [release-22.0] fix version issue when using --mysql-shell-speedup-restore=true (vitessio#18310) (vitessio#18356)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Split workflow with flaky vdiff2 e2e test. Skip flaky Migrate test. (vitessio#18300) (vitessio#18334)

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Throttler: keep watching topo even on error (vitessio#18223) (vitessio#18322)

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Code Freeze for `v22.0.1` (vitessio#18374)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* [release-22.0] Release of `v22.0.1` (vitessio#18375)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* [release-22.0] Bump to `v22.0.2-SNAPSHOT` after the `v22.0.1` release (vitessio#18380)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* [release-22.0] [Bugfix] Broken Heartbeat system in Row Streamer (vitessio#18390) (vitessio#18398)

Signed-off-by: siddharth16396 <siddharth16396@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] test: Fix race condition in TestStreamRowsHeartbeat (vitessio#18414) (vitessio#18420)

Signed-off-by: siddharth16396 <siddharth16396@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Online DDL: resume vreplication after cut-over/RENAME failure (vitessio#18428) (vitessio#18437)

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>

* [release-22.0] Fix `vttablet` not being marked as not serving when MySQL stalls (vitessio#17883) (vitessio#18454)

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Topo: Add NamedLock test for zk2 and consul and get them passing (vitessio#18407) (vitessio#18410)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] Reset in-memory sequence info on vttablet on UpdateSequenceTables request (vitessio#18415) (vitessio#18445)

Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Noble Mittal <noblemittal@outlook.com>

* [release-22.0] bugfix: Fix impossible query for UNION (vitessio#18463) (vitessio#18465)

Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Andrés Taylor <andres@planetscale.com>

* [release-22.0] VReplication: Fix bug while reading _vt.vreplication record (vitessio#18478) (vitessio#18483)

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix for simple projection showing no fields (vitessio#18489) (vitessio#18493)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] Fix scalar aggregation with literals in empty result sets (vitessio#18477) (vitessio#18491)

Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix watcher storm during topo outages (vitessio#18434) (vitessio#18440)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>

* [release-22.0] Avoid terminating atomic copy workflows on error if they are out of copy phase (vitessio#18475) (vitessio#18487)

Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Bump @babel/runtime from 7.26.0 to 7.27.6 in /web/vtadmin (vitessio#18467) (vitessio#18502)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [release-22.0] Bump vite from 4.5.9 to 4.5.14 in /web/vtadmin (vitessio#18485) (vitessio#18500)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [release-22.0] Fix regression in v22 around new flag setup (vitessio#18507) (vitessio#18509)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Bump form-data from 4.0.1 to 4.0.4 in /web/vtadmin (vitessio#18473) (vitessio#18504)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [release-22.0] bugfix: Plan group by only on top of derived tables correctly (vitessio#18505) (vitessio#18511)

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>

* [release-22.0] Fix GetSchema RPC to prevent returning view definitions when EnableViews is disabled (vitessio#18513) (vitessio#18517)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] CI: Fix `VDiff2` flaky e2e test (vitessio#18494) (vitessio#18526)

Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0]  Fix foreign key relation with routed tables (vitessio#18537) (vitessio#18541)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Try updating the create PR workflow step (vitessio#18563) (vitessio#18571)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix a panic in VDiff when reconciling extra rows. (vitessio#18585) (vitessio#18596)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] fix: remove database qualifier after building query in operator to sql (vitessio#18602) (vitessio#18605)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Introduce aliases for foreign keys verify operations (vitessio#18601) (vitessio#18614)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] [CI] Use the draft state from the event payload instead of calling `curl`. (vitessio#18650) (vitessio#18652)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] fix: Fix `GenerateShardRanges` returning shard names that don't cover the full range (vitessio#18641) (vitessio#18654)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] Fix: Improve VDiff internal query performance (vitessio#18579) (vitessio#18632)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] Simplify workflow files. (vitessio#18649) (vitessio#18656)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] ci: Replace `always()` with `!cancelled()`. (vitessio#18659) (vitessio#18662)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] ci: Disable man-db auto updates. (vitessio#18665) (vitessio#18668)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] ci: Bump `actions/setup-go` to `v5.5.0`. (vitessio#18660) (vitessio#18670)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Update codeowners and maintainers. (vitessio#18676)

* [release-22.0] Upgrade the Golang version to `go1.24.7` (vitessio#18621)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: frouioui <35779988+frouioui@users.noreply.github.com>
Co-authored-by: Nick Van Wiggeren <nick@planetscale.com>

* [release-22.0] ci: don't run codecov twice. (vitessio#18680) (vitessio#18682)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Update CODEOWNERS (vitessio#18697) (vitessio#18699)

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] fix: ensure callbacks are not called after `VStream` returns (vitessio#18689) (vitessio#18705)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] CONNPOOL: Fix race condition when waiting for connection (vitessio#18713) (vitessio#18721)

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] connpool: Bump the hang detection timeout to fix flakiness (vitessio#18722) (vitessio#18724)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix handling of tuple bind variables in filtering operations. (vitessio#18736) (vitessio#18746)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Potential fix for code scanning alert no. 2992: Clear-text logging of sensitive information (vitessio#18754) (vitessio#18759)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] update java packages to use central instead of ossrh (vitessio#18765) (vitessio#18766)

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] VReplication: Ensure proper handling of keyspace/database names with dashes (vitessio#18762) (vitessio#18772)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Resolve `commons-lang` vulnerability in Java driver (vitessio#18768) (vitessio#18796)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] ci: use the newest mysql apt config package (vitessio#18790) (vitessio#18793)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] `vtctldclient GetPermissions`: hide `authentication_string` from response (vitessio#18771) (vitessio#18798)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>

* [release-22.0] repltracker: reset replica lag when we are primary (vitessio#18800) (vitessio#18806)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Address dir traversal in file backup storage `GetBackups` RPC (vitessio#18814) (vitessio#18817)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] VReplication: Treat ER_BINLOG_CREATE_ROUTINE_NEED_SUPER as unrecoverable (vitessio#18784) (vitessio#18819)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Upgrade the Golang version to `go1.24.9` (vitessio#18737)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: frouioui <35779988+frouioui@users.noreply.github.com>
Co-authored-by: Nick Van Wiggeren <nick@planetscale.com>

* [release-22.0] vtadmin: upgrade vite to the latest (vitessio#18803) (vitessio#18811)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: Nick Van Wiggeren <nickvanw@users.noreply.github.com>

* [release-22.0] Fix bug where query consolidator returns empty result without error when the waiter cap exceeded (vitessio#18782) (vitessio#18832)

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Stas Maksimov <maksimov@gmail.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>

* [release-22.0] ci: extract os tuning (vitessio#18824) (vitessio#18826)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] ci: DRY up MySQL Setup (vitessio#18815) (vitessio#18836)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] Fix flaky tests (vitessio#18835) (vitessio#18838)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] copy_state: use a mediumblob instead of a smaller varbinary for lastpk (vitessio#18852) (vitessio#18858)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] BuiltinBackupEngine: Retry file close and fail backup when we cannot (vitessio#18848) (vitessio#18861)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] fix sqlSelectLimit propagating to subqueries (vitessio#18716) (vitessio#18872)

Signed-off-by: ghostframe <marcosandresdiaz@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Code Freeze for `v22.0.2` (vitessio#18876)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Release of `v22.0.2` (vitessio#18878)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Bump to `v22.0.3-SNAPSHOT` after the `v22.0.2` release (vitessio#18881)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Improve Semi-Sync Monitor Behavior to Prevent Errant ERS (vitessio#18884) (vitessio#18906)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Bump js-yaml from 4.1.0 to 4.1.1 in /web/vtadmin (vitessio#18908) (vitessio#18910)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [release-22.0] Upgrade the Golang version to `go1.24.10` (vitessio#18897)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: frouioui <35779988+frouioui@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] `vtbench`: add `--db-credentials-*` flags (vitessio#18913) (vitessio#18921)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Properly Strip Keyspace Table Qualifiers in FK Constraints (vitessio#18926) (vitessio#18934)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Stop using Equinix Metal self hosted runners (vitessio#18942) (vitessio#18943)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Drop dependency on `npm`, bump version of `glob`. (vitessio#18931) (vitessio#18957)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Don't hardcode the go version to use for upgrade/downgrade tests. (vitessio#18920) (vitessio#18955)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] connpool: fix connection leak during idle connection reopen (vitessio#18967) (vitessio#18970)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] Potential fix for code scanning alert no. 3944: Database query built … (vitessio#18962)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* [release-22.0] vdiff: do not sort by table name in summary, it is not necessary (vitessio#18972) (vitessio#18977)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] VDiff: Handle the case where a workflow's table has been dropped on the source (vitessio#18985) (vitessio#18988)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] CI: Improve reliability of codecov workflow with larger runner (vitessio#18992) (vitessio#18994)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Change connection pool idle expiration logic (vitessio#19004) (vitessio#19013)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] `ci`: use `etcd` v3.5.25, add retries (vitessio#19015) (vitessio#19021)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>

* [release-22.0] Bump org.apache.logging.log4j:log4j-core from 2.24.1 to 2.25.3 in /java (vitessio#19063) (vitessio#19065)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [release-22.0] Skip flaky `TestRedial` test (vitessio#19106) (vitessio#19107)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] binlog_json: fix opaque value parsing to read variable-length (vitessio#19102) (vitessio#19109)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] vschema revert: initialize as nil so that nil checks do not pass later (vitessio#19114) (vitessio#19117)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix `ReloadSchema` incorrectly using `DisableBinlogs` value in `grpctmclient` (vitessio#19085) (vitessio#19129)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix cross shard/keyspace joins with derived tables containing a `UNION`. (vitessio#19046) (vitessio#19136)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] workflows: avoid accidental deletion to routing rules (vitessio#19121) (vitessio#19135)

Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* Pin GitHub Actions and Docker images by hash (vitessio#19151)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix column offset tracking for `UNION`s to be case insensitive. (vitessio#19139) (vitessio#19161)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>

* [release-22.0] VDiff: Prevent division by 0 when reconciling mismatches for reference tables (vitessio#19160) (vitessio#19164)

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] CI: Look for expected log message rather than code in Backup tests (vitessio#19199) (vitessio#19200)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Update go-upgrade to update docker image digests (vitessio#19178) (vitessio#19188)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>

* [release-22.0] Fix sporadic TestServingKeyspaces panic on context cancellation (vitessio#19163) (vitessio#19186)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Fix major upgrade logic in go upgrade tool (vitessio#19211)

* [release-22.0] CI: Use new Percona Server repo name (vitessio#19221)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Fix go upgrade workflow (vitessio#19216) (vitessio#19219)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Upgrade the Golang version to `go1.24.12` (vitessio#19222)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: frouioui <35779988+frouioui@users.noreply.github.com>

* [release-22.0] VReplication: Properly Handle Sequence Table Initialization For Empty Tables (vitessio#19226) (vitessio#19227)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] `vtorc`: detect errant GTIDs for replicas not connected to primary (vitessio#19224) (vitessio#19233)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Add new `force` flag to `DemotePrimary` to force a demotion even when blocked on waiting for semi-sync acks (vitessio#18714) (vitessio#19238)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>

* [release-22.0] vtorc: add `StaleTopoPrimary` analysis and recovery (vitessio#19173) (vitessio#19236)

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>

* [release-22.0] switch end-to-end tests to gotestsum (vitessio#19182) (vitessio#19244)

* [release-22.0] evalengine: make `JSON_EXTRACT` work with non-static arguments (vitessio#19035) (vitessio#19253)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] Escape control bytes in JSON strings (vitessio#19270) (vitessio#19274)

Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* [release-22.0] evalengine: Fix `NULL` document handling in JSON functions (vitessio#19052) (vitessio#19230)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>

* [release-22.0] Code Freeze for `v22.0.3` (vitessio#19281)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* [release-22.0] Release of `v22.0.3` (vitessio#19282)

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Fix remaining conflict markers in CHANGELOG.md

Removed conflict markers that were accidentally committed during merge.
Both entries are now properly included: 43.5 (golang 1.24.10) and 43.6 (golang 1.24.12).

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add back GitHub access token setup to vtadmin workflows

Re-added the GitHub access token configuration step to both vtadmin workflows
that was lost during the v22.0.3 merge. This step is required for accessing
private Slack repositories during the build process.

Files updated:
- .github/workflows/check_make_vtadmin_authz_testgen.yml
- .github/workflows/check_make_vtadmin_web_proto.yml

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add back GitHub access token setup to e2e_race workflow

Re-added the GitHub access token configuration step to e2e_race.yml that was
lost during the v22.0.3 merge. This step is required for accessing private
Slack repositories during the build process.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add back GitHub access token setup to endtoend workflow

Re-added the GitHub access token configuration step to endtoend.yml that was
lost during the v22.0.3 merge. This step is required for accessing private
Slack repositories during the build process.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add back GitHub access token setup to unit_test_mysql57 workflow

Re-added the GitHub access token configuration step to unit_test_mysql57.yml
that was lost during the v22.0.3 merge. This step is required for accessing
private Slack repositories during the build process.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add back GitHub access token setup to unit_test_evalengine_mysql57 workflow

Re-added the GitHub access token configuration step to
unit_test_evalengine_mysql57.yml that was lost during the v22.0.3 merge.
This step is required for accessing private Slack repositories during the
build process.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add GOPRIVATE env variable to MySQL 57 workflow files

Added GOPRIVATE environment variable to specify private Go module repositories
for both MySQL 57 unit test workflows. This ensures Go can properly access
the private slackhq/vitess-addons repository during builds.

Files updated:
- .github/workflows/unit_test_mysql57.yml
- .github/workflows/unit_test_evalengine_mysql57.yml

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add GOPRIVATE env and GitHub access token to java_docker_test workflow

Added both the GOPRIVATE environment variable and GitHub access token
configuration step to java_docker_test.yml. These are required for accessing
private Slack repositories during the Java Docker test builds.

Changes:
- Added GOPRIVATE env variable for slackhq/vitess-addons
- Added GitHub access token setup step after Set up Go

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add GOPRIVATE env and GitHub access token to docker_test_cluster workflow

Added both the GOPRIVATE environment variable and GitHub access token
configuration step to docker_test_cluster.yml. These are required for
accessing private Slack repositories during the Docker cluster test builds.

Changes:
- Added GOPRIVATE env variable for slackhq/vitess-addons
- Added GitHub access token setup step after Set up Go

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* fix docker test file

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* fix test

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* fix test runner

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* fix test

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* fix test

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* udpate tests

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert query_executor files to pre-merge Slack version

Restored query_executor.go and query_executor_test.go to their state before
the v22.0.3 merge to preserve Slack-specific customizations and avoid
compatibility issues with upstream changes.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert vstream_manager files to pre-merge Slack version

Restored vstream_manager.go and vstream_manager_test.go to their state before
the v22.0.3 merge to preserve critical Slack-specific features:

- Transaction chunking to prevent OOM (Out Of Memory) issues with large transactions
- Stream liveness monitoring to detect dead streams
- Enhanced metrics (vstreamsTransactionsChunked counter)
- Detailed VStream flags logging for debugging

These features were added to improve reliability and observability of VStream
operations and should not be lost in the merge.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert smartconnpool waitlist changes from v22.0.3 merge

Reverted go/pools/smartconnpool/waitlist.go to pre-merge version and removed
the new semaphore implementation files (sema.s, sema_norace.go, sema_race.go).

The upstream changes replaced the channel-based waiter implementation with a
semaphore-based approach. Reverting to preserve the Slack version's channel
implementation.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add Slack-specific configs to upgrade_downgrade test workflows

Updated all 16 upgrade_downgrade test workflows with:
- runs-on: vitess-ubuntu24-16cpu-1 (Slack's custom runner)
- GOPRIVATE and GH_ACCESS_TOKEN environment variables
- GitHub access token setup step before Set up python

This ensures proper access to private Slack repositories during CI.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert selected upgrade_downgrade workflow files to pre-merge version

Reverted 7 workflow files to their state before the v22.0.3 merge to preserve
Slack-specific configurations that were present in the original version:

- upgrade_downgrade_test_backups_e2e.yml
- upgrade_downgrade_test_backups_e2e_next_release.yml
- upgrade_downgrade_test_backups_manual_next_release.yml
- upgrade_downgrade_test_query_serving_queries_next_release.yml
- upgrade_downgrade_test_query_serving_queries_2_next_release.yml
- upgrade_downgrade_test_query_serving_schema_next_release.yml
- upgrade_downgrade_test_reparent_new_vtctl.yml

These files had custom configurations that need to be maintained in the Slack fork.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert upgrade_downgrade_test_reparent_new_vttablet.yml to pre-merge version

Reverted .github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml to its
state before the v22.0.3 merge to preserve Slack-specific configurations.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert CODEOWNERS to Slack version

Replaced upstream CODEOWNERS with Slack-specific version that assigns
all files to @slackhq/vitess-approvers.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert vstream_test.go to pre-merge Slack version

Reverted go/test/endtoend/vreplication/vstream_test.go to its state before
the v22.0.3 merge to preserve Slack-specific test configurations.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Revert Dockerfiles to pre-merge Slack version

Reverted docker/lite/Dockerfile.mysql84 and docker/lite/Dockerfile.percona80
to their state before the v22.0.3 merge to preserve Slack-specific configurations:

- Use golang:1.24.10-bookworm (without SHA pinning)
- Use debian:bookworm-slim (without SHA pinning)
- Restore GH_ACCESS_TOKEN setup for private repository access
- Restore GOPRIVATE environment variable for github.com/slackhq/vitess-addons

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* update test

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* update test runner

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add Slack private repo configuration to vttestserver Dockerfiles

Restore GitHub access token and GOPRIVATE settings needed for accessing
Slack's private vitess-addons repository during Docker builds.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* update tests

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* update tests

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Fix duplicate vtgate_schematracker_viewsdisabled test configuration

Remove duplicate test entry that was missing the Packages field and causing
'ERROR: PACKAGES is empty' test failures. Merged RetryMax field from the
duplicate into the correct entry.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Fix additional duplicate test configurations

Remove duplicate entries for vtgate_foreignkey_routing and
vreplication_sequence_reset_on_switch_traffic that were missing
the Packages field. Merged RetryMax field from duplicates.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Disable MySQL 5.7 unit tests for Slack branches

Add branches-ignore pattern to exclude slack-[0-9]+.[0-9] branches from
MySQL 5.7 unit test workflows since Slack no longer supports MySQL 5.7.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Fix workflow syntax: add missing env keyword for environment variables

Three workflow files were missing the 'env:' keyword before their
environment variable declarations, causing the workflows to be invalid
and preventing tests from running.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Update vtop_example workflow to use vitess runner

Change from oracle-vm-8cpu-32gb-x86-64 to vitess-ubuntu24-16cpu-1
to align with other workflows in the repository.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Fix GitHub access token setup condition in local_example workflow

The Setup GitHub access token step was checking for 'end_to_end' filter
output, but the paths-filter only defines 'examples'. This mismatch caused
the step to be skipped, preventing authentication for downloading the
private vitess-addons module.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add GitHub access token setup to vtop_example workflow

Add GOPRIVATE and GH_ACCESS_TOKEN environment variables, and add the
Setup GitHub access token step to authenticate for downloading the
private vitess-addons module.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Pass GitHub access token to Docker build in vtop_example test

The vtop_example test builds a Docker image using docker/lite/Dockerfile,
which needs to authenticate to download the private vitess-addons module.
Pass GH_ACCESS_TOKEN as a build argument so the Dockerfile can configure
git authentication.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Add GitHub access token setup to bootstrap Docker image

The bootstrap Docker image is used for Java tests and needs to authenticate
to download the private vitess-addons module during go mod download.
Add GH_ACCESS_TOKEN build arg handling and git config setup.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Update cluster_endtoend_xb_backup workflow to use vitess runner

Change from ubuntu-24.04 to vitess-ubuntu24-16cpu-1 runner.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* regen workflows

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

* Update vitess-addons to v0.22.3 and remove wrapper

Upgrade github.com/slackhq/vitess-addons from v0.22.1 to v0.22.3.
The new version implements HasSemiSync() directly in SlackCrossCell,
so the slackCrossCellWrapper is no longer needed.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

---------

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Signed-off-by: Mohamed Hamza <mhamza15@github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: siddharth16396 <siddharth16396@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Nick Van Wiggeren <nick@planetscale.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>
Signed-off-by: ghostframe <marcosandresdiaz@gmail.com>
Co-authored-by: vitess-bot <139342327+vitess-bot@users.noreply.github.com>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Mohamed Hamza <mhamza15@github.com>
Co-authored-by: Andrés Taylor <andres@planetscale.com>
Co-authored-by: frouioui <frouioui@users.noreply.github.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <guptamanan100@gmail.com>
Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>
Co-authored-by: Noble Mittal <noblemittal@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: frouioui <35779988+frouioui@users.noreply.github.com>
Co-authored-by: Nick Van Wiggeren <nick@planetscale.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Nick Van Wiggeren <nickvanw@users.noreply.github.com>
Co-authored-by: Stas Maksimov <maksimov@gmail.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to: release-22.0 Needs to be backport to release-22.0 Backport to: release-23.0 Needs to be backport to release-23.0 Component: VTOrc Vitess Orchestrator integration Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: Old primary remains if topology tablet type update fails during ERS

5 participants