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

*: fix grpc client leak bug for AUTO_ID_CACHE=1 tables #48870 #48903

Merged
merged 5 commits into from
Nov 27, 2023

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Cherry-pick #48870 to hotfix for 7.1.2

Issue Number: close #48869

Problem Summary:

What changed and how does it work?

Prior to this commit, each auto id allocator has it's own autoid client (a grpc connection inside), so if we have 60K tables there would be 60K tcp connections ...

After the fix, the autoid client is moved to domain so there should be only one autoid client instance. All the autoid allocator share this instance now.

Check List

Tests

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

See the reproduce steps in the issue.
The test check tcp connection counts, it's harder to do that in unit test

  • No need to test
    • I checked and no code files have been changed.

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 grpc client leak bug for AUTO_ID_CACHE=1 tables, this bug is more likely to happen when there are lots of tables, and the error message is "connect: cannot assign requested address"

@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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 26, 2023
Copy link

tiprow bot commented Nov 26, 2023

Hi @tiancaiamao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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/test-infra repository.

tangenta
tangenta previously approved these changes Nov 27, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 27, 2023
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-7.1-20231106-v7.1.2@a062330). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             release-7.1-20231106-v7.1.2     #48903   +/-   ##
================================================================
  Coverage                               ?   73.4352%           
================================================================
  Files                                  ?       1206           
  Lines                                  ?     377595           
  Branches                               ?          0           
================================================================
  Hits                                   ?     277288           
  Misses                                 ?      82617           
  Partials                               ?      17690           

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 27, 2023
Copy link

ti-chi-bot bot commented Nov 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-27 02:55:04.339168548 +0000 UTC m=+804933.004394744: ☑️ agreed by tangenta.
  • 2023-11-27 06:12:13.098544282 +0000 UTC m=+816761.763770477: ☑️ agreed by bb7133.

@bb7133
Copy link
Member

bb7133 commented Nov 27, 2023

/merge

Copy link

ti-chi-bot bot commented Nov 27, 2023

@bb7133: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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

ti-chi-bot bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, lance6716

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 merged commit 2a25285 into pingcap:release-7.1-20231106-v7.1.2 Nov 27, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants