Skip to content

store: update client-go to fix batch response cancellation race - #71679

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:release-nextgen-20251011from
lcwangchao:codex/update-client-go-nextgen-20251011
Sep 29, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
pingcap:release-nextgen-20251011from
lcwangchao:codex/update-client-go-nextgen-20251011

Conversation

@lcwangchao

@lcwangchao lcwangchao commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #71677

Problem Summary:

The pinned client-go version predates the fix for a cancellation race that can block RunLoop.Append and a TiKV BatchCommands receive loop. See tikv/client-go#2033.

What changed and how does it work?

Update client-go from e91097b8e3f9 to 5f06ec672bb6, the latest release-nextgen-20251011 commit, which contains the backport of tikv/client-go#2034 (tikv/client-go#2094). Regenerate the Bazel dependency metadata and module checksums.

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.

Validation: make bazel_prepare; go mod verify. The client-go backport includes its own regression tests.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

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

Fix a potential hang of TiKV batch requests after canceling a SQL query.

Summary by CodeRabbit

  • Maintenance
    • Updated the underlying TiKV service integration to a newer revision. No user-facing behavior changes are included in this release.

@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. do-not-merge/cherry-pick-not-approved size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 682d4e01-374f-4b8c-9645-2e50bbb45fd9

📥 Commits

Reviewing files that changed from the base of the PR and between 97d56e5 and f98e54c.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • DEPS.bzl
  • go.mod

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The github.com/tikv/client-go/v2 dependency now uses revision v2.0.8-0.20260929035212-5f06ec672bb6. The Go module and Bazel declarations reference this revision.

Changes

client-go revision update

Layer / File(s) Summary
Update client-go revision
go.mod, DEPS.bzl
Both dependency declarations use the September 2026 revision. DEPS.bzl also updates the checksum.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: cfzjywxk, wfxr, you06

Merge Risk: ⚪ Minimal · up to f98e5

The dependency update is localized, and no concrete regression is evidenced. The change appears ready to merge.

Architecture Summary

Architecture risk: 🔵 Low · up to f98e5

The change affects 2 systems.

Changed systems: DEPS.bzl, go.mod

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — DEPS.bzl (service) was modified; 1 changed file maps to changed impact.
  • observed — go.mod (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in DEPS.bzl: Updated the github.com/tikv/client-go/v2 dependency version and checksum.
  • observed — Modified behavior in go.mod: Updates the required github.com/tikv/client-go/v2 version from v2.0.8-0.20260514041053-e91097b8e3f9 to v2.0.8-0.20260929035212-5f06ec672bb6.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning PR #71679 updates github.com/tikv/client-go/v2 in go.mod and DEPS.bzl to 5f06ec672bb6, which addresses the dependency-update objective in #71677. The available evidence does not show TiDB-leve… Add the required TiDB regression test for the cancellation race and the follow-up request. Add investigation documentation with the batchRecvLoop -> ... -> RunLoop.Append [chan send] evidence and the comparison with transport and TiKV-sid…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the store package scope, the client-go update, and the cancellation-race fix.
Description check ✅ Passed The description follows the repository template. It includes the issue reference, problem summary, implementation details, validation steps, checklist selections, side-effect and documentation section…
Out of Scope Changes check ✅ Passed The changed files update the pinned client-go dependency and its Bazel dependency declaration. These changes directly support the dependency-update objective in #71677. No unrelated change is shown in…
Full details: Linked Issues check

Explanation

PR #71679 updates github.com/tikv/client-go/v2 in go.mod and DEPS.bzl to 5f06ec672bb6, which addresses the dependency-update objective in #71677. The available evidence does not show TiDB-level regression coverage for cancellation during multi-Region async BatchGet followed by a request on the same stream. The available evidence also does not show documentation that distinguishes the stalled receive loop from transport or TiKV-side timeouts.

Resolution

Add the required TiDB regression test for the cancellation race and the follow-up request. Add investigation documentation with the batchRecvLoop -> ... -> RunLoop.Append [chan send] evidence and the comparison with transport and TiKV-side timeout symptoms.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 golangci-lint (2.13.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: context deadline exceeded"
level=error msg="Timeout exceeded: try increasing it by passing --timeout option"


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

A rabbit checks the version line,
Then hops through modules, neat and fine.
The checksum follows close behind,
One revision now aligned.
Across the build files, ears stand tall,
A tidy update for them all.

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

@ti-chi-bot

ti-chi-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

@wfxr: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

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.

@lcwangchao

Copy link
Copy Markdown
Collaborator Author

/retest

@lcwangchao

Copy link
Copy Markdown
Collaborator Author

/retest

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 29, 2026
@ti-chi-bot ti-chi-bot Bot added cherry-pick-approved Cherry pick PR approved by release team. lgtm and removed do-not-merge/cherry-pick-not-approved labels Sep 29, 2026
@ti-chi-bot

ti-chi-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, wfxr, you06

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 approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 29, 2026
@ti-chi-bot

ti-chi-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-09-29 08:39:27.889432781 +0000 UTC m=+698893.114653889: ☑️ agreed by you06.
  • 2026-09-29 09:03:38.131005415 +0000 UTC m=+700343.356226512: ☑️ agreed by cfzjywxk.

Signed-off-by: Chao Wang <cclcwangchao@hotmail.com>
@lcwangchao
lcwangchao force-pushed the codex/update-client-go-nextgen-20251011 branch from 97d56e5 to f98e54c Compare September 29, 2026 12:37
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-nextgen-20251011@1f111cd). Learn more about missing BASE report.

Additional details and impacted files
@@                      Coverage Diff                      @@
##             release-nextgen-20251011     #71679   +/-   ##
=============================================================
  Coverage                            ?   71.8291%           
=============================================================
  Files                               ?       1835           
  Lines                               ?     494004           
  Branches                            ?          0           
=============================================================
  Hits                                ?     354839           
  Misses                              ?     115751           
  Partials                            ?      23414           
Flag Coverage Δ
unit 71.8291% <ø> (?)

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

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

@lcwangchao

Copy link
Copy Markdown
Collaborator Author

/retest

@ti-chi-bot
ti-chi-bot Bot merged commit 58325ec into pingcap:release-nextgen-20251011 Sep 29, 2026
18 checks passed
@lcwangchao
lcwangchao deleted the codex/update-client-go-nextgen-20251011 branch September 29, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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