Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: use defer for cancel #8520

Merged
merged 1 commit into from
Aug 13, 2024
Merged

client: use defer for cancel #8520

merged 1 commit into from
Aug 13, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Aug 13, 2024

What problem does this PR solve?

Issue Number: Ref #4399.

What is changed and how does it work?

Some functions may cancel the context twice. This PR uses defer to manage the cancellation of the context.

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 13, 2024
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.48%. Comparing base (3f32f54) to head (18346ad).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8520      +/-   ##
==========================================
+ Coverage   77.40%   77.48%   +0.07%     
==========================================
  Files         472      472              
  Lines       61821    61741      -80     
==========================================
- Hits        47854    47839      -15     
+ Misses      10400    10335      -65     
  Partials     3567     3567              
Flag Coverage Δ
unittests 77.48% <87.50%> (+0.07%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 13, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Aug 13, 2024
Copy link
Contributor

ti-chi-bot bot commented Aug 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

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 Aug 13, 2024
Copy link
Contributor

ti-chi-bot bot commented Aug 13, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-13 03:29:35.982518166 +0000 UTC m=+238660.685987810: ☑️ agreed by okJiang.
  • 2024-08-13 03:42:50.891329689 +0000 UTC m=+239455.594799329: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot bot merged commit 917f24a into tikv:master Aug 13, 2024
26 checks passed
@rleungx rleungx deleted the cancel branch August 13, 2024 03:54
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/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.

3 participants