Skip to content

server: check connection is available in SQLKiller (#60685)#65862

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5-20260116-v8.5.5from
bb7133:bb7133/cp-60685-855
Jan 29, 2026
Merged

server: check connection is available in SQLKiller (#60685)#65862
ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5-20260116-v8.5.5from
bb7133:bb7133/cp-60685-855

Conversation

@bb7133
Copy link
Copy Markdown
Member

@bb7133 bb7133 commented Jan 28, 2026

This is a cherry-pick of #60685, and the conflicts are resolved by:

  • pkg/server/conn_stmt.go: kept the new SQLKiller connection‑alive hook (IsConnectionAlive.Store(&fn) with defer reset) inserted before executing the prepared statement, so the checker uses bufReadConn.IsAlive() during plan‑cache prepared statement execution.
  • pkg/server/tests/commontest/tidb_test.go: preserved the existing audit plugin tests (TestAuditPluginInfoForStarting, TestAuditPluginRetrying) from the release branch and appended the new TestIssue57531 test from the cherry‑picked commit, so both sets of tests remain.

What problem does this PR solve?

Issue Number: close #57531

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • None

Documentation

  • None

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

  - Fix the issue that TiDB can't close connection immediately after killing client process.

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 94.91525% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-8.5-20260116-v8.5.5@ee48f0b). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             release-8.5-20260116-v8.5.5     #65862   +/-   ##
================================================================
  Coverage                               ?   72.5168%           
================================================================
  Files                                  ?       1683           
  Lines                                  ?     469473           
  Branches                               ?          0           
================================================================
  Hits                                   ?     340447           
  Misses                                 ?     106363           
  Partials                               ?      22663           
Flag Coverage Δ
integration 49.6510% <58.6206%> (?)
unit 64.9399% <94.9152%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 55.4929% <0.0000%> (?)
🚀 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.

@EmmaDuDu
Copy link
Copy Markdown

/retest

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 29, 2026
Copy link
Copy Markdown
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jan 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, YangKeao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Defined2014,YangKeao]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 29, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jan 29, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-29 09:40:06.995594017 +0000 UTC m=+1264434.609550863: ☑️ agreed by Defined2014.
  • 2026-01-29 09:44:39.87389047 +0000 UTC m=+1264707.487847325: ☑️ agreed by YangKeao.

@ti-chi-bot ti-chi-bot Bot merged commit bd3f040 into pingcap:release-8.5-20260116-v8.5.5 Jan 29, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants