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

dxf: merge loops in Run and RunStep of task executor #57944

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Dec 3, 2024

What problem does this PR solve?

Issue Number: ref #57497

Problem Summary:

What changed and how does it work?

  • when detecting whether params are modified, we need to make sure new subtask started after we finished modify can use the latest param, especially task concurrency which need to alloc slots from slot manager, and it might require recreating the task executor, if we want avoid create/init step executor when we need recreate the task executor, we have to handle param modify detection on both loop, so we merge them to avoid handle them twice.
  • remove HasSubtasksInStates which is not needed now, add GetStep to step executor

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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.

None

refresh task

remove unused

change

change
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 3, 2024
Copy link

tiprow bot commented Dec 3, 2024

Hi @D3Hunter. 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.

@@ -459,78 +692,10 @@ func TestCheckBalanceSubtask(t *testing.T) {
})
}

func TestExecutorErrHandling(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

some are duplicate with TestExecutorRun, some moved to TestExecutorRun

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 97.88732% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.4626%. Comparing base (d021648) to head (81e53ae).
Report is 23 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57944        +/-   ##
================================================
+ Coverage   73.1421%   73.4626%   +0.3205%     
================================================
  Files          1671       1675         +4     
  Lines        460703     467586      +6883     
================================================
+ Hits         336968     343501      +6533     
- Misses       102998     103327       +329     
- Partials      20737      20758        +21     
Flag Coverage Δ
integration 43.9341% <0.0000%> (?)
unit 72.2825% <97.8873%> (+0.0079%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 46.0344% <ø> (+0.0451%) ⬆️

@D3Hunter D3Hunter requested a review from lance6716 December 4, 2024 06:13
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Dec 4, 2024

@lance6716 3/4 changes are tests

@D3Hunter D3Hunter requested a review from tangenta December 6, 2024 02:43
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Dec 9, 2024

@lance6716

}

func (e *BaseTaskExecutor) cleanStepExecutor() {
if err2 := e.stepExec.Cleanup(e.ctx); err2 != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

check e.stepExec and Cleanup is nil? Not sure it will happen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e.stepExec != nil is checked at caller

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 9, 2024
Copy link

ti-chi-bot bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 9, 2024
Copy link

ti-chi-bot bot commented Dec 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-09 04:10:51.732925833 +0000 UTC m=+238841.821728375: ☑️ agreed by lance6716.
  • 2024-12-09 06:23:14.624697734 +0000 UTC m=+246784.713500277: ☑️ agreed by wjhuang2016.

Copy link

tiprow bot commented Dec 9, 2024

@D3Hunter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow 81e53ae link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot merged commit 71e70af into pingcap:master Dec 9, 2024
23 of 24 checks passed
@D3Hunter D3Hunter deleted the dxf-merge-te-loop-2 branch December 9, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants