Skip to content

*: bump client-go to include the busy-leader probe fix (#2041) (#2044) - #70370

Open
ekexium wants to merge 1 commit into
pingcap:release-8.5from
ekexium:client-go-bump-2041
Open

*: bump client-go to include the busy-leader probe fix (#2041) (#2044)#70370
ekexium wants to merge 1 commit into
pingcap:release-8.5from
ekexium:client-go-bump-2041

Conversation

@ekexium

@ekexium ekexium commented Aug 6, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Bump github.com/tikv/client-go/v2 from v2.0.8-0.20260803075849-c3b50791b9fb to v2.0.8-0.20260806041825-494edbd79be9 on tidb-8.5, on top of the previous bump in #70303.

This brings the busy-leader probe fix (tikv/client-go#2041, cherry-picked as tikv/client-go#2044) which addresses tikv/client-go#2028: when a TiKV store's unified read pool is wedged, leader reads are rejected with ServerIsBusy(EstimatedWaitMs=0) at the pool entrance, so the request never reaches the raft layer and no NotLeader error is returned even if PD has already moved the leader away. The client then retries the stale cached leader indefinitely. After 2 consecutive such rejections within one selector, the client now probes a follower once with unchanged leader-read semantics; the follower's NotLeader reply with the real leader hint heals the shared region cache.

What is changed and how it works?

  • go.mod / go.sum: client-go version bump (3 files, 5 lines changed total)
  • DEPS.bzl: bazel dependency entry for the new version

Go toolchain was already bumped to 1.25.12 by #70219 / #70303; no code changes needed.

Check List

Tests:

  • Unit test: go build ./... passes (only the pre-existing unrelated tools/patch-go / plugin/conn_ip_example noise)
  • Integration test (CI)

Release note

None

Summary by CodeRabbit

  • Chores
    • Updated the TiKV client dependency to a newer version.
    • Synchronized dependency metadata to ensure consistent builds.

Copilot AI lite review requested due to automatic review settings August 6, 2026 06:15
@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved labels Aug 6, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be LGTMed and approved by the reviewers firstly.
  2. For pull requests to TiDB-x branches, it must have no failed tests.
  3. AFTER it has lgtm and approved labels, please wait for the cherry-pick merging approval from triage owners.
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request updates github.com/tikv/client-go/v2 to a newer pseudo-version in go.mod and DEPS.bzl. The Bazel checksum is updated to match the new revision.

Changes

client-go dependency update

Layer / File(s) Summary
Dependency metadata alignment
go.mod, DEPS.bzl
The Go module and Bazel metadata now reference pseudo-version v2.0.8-0.20260806041825-494edbd79be9. The Bazel checksum is also updated.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: cfzjywxk, d3hunter

Poem

A rabbit checks the version line,
New client-go metadata aligns.
The checksum hops into its place,
Bazel follows at matching pace.
Two files updated, neat and bright—
Dependency paths now sit right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, implementation, testing, and release note, but it omits the required Issue Number line and side-effect and documentation sections. Add an Issue Number: close #... or ref #... line and complete the Side effects and Documentation sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the client-go dependency bump and the busy-leader probe fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates TiDB’s TiKV client dependency and aligns the repository’s Go toolchain to satisfy the updated client-go minimum Go requirement (release-8.5). This is primarily a dependency/toolchain maintenance change intended to pick up a client-go fix for “busy leader probe” behavior and related client improvements.

Changes:

  • Bump github.com/tikv/client-go/v2 to v2.0.8-0.20260806041825-494edbd79be9 in go.mod/go.sum.
  • Update Bazel dependency metadata for the new client-go version in DEPS.bzl.
  • Bump Go toolchain references from 1.25.10 to 1.25.12 across build and image definitions (Go module, Bazel SDK, Dockerfiles, and build images).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
WORKSPACE Updates Bazel go_download_sdk version to Go 1.25.12.
Makefile.common Updates GOTOOLCHAIN to go1.25.12 for local builds.
go.mod Bumps Go directive to 1.25.12 and updates client-go dependency version.
go.sum Updates checksums for the bumped client-go version.
DEPS.bzl Updates Bazel go_repository entry (strip prefix/sha256/URLs) for new client-go version.
Dockerfile Updates builder image to golang:1.25.12.
Dockerfile.enterprise Updates builder image to golang:1.25.12.
build/image/base Updates base image build ARG GOLANG_VERSION to 1.25.12.
build/image/parser_test Updates parser test image GOLANG_VERSION to 1.25.12.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…pingcap#2044)

Bump github.com/tikv/client-go/v2 from v2.0.8-0.20260803075849-c3b50791b9fb
to v2.0.8-0.20260806041825-494edbd79be9 on tidb-8.5, on top of the
previous bump in pingcap#70303. This brings:

- internal/locate: probe follower once when the cached leader keeps
  rejecting leader reads with ServerIsBusy(0) (pingcap#2041) (pingcap#2044): when a
  store's read pool is wedged, leader reads are rejected with
  ServerIsBusy(0) at the pool entrance so no NotLeader is returned even
  if PD has moved the leader away; after 2 such rejections the selector
  probes a follower once and heals the stale leader cache via the
  NotLeader hint (ref tikv/client-go#2028)

Signed-off-by: Ziqian Qin <eke@fastmail.com>
@ekexium
ekexium force-pushed the client-go-bump-2041 branch from 4d0d7f8 to a78bf6a Compare August 6, 2026 07:27
@ti-chi-bot ti-chi-bot Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@ekexium ekexium changed the title *: update client-go to include the busy-leader probe fix (#2041) (#2044) *: bump client-go to include the busy-leader probe fix (#2041) (#2044) Aug 6, 2026
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-8.5@73f2943). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #70370   +/-   ##
================================================
  Coverage               ?   55.1637%           
================================================
  Files                  ?       1852           
  Lines                  ?     666956           
  Branches               ?          0           
================================================
  Hits                   ?     367918           
  Misses                 ?     271629           
  Partials               ?      27409           
Flag Coverage Δ
integration 38.2301% <ø> (?)
unit 65.1032% <ø> (?)

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

Components Coverage Δ
dumpling 55.3108% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 54.8629% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 6, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, zyguan

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:

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 Aug 6, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-08-06 07:42:47.392346053 +0000 UTC m=+2686753.428441109: ☑️ agreed by cfzjywxk.
  • 2026-08-06 07:54:41.647893321 +0000 UTC m=+2687467.683988367: ☑️ agreed by zyguan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved do-not-merge/cherry-pick-not-approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants