Skip to content

Conversation

@rleungx
Copy link
Member

@rleungx rleungx commented Dec 22, 2025

What problem does this PR solve?

Issue Number: ref #7969

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 22, 2025
}

// MustNewGrpcClient must create a new PD grpc client.
func MustNewGrpcClient(re *require.Assertions, addr string) pdpb.PDClient {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding a new function as close for pdClient, it will close this conn?

Copy link
Member Author

Choose a reason for hiding this comment

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

Here we just create a gRPC client instead of pd client.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx requested review from bufferflies and lhy1024 January 6, 2026 07:29
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.45%. Comparing base (205352f) to head (15f4d47).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10102      +/-   ##
==========================================
+ Coverage   78.38%   78.45%   +0.07%     
==========================================
  Files         518      518              
  Lines       69476    69475       -1     
==========================================
+ Hits        54456    54510      +54     
+ Misses      11066    11034      -32     
+ Partials     3954     3931      -23     
Flag Coverage Δ
unittests 78.45% <100.00%> (+0.07%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

_, err = stream.Recv()
if err != nil {
isCanceled := strings.Contains(err.Error(), "context canceled")
isEOF := strings.Contains(err.Error(), "EOF")
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove EOF?

Copy link
Member Author

Choose a reason for hiding this comment

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

no eof error anymore

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 6, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bufferflies, lhy1024

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 [bufferflies,lhy1024]

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 7, 2026
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 7, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-06 10:48:16.614285657 +0000 UTC m=+699252.432594090: ☑️ agreed by lhy1024.
  • 2026-01-07 04:21:30.494337312 +0000 UTC m=+762446.312645744: ☑️ agreed by bufferflies.

@rleungx
Copy link
Member Author

rleungx commented Jan 7, 2026

/retest

@ti-chi-bot ti-chi-bot bot merged commit b68a63c into tikv:master Jan 7, 2026
39 of 42 checks passed
@rleungx rleungx deleted the close-conn-1 branch January 7, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants