Skip to content

[release-23.0] smartconnpool: avoid close deadlock with refresh reopen (#20157)#20180

Merged
arthurschreiber merged 2 commits into
release-23.0from
backport-20157-to-release-23.0
May 27, 2026
Merged

[release-23.0] smartconnpool: avoid close deadlock with refresh reopen (#20157)#20180
arthurschreiber merged 2 commits into
release-23.0from
backport-20157-to-release-23.0

Conversation

@vitess-bot
Copy link
Copy Markdown
Contributor

@vitess-bot vitess-bot Bot commented May 26, 2026

Description

This is a backport of #20157

Copilot AI review requested due to automatic review settings May 26, 2026 13:39
@vitess-bot vitess-bot Bot added Type: Bug Backport This is a backport Skip CI Skip CI actions from running Merge Conflict Component: VTTablet labels May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vitess-bot
Copy link
Copy Markdown
Contributor Author

vitess-bot Bot commented May 26, 2026

Hello @arthurschreiber, there are conflicts in this backport.

Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually.

Make sure you replace origin by the name of the vitessio/vitess remote

git fetch --all
gh pr checkout 20180
git reset --hard origin/release-23.0
git cherry-pick -m 1 4061458538b60a6fbabd20a08dcaf5dd7a1aabd3

@vitess-bot vitess-bot Bot added Type: Bug Backport This is a backport Skip CI Skip CI actions from running Merge Conflict Component: VTTablet labels May 26, 2026
@github-actions github-actions Bot added this to the v23.0.5 milestone May 26, 2026
The cherry-pick of 4061458 left conflict markers in pool.go. The
upstream PR added an early-return check to tryReturnConn, but the
function signature differs between branches: main has
`(conn *Pooled[C], updateIdleTime bool)` while release-23.0 has
`(conn *Pooled[C])`. Keep release-23.0's signature and apply the new
close-state check on top.

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
@arthurschreiber arthurschreiber removed Skip CI Skip CI actions from running Merge Conflict labels May 27, 2026
@arthurschreiber arthurschreiber self-assigned this May 27, 2026
@arthurschreiber
Copy link
Copy Markdown
Member

Resolved committed conflict markers in go/pools/smartconnpool/pool.go via a new commit on top (no amend/rebase).

The cherry-pick of 4061458 left <<<<<<</=======/>>>>>>> markers around tryReturnConn. Upstream added a pool.close.Load() == nil early-return to that function, but the signature differs between branches:

  • main / upstream PR: tryReturnConn(conn *Pooled[C], updateIdleTime bool) bool
  • release-23.0: tryReturnConn(conn *Pooled[C]) bool

Kept release-23.0's signature (all callsites here pass a single arg) and applied the new close-state check on top.

Verified locally:

  • go test -count=1 -race ./go/pools/smartconnpool/ ✅ (33.9s)
  • NOVTADMINBUILD=1 make build
  • gofumpt / goimports -local "vitess.io/vitess"

@arthurschreiber arthurschreiber marked this pull request as ready for review May 27, 2026 11:57
Copilot AI review requested due to automatic review settings May 27, 2026 11:57
@arthurschreiber arthurschreiber enabled auto-merge (squash) May 27, 2026 11:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@arthurschreiber arthurschreiber merged commit 36fa8c2 into release-23.0 May 27, 2026
106 of 107 checks passed
@arthurschreiber arthurschreiber deleted the backport-20157-to-release-23.0 branch May 27, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants