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

restore: auto tune concurrency configuration when using new mode restoration #50877

Merged
merged 11 commits into from
Feb 29, 2024

Conversation

3pointer
Copy link
Contributor

@3pointer 3pointer commented Feb 1, 2024

What problem does this PR solve?

Issue Number: ref #50701
Problem Summary:
make concurrency easy to use for user.

What changed and how does it work?

based on tikv config import.num-threads to determine the concurrency.

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

Copy link

ti-chi-bot bot commented Feb 1, 2024

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 ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 1, 2024
Copy link

tiprow bot commented Feb 1, 2024

Hi @3pointer. 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.

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 5, 2024
@3pointer 3pointer marked this pull request as ready for review February 5, 2024 09:48
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 5, 2024
br/pkg/conn/conn.go Show resolved Hide resolved
br/pkg/conn/conn.go Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 6, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 7, 2024
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Merging #50877 (c04e0ad) into master (c852515) will decrease coverage by 12.3570%.
Report is 222 commits behind head on master.
The diff coverage is 66.6666%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #50877         +/-   ##
=================================================
- Coverage   70.3605%   58.0036%   -12.3570%     
=================================================
  Files          1456       1581        +125     
  Lines        420835     619732     +198897     
=================================================
+ Hits         296102     359467      +63365     
- Misses       104393     236833     +132440     
- Partials      20340      23432       +3092     
Flag Coverage Δ
integration 36.6206% <59.2592%> (?)
unit 70.3151% <50.0000%> (-0.0293%) ⬇️

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

Components Coverage Δ
dumpling 54.0514% <ø> (+0.0245%) ⬆️
parser ∅ <ø> (∅)
br 57.6275% <66.6666%> (+7.0574%) ⬆️

@3pointer
Copy link
Contributor Author

3pointer commented Feb 8, 2024

/retest

Copy link

tiprow bot commented Feb 8, 2024

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

In response to this:

/retest

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.

br/pkg/config/kv.go Outdated Show resolved Hide resolved
br/pkg/config/kv.go Outdated Show resolved Hide resolved
return c.Import.Threads, nil
}

func ParseMergeRegionSizeFromConfig(resp []byte) (uint64, uint64, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems this function is only called in conn package and doesn't rely on any item in config. Why not make it a private function in conn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to put all parse config logic into one pkg for future usage.

@@ -7,6 +7,7 @@ import (

"github.com/pingcap/errors"
"github.com/pingcap/log"
kvconfig "github.com/pingcap/tidb/br/pkg/config"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why rename it to kvconfig? It seems belongs to BR. Perhaps use pconfig as restore.go did.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think all logic belong to TiKV could use this name

br/pkg/task/restore.go Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leavrth, YuJuncen

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 Feb 29, 2024
Copy link

ti-chi-bot bot commented Feb 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-06 02:56:45.5668568 +0000 UTC m=+239131.133626683: ☑️ agreed by Leavrth.
  • 2024-02-29 03:23:32.026990738 +0000 UTC m=+1105100.774613850: ☑️ agreed by YuJuncen.

Copy link

tiprow bot commented Feb 29, 2024

@3pointer: The following tests 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 c04e0ad link true /test fast_test_tiprow
tidb_parser_test c04e0ad link true /test tidb_parser_test

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

@ti-chi-bot ti-chi-bot bot merged commit b6e955b into pingcap:master Feb 29, 2024
25 of 27 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-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants