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

ctl: clone tls config to avoid reusing connection #7740

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jan 20, 2024

What problem does this PR solve?

Issue Number: Close #7739

What is changed and how does it work?

  • There is a read goroutine inside http transport that detects the closure of the socket. When another request is made before the readLoop actually detects the closure, the socket closes and an EOF is read.
  • When they have the same tls they will shared connection
  • release 7.6 does update member at startup.
  • Since get stores are slow, update member is done when the request is sent and not yet returned.
  • Then the member returns faster and sends the request to readloop to read the return and then closes the socket, and stores encounters an eof.

img_v3_0278_13250d7e-4d0e-4f82-847c-1e771ccf671g

can check error log
update member
img_v3_0278_57ae34aa-87b1-42c5-bcde-37e5eb5f467g
store url
img_v3_0278_33deb940-1b00-4d3f-aa8d-ad580064d01g
they are using URL in the same time
img_v3_0278_95c0ef3f-a3ad-4291-9df9-dbce55d5f93g
img_v3_0278_b1d54304-3c6b-4b8b-bad6-640bf11e197g

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

ctl: clone tls config to avoid reusing connection

Signed-off-by: husharp <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Jan 20, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • lhy1024

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 20, 2024
@ti-chi-bot ti-chi-bot bot requested review from HunDunDM and rleungx January 20, 2024 05:32
@HuSharp HuSharp requested review from JmPotato and lhy1024 and removed request for HunDunDM and rleungx January 20, 2024 05:33
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 20, 2024
@HuSharp
Copy link
Member Author

HuSharp commented Jan 20, 2024

/check-issue-triage-complete

Signed-off-by: husharp <[email protected]>
Copy link

codecov bot commented Jan 20, 2024

Codecov Report

Merging #7740 (d1285fa) into master (649cc8a) will increase coverage by 0.12%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7740      +/-   ##
==========================================
+ Coverage   73.68%   73.80%   +0.12%     
==========================================
  Files         429      429              
  Lines       47591    47591              
==========================================
+ Hits        35068    35126      +58     
+ Misses       9520     9472      -48     
+ Partials     3003     2993      -10     
Flag Coverage Δ
unittests 73.80% <ø> (+0.12%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 20, 2024
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 22, 2024
@JmPotato
Copy link
Member

/merge

Copy link
Contributor

ti-chi-bot bot commented Jan 22, 2024

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Jan 22, 2024

This pull request has been accepted and is ready to merge.

Commit hash: d1285fa

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 22, 2024
@ti-chi-bot ti-chi-bot bot merged commit fb6606a into tikv:master Jan 22, 2024
25 of 26 checks passed
@HuSharp HuSharp deleted the add_pdctl_tls_test branch January 22, 2024 01:32
@ti-chi-bot
Copy link
Member

/cherry-pick release-7.6

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.6: #7741.

@ti-chi-bot
Copy link
Member

@ti-chi-bot: new pull request could not be created: failed to create pull request against tikv/pd#release-7.6 from head ti-chi-bot:cherry-pick-7740-to-release-7.6: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-7740-to-release-7.6."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-7.6

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 ti-community-infra/tichi repository.

ti-chi-bot bot pushed a commit that referenced this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.6 needs-cherry-pick-release-7.6 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pctl: release-7.6 ctl failed to get stores using tls
4 participants