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: introduce the connection ctx manager #8940

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JmPotato
Copy link
Member

What problem does this PR solve?

Issue Number: ref #8690.

What is changed and how does it work?

Previously, we used a `sync.Map` as a medium to propagate connection ctx updates between
the dispatcher and TSO client, which introduced a lot of redundant parameter passing and
made the logic less intuitive. This PR implements the same functionality using a common
connection ctx manager to simplify and reuse related code.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added the component/client Client logic. label Dec 19, 2024
@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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 19, 2024
@JmPotato JmPotato force-pushed the reduce_member_update branch from 3a92119 to 9a6c85f Compare December 19, 2024 15:09
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 89.71429% with 18 lines in your changes missing coverage. Please review.

Project coverage is 76.27%. Comparing base (95bfbe6) to head (192f36e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8940      +/-   ##
==========================================
+ Coverage   76.25%   76.27%   +0.01%     
==========================================
  Files         463      464       +1     
  Lines       70458    70500      +42     
==========================================
+ Hits        53731    53773      +42     
- Misses      13369    13375       +6     
+ Partials     3358     3352       -6     
Flag Coverage Δ
unittests 76.27% <89.71%> (+0.01%) ⬆️

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

@JmPotato JmPotato force-pushed the reduce_member_update branch from 9a6c85f to f39ad8c Compare December 23, 2024 07:46
@JmPotato JmPotato requested review from okJiang and rleungx December 23, 2024 07:48
@JmPotato
Copy link
Member Author

@rleungx @okJiang PTAL, thx!

client/clients/tso/client.go Outdated Show resolved Hide resolved
client/pkg/connectionctx/manager.go Show resolved Hide resolved
@JmPotato JmPotato requested a review from rleungx December 24, 2024 10:42
@JmPotato JmPotato force-pushed the reduce_member_update branch from 0eb408a to 192f36e Compare December 25, 2024 08:31
Copy link
Contributor

ti-chi-bot bot commented Dec 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rleungx

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

Copy link
Contributor

ti-chi-bot bot commented Dec 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-25 08:32:48.534419925 +0000 UTC m=+1636958.623222453: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/client Client logic. dco-signoff: yes Indicates the PR's author has signed the dco. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants