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

make tiflash scale-in faster #8432

Merged
merged 9 commits into from
Nov 30, 2023
Merged

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Nov 29, 2023

What problem does this PR solve?

Issue Number: close #8433

Problem Summary:

  1. change ConfigReloader, this is to make it stop as soon as possible.
  2. For MetricsPrometheus, cancel without waiting

after the above change, the scale-in time changed from 9sec to 2.91sec
(check slow_stop.log.md VS stop_fast.md for deail)

Other:

  1. move lac and pipeline and FlashGrpcServerHolder position. Make them to destruct first.
  2. For AutoScaler, it use the following step
    1. send SIGTERM to let lac.stop() is called, so lac will do cleanup
    2. check if 3930 port is down. When it's down, AutoScaler can make sure lac.stop() is called
    3. AutoScaler send SIGKILL to tiflash.

What is changed and how it works?

Check List

Tests

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

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

None

Signed-off-by: guo-shaoge <shaoge1994@163.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Nov 29, 2023
@guo-shaoge guo-shaoge changed the title Add grpc CleanupBeforeScaleIn Add CleanupBeforeScaleIn grpc Nov 29, 2023
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge guo-shaoge changed the title Add CleanupBeforeScaleIn grpc make tiflash scalein faster Nov 29, 2023
@guo-shaoge guo-shaoge changed the title make tiflash scalein faster make tiflash scale-in faster Nov 29, 2023
@guo-shaoge
Copy link
Contributor Author

/run-all-tests

Signed-off-by: guo-shaoge <shaoge1994@163.com>
@guo-shaoge
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@SeaRise SeaRise left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@windtalker windtalker 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 the lgtm label Nov 30, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, windtalker

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 Nov 30, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-30 05:50:37.950357052 +0000 UTC m=+1074666.615583244: ☑️ agreed by SeaRise.
  • 2023-11-30 05:57:42.538453832 +0000 UTC m=+1075091.203680027: ☑️ agreed by windtalker.

Copy link
Contributor

ti-chi-bot bot commented Nov 30, 2023

@guo-shaoge: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

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.

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 ti-chi-bot bot merged commit e5eaf31 into pingcap:master Nov 30, 2023
6 checks passed
@JaySon-Huang JaySon-Huang deleted the cleanup_bef_scalein branch December 1, 2023 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none 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.

tiflash scale in is slow
3 participants