Skip to content

Change connection pool idle expiration logic#19004

Merged
arthurschreiber merged 7 commits intomainfrom
arthur/fix-idle-connection-expiration
Dec 11, 2025
Merged

Change connection pool idle expiration logic#19004
arthurschreiber merged 7 commits intomainfrom
arthur/fix-idle-connection-expiration

Conversation

@arthurschreiber
Copy link
Member

@arthurschreiber arthurschreiber commented Dec 8, 2025

Description

This pull request changes how idle connection expiration is handled.

#18967 fixed a bug where connection pools could lose track of how many connections are actually active in the pool, but introduced a new issue where idle connections on a connection pool with low frequency would be closed but not removed from the connection stacks. As every connection struct also allocates a bufio.Reader with a 16MB buffer size, over time these connections would use a significant chunk of memory, causing the Go Garbage Collector to go into overdrive and consume a lot of CPU resources in turn.

This changes the connection pool expiration logic to not modify connections while they're still in a connection stack. Instead, we pop off all the available connections from the stack, quickly filter out the ones that need to be expired and return all the other connections back to the connection pool. Note that we're not interested in the actively used connections - the fact that they are used and not on one of the stacks means that they are not idling and not in need of being expired anyway.

Once we have collected the list of connections to expire, we reopen them one by one, and then return them back to the pool if we could reopen them successfully. If we encounter an error during a reopen operation, we just treat that connection as having been closed (and update the pool to reflect this).

There's some downside to this approach, namely that for very large pools there might be a short moment where all the connections have been popped off the stack and not returned yet - and incoming get calls will end up on the waitlist. I don't think this is an issue, because a lot of connections on the stack means low usage of the pool, so it's probably okay for a very short moment to not have any connection on the stack. On a connection pool that's used at a very high frequency, we'll probably only pop off a few connections from the stack - so checking for idle connections should barely be noticeable.

Related Issue(s)

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

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
@vitess-bot
Copy link
Contributor

vitess-bot bot commented Dec 8, 2025

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.

@vitess-bot vitess-bot bot added NeedsBackportReason If backport labels have been applied to a PR, a justification is required NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Dec 8, 2025
@github-actions github-actions bot added this to the v24.0.0 milestone Dec 8, 2025
@arthurschreiber arthurschreiber changed the title Change how we expire idle connections. Change connection pool idle expiration logic Dec 8, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@3dd1516). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19004   +/-   ##
=======================================
  Coverage        ?   69.82%           
=======================================
  Files           ?     1610           
  Lines           ?   215363           
  Branches        ?        0           
=======================================
  Hits            ?   150378           
  Misses          ?    64985           
  Partials        ?        0           

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

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.

Makes sense to me. I only had the one question about how we handle the case where fail to return the conn.

Thank you for jumping on this so quickly! ❤️

@arthurschreiber arthurschreiber marked this pull request as ready for review December 9, 2025 10:04
@arthurschreiber arthurschreiber added 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: VTTablet Type: Bug and removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says labels Dec 9, 2025
@arthurschreiber
Copy link
Member Author

I'll add some tests as well so we have coverage for this behavior.

@promptless
Copy link
Contributor

promptless bot commented Dec 9, 2025

📝 Documentation updates detected!

Updated existing suggestion: Add v24.0.0 changelog entries for VTTablet bug fixes

@arthurschreiber arthurschreiber removed 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 Dec 9, 2025
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Copy link
Collaborator

@mhamza15 mhamza15 left a comment

Choose a reason for hiding this comment

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

If I'm not mistaken, this will cause the new connection stacks to be in reverse order. Is there a concern that new connections will be on the bottom of the stack?

@arthurschreiber
Copy link
Member Author

If I'm not mistaken, this will cause the new connection stacks to be in reverse order. Is there a concern that new connections will be on the bottom of the stack?

I don't think this matters. The connection stack is not strictly ordered by the timeUsed value. This will make the order deviate stronger, but I don't think anything depends on the exact values.

I could reverse the order of putting the connections back if we have stronger feelings about it?

@timvaillancourt timvaillancourt self-requested a review December 9, 2025 15:46
@mhamza15
Copy link
Collaborator

mhamza15 commented Dec 9, 2025

If I'm not mistaken, this will cause the new connection stacks to be in reverse order. Is there a concern that new connections will be on the bottom of the stack?

I don't think this matters. The connection stack is not strictly ordered by the timeUsed value. This will make the order deviate stronger, but I don't think anything depends on the exact values.

I could reverse the order of putting the connections back if we have stronger feelings about it?

I definitely don't know if it will have a tangible impact, so no strong feelings here. If it's an easy switch, maybe maintaining the order will offer less surprises, but no concerns from me 👍

Copy link
Contributor

@timvaillancourt timvaillancourt left a comment

Choose a reason for hiding this comment

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

This change make sense to me 🎉

I would suggest we benchmark this, but I suspect we wouldn't be accurately testing this code path, as the benchmark is likely to create very-active connection pools, unless we added specific tests that would mimic an occasionally-used pool. So I'm not suggesting we benchmark this, but I wish we were in a place where that would give us confidence. The area I'm most curious about is when we iterate over every connection while others are waiting

I also wanted to call out that it would be nice to have an e2e test for this, but that could be a project on it's own. Technically it should be possible to simulate an idle MySQL connection and using tablet-stats we could check the pool acted properly, but this would be a large amount of work. cc'ing @arthurschreiber / @mattlord to validate whether or not this would be possible, and if you agree the effort required is out-of-scope

@mattlord
Copy link
Member

mattlord commented Dec 9, 2025

If I'm not mistaken, this will cause the new connection stacks to be in reverse order. Is there a concern that new connections will be on the bottom of the stack?

I don't think this matters. The connection stack is not strictly ordered by the timeUsed value. This will make the order deviate stronger, but I don't think anything depends on the exact values.

I could reverse the order of putting the connections back if we have stronger feelings about it?

@arthurschreiber It was explicitly designed to be a LIFO queue, so it's probably worth doing: #14033

@arthurschreiber
Copy link
Member Author

Thanks for all the feedback so far! ❤️

I added a comment that explains why the order we put connections back doesn't really matter, @harshit-gangal made me aware that there's either is non-optimal so it makes no difference. 😅

I pushed another change that limits the amount of connections we expire in a single iteration - which means we never expire all connections in a single iteration which should fix any concerns around expiring all connections and then not being able to serve spikes in traffic.

I also added a bunch of comments to explain why this is implemented this way.

//
// We will expire any additional connections in the next iteration of the idle closer.
expiredConnections := make([]*Pooled[C], 0, max(pool.Active()/2, 1))
validConnections := make([]*Pooled[C], 0)
Copy link
Member

Choose a reason for hiding this comment

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

What's the expectation here of the number of valid connections? Should we preallocate something bigger? If we don't want to, we can leave this as nil here better?

Copy link
Member Author

Choose a reason for hiding this comment

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

The max number of valid connections could be somewhere around pool.Capacity() - but only in the case where none of the connections have expired, and they all use the same settings.

If the connections use different settings, they will be in different stacks, and if they are actively being used they won't be in any of the stacks at the time this code runs.

I think I'll go and use the value of pool.Active() - it is likely to over-allocate, but given that this list only is storing a bunch of pointers, and is most likely not even going to reach 1k entries in most sensible setups, wasting a few bytes for a few microseconds is not going to be an issue.

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
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.

LGTM. Nice work on this, @arthurschreiber ! ❤️

@arthurschreiber arthurschreiber merged commit 240ad97 into main Dec 11, 2025
103 of 104 checks passed
@arthurschreiber arthurschreiber deleted the arthur/fix-idle-connection-expiration branch December 11, 2025 09:48
mattlord pushed a commit that referenced this pull request Dec 11, 2025
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
arthurschreiber added a commit that referenced this pull request Dec 11, 2025
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
arthurschreiber added a commit that referenced this pull request Dec 11, 2025
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
arthurschreiber pushed a commit that referenced this pull request Dec 11, 2025
…19014)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
arthurschreiber added a commit that referenced this pull request Dec 11, 2025
…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>
andyedison pushed a commit to github/vitess-gh that referenced this pull request Jan 7, 2026
…#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>
tanjinx pushed a commit to slackhq/vitess that referenced this pull request Feb 5, 2026
…#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>
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
…#19004) (vitessio#19014)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
jwangace pushed a commit to jwangace/vitess that referenced this pull request Feb 5, 2026
…#19004) (vitessio#19014)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.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
…#19004) (vitessio#19014)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.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
…#19004) (vitessio#19014)

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.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>
andyedison pushed a commit to github/vitess-gh that referenced this pull request Mar 10, 2026
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
andyedison added a commit to github/vitess-gh that referenced this pull request Mar 11, 2026
Change connection pool idle expiration logic (vitessio#19004)
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: VTTablet Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants