tidb icon indicating copy to clipboard operation
tidb copied to clipboard

*: Refactor runaway related code

Open HuSharp opened this issue 1 year ago • 39 comments

What problem does this PR solve?

Refactor runaway related code

  1. Take the concept of the syncer out of the domain and put it into the manager, the domain only interacts with the manager.
  2. Refine runaway code in domain/runaway, e.g. put loops in manager instead of domain
  3. Moved runaway code to pkg/resourcegroup (can move the ResourceGroup-related code later).
  4. table operations of runaway have been put together with the record, and are called by manager/checker/syncer.

Issue Number: Ref #54434

Problem Summary:

What changed and how does it work?

Check List

Tests

  • [x] Unit test
  • [x] Integration test
  • [x] Manual test (add detailed scripts or steps below)
  • [ ] No need to test
    • [ ] I checked and no code files have been changed.

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

HuSharp avatar Aug 06 '24 02:08 HuSharp

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

ti-chi-bot[bot] avatar Aug 06 '24 02:08 ti-chi-bot[bot]

Hi @HuSharp. 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-sigs/prow repository.

tiprow[bot] avatar Aug 06 '24 02:08 tiprow[bot]

/test all

HuSharp avatar Aug 06 '24 02:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 06 '24 02:08 tiprow[bot]

/test all

HuSharp avatar Aug 07 '24 08:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 07 '24 08:08 tiprow[bot]

/test all

HuSharp avatar Aug 08 '24 06:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 08 '24 06:08 tiprow[bot]

/test all

HuSharp avatar Aug 08 '24 10:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 08 '24 10:08 tiprow[bot]

/test all

HuSharp avatar Aug 09 '24 02:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 09 '24 02:08 tiprow[bot]

/test all

HuSharp avatar Aug 09 '24 07:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 09 '24 07:08 tiprow[bot]

/test all

HuSharp avatar Aug 09 '24 08:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 09 '24 08:08 tiprow[bot]

Codecov Report

Attention: Patch coverage is 79.54286% with 179 lines in your changes missing coverage. Please review.

Project coverage is 58.2631%. Comparing base (c74a233) to head (dbe7d12). Report is 106 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #55202         +/-   ##
=================================================
- Coverage   74.9176%   58.2631%   -16.6545%     
=================================================
  Files          1576       1743        +167     
  Lines        365707     646216     +280509     
=================================================
+ Hits         273979     376506     +102527     
- Misses        71965     244954     +172989     
- Partials      19763      24756       +4993     
Flag Coverage Δ
integration 40.4574% <21.9428%> (?)
unit 73.0834% <79.5428%> (-0.8247%) :arrow_down:

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) :arrow_down:
parser ∅ <ø> (∅)
br 60.1983% <ø> (+12.3799%) :arrow_up:

codecov[bot] avatar Aug 09 '24 08:08 codecov[bot]

/test all

HuSharp avatar Aug 09 '24 08:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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-sigs/prow repository.

tiprow[bot] avatar Aug 09 '24 08:08 tiprow[bot]

@glorv @JmPotato @tangenta PTAL, thx~

HuSharp avatar Aug 19 '24 08:08 HuSharp

[LGTM Timeline notifier]

Timeline:

  • 2024-08-20 07:24:06.032861383 +0000 UTC m=+250241.167311505: :ballot_box_with_check: agreed by glorv.
  • 2024-08-22 08:32:10.676238788 +0000 UTC m=+427125.810688908: :ballot_box_with_check: agreed by tangenta.

ti-chi-bot[bot] avatar Aug 22 '24 08:08 ti-chi-bot[bot]

@XuHuaiyu PTAL, thx~

HuSharp avatar Aug 22 '24 08:08 HuSharp

/retest-required

nolouch avatar Aug 22 '24 10:08 nolouch

/retest-required

nolouch avatar Aug 27 '24 06:08 nolouch

/retest-required

HuSharp avatar Aug 27 '24 10:08 HuSharp

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest-required

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-sigs/prow repository.

tiprow[bot] avatar Aug 27 '24 10:08 tiprow[bot]

/test fast_test_tiprow

HuSharp avatar Aug 27 '24 10:08 HuSharp

@HuSharp: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_br_integration_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test fast_test_tiprow

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.

ti-chi-bot[bot] avatar Aug 27 '24 10:08 ti-chi-bot[bot]

@HuSharp: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test fast_test_tiprow

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-sigs/prow repository.

tiprow[bot] avatar Aug 27 '24 10:08 tiprow[bot]

/ok-to-test

glorv avatar Aug 27 '24 13:08 glorv