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

backup: add table-concurrency to control backup tableInfo stats and checksum. #48570

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

3pointer
Copy link
Contributor

@3pointer 3pointer commented Nov 14, 2023

What problem does this PR solve?

Issue Number: close #48571
Problem Summary:
checksum and backup stats does have impact on cluster. so public the parameter with table-concurrency. which means the concurrency of backup all table metas. including backup tableInfos/stats and checksum.

What is changed and how it works?

Public internal parameter to configuration.

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

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 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 14, 2023
Copy link

tiprow bot commented Nov 14, 2023

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.

Copy link

@benmaoer benmaoer 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

ti-chi-bot bot commented Nov 15, 2023

@benmaoer: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

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.

@3pointer 3pointer marked this pull request as ready for review November 15, 2023 07:12
@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 Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Merging #48570 (bc64996) into master (50237bd) will increase coverage by 1.3816%.
Report is 27 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48570        +/-   ##
================================================
+ Coverage   71.4258%   72.8074%   +1.3816%     
================================================
  Files          1403       1430        +27     
  Lines        407207     414191      +6984     
================================================
+ Hits         290851     301562     +10711     
+ Misses        96405      93666      -2739     
+ Partials      19951      18963       -988     
Flag Coverage Δ
integration 43.6074% <0.0000%> (?)
unit 71.3668% <ø> (-0.0590%) ⬇️

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

Components Coverage Δ
dumpling 53.9874% <ø> (ø)
parser ∅ <ø> (∅)
br 48.8190% <0.0000%> (-4.2723%) ⬇️

br/pkg/task/backup.go Outdated Show resolved Hide resolved
@@ -718,7 +726,7 @@ func RunBackup(c context.Context, g glue.Glue, cmdName string, cfg *BackupConfig
}
}
updateCh = g.StartProgress(ctx, "Checksum", checksumProgress, !cfg.LogProgress)
schemasConcurrency := uint(min(backup.DefaultSchemaConcurrency, schemas.Len()))
Copy link
Member

Choose a reason for hiding this comment

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

backup.DefaultSchemaConcurrency can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it used as initial value for the new config

Copy link
Member

Choose a reason for hiding this comment

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

Isn't a default value of 64 a bit too high? Should the default setting be more conservative?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

two reasons to keep it 64

  1. to keep the compatibility.
  2. to keep checksum performance.

3pointer and others added 3 commits November 16, 2023 13:41
Co-authored-by: BornChanger <97348524+BornChanger@users.noreply.github.com>
@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Nov 16, 2023

@BornChanger: 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.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 16, 2023
@BornChanger
Copy link
Contributor

/label affects-7.5

@3pointer
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Nov 16, 2023

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

In response to this:

/test unit-test

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.

Copy link

ti-chi-bot bot commented Nov 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmaoer, BornChanger, 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 Nov 16, 2023
Copy link

ti-chi-bot bot commented Nov 16, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-16 11:17:39.284510912 +0000 UTC m=+4334256.871621059: ☑️ agreed by BornChanger.
  • 2023-11-16 15:28:37.164581514 +0000 UTC m=+4349314.751691644: ☑️ agreed by YuJuncen.

@ti-chi-bot ti-chi-bot bot merged commit 07057bd into pingcap:master Nov 16, 2023
16 of 20 checks passed
Copy link

ti-chi-bot bot commented Nov 16, 2023

@BornChanger: The label(s) needs-cherry-pick-7.5 cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.3, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, affects-5.3, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, may-affects-5.3, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5.

In response to this:

/label needs-cherry-pick-7.5

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.

1 similar comment
Copy link

ti-chi-bot bot commented Nov 16, 2023

@BornChanger: The label(s) needs-cherry-pick-7.5 cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.3, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, affects-5.3, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, may-affects-5.3, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5.

In response to this:

/label needs-cherry-pick-7.5

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.

@BornChanger
Copy link
Contributor

/label needs-cherry-pick-release-7.5

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 16, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #48652.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Nov 16, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make user control the table meta concurrency during backup
6 participants