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

br: disk space check follow up #54596

Merged
merged 8 commits into from
Jul 23, 2024
Merged

br: disk space check follow up #54596

merged 8 commits into from
Jul 23, 2024

Conversation

RidRisR
Copy link
Contributor

@RidRisR RidRisR commented Jul 12, 2024

What problem does this PR solve?

Issue Number: ref #54316, #54470

Problem Summary:

What changed and how does it work?

Now, the preserve rate of tiflash is set 1.3
Add more log and normalized errors
Fix the error that TiFlashReplicas is not set

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.

Now, the preserve rate of tiflash is set 1.3
Add more log and normalized errors
Fix the error that `TiFlashReplicas` is not se

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 12, 2024
Copy link

tiprow bot commented Jul 12, 2024

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

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.

Project coverage is 56.6835%. Comparing base (60cc666) to head (79b798a).
Report is 8 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54596         +/-   ##
=================================================
- Coverage   72.7687%   56.6835%   -16.0852%     
=================================================
  Files          1555       1680        +125     
  Lines        437788     612560     +174772     
=================================================
+ Hits         318573     347221      +28648     
- Misses        99617     241633     +142016     
- Partials      19598      23706       +4108     
Flag Coverage Δ
integration 38.5397% <56.5217%> (?)
unit 71.9487% <0.0000%> (+0.1649%) ⬆️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 62.9109% <54.1666%> (+17.0496%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 12, 2024
@RidRisR RidRisR changed the title br: preserve more space for tiflash br: preserve space for tiflash follow up Jul 12, 2024
@RidRisR RidRisR changed the title br: preserve space for tiflash follow up br: disk space check follow up Jul 12, 2024
Copy link
Contributor

@Tristan1900 Tristan1900 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the change!

if storeCnt == 0 {
return 0
}
var totalSize uint64 = 0
if replicaCnt > storeCnt {
replicaCnt = storeCnt
Copy link
Contributor

Choose a reason for hiding this comment

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

@3pointer just to double check, do we have topology constraint that makes sure no more than 1 replica from the same resign placed on the same store?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, our raft implementation make this constraint

@@ -1240,37 +1240,41 @@ func getStores(ctx context.Context, mgr *conn.Mgr) (stores *http.StoresInfo, err
return stores, nil
}

func EstimateTikvUsage(files []*backuppb.File, maxReplica uint64, storeCnt int) uint64 {
func EstimateTikvUsage(files []*backuppb.File, replicaCnt uint64, storeCnt uint64) uint64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, a more common name could be replicationFactor or rf

Copy link

ti-chi-bot bot commented Jul 15, 2024

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

In response to this:

LGTM, thanks for the change!

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 approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 16, 2024
@RidRisR
Copy link
Contributor Author

RidRisR commented Jul 19, 2024

/test pull-br-integration-test

@RidRisR
Copy link
Contributor Author

RidRisR commented Jul 19, 2024

/test check-dev2

@RidRisR
Copy link
Contributor Author

RidRisR commented Jul 19, 2024

/test unit-test

Copy link

tiprow bot commented Jul 19, 2024

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

In response to this:

/test pull-br-integration-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-sigs/prow repository.

Copy link

tiprow bot commented Jul 19, 2024

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

In response to this:

/test check-dev2

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.

Copy link

tiprow bot commented Jul 19, 2024

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

Copy link

ti-chi-bot bot commented Jul 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leavrth, Tristan1900, 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 Jul 22, 2024
Copy link

ti-chi-bot bot commented Jul 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-16 06:04:06.543141546 +0000 UTC m=+333868.534083017: ☑️ agreed by YuJuncen.
  • 2024-07-22 07:52:15.066592466 +0000 UTC m=+858757.057533936: ☑️ agreed by Leavrth.

Copy link

tiprow bot commented Jul 22, 2024

@RidRisR: 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 c679524 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.

@RidRisR
Copy link
Contributor Author

RidRisR commented Jul 22, 2024

/test fast_test_tiprow

Copy link

ti-chi-bot bot commented Jul 22, 2024

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

Copy link

tiprow bot commented Jul 22, 2024

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

@RidRisR
Copy link
Contributor Author

RidRisR commented Jul 23, 2024

/test pull-br-integration-test

Copy link

tiprow bot commented Jul 23, 2024

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

In response to this:

/test pull-br-integration-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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit d662428 into pingcap:master Jul 23, 2024
26 checks passed
@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. and removed needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Jul 29, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants