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: backup/restore statistic data in the partition dimension #49628

Merged
merged 17 commits into from
Jan 8, 2024

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Dec 20, 2023

What problem does this PR solve?

Issue Number: close #49627

Problem Summary:
oom when backup/restore the statistic if there are many partitions of a table

What changed and how does it work?

backup/restore statistic data in the partition dimension

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

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed 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. and removed do-not-merge/needs-triage-completed labels Dec 20, 2023
@@ -0,0 +1,75 @@
// Copyright 2023 PingCAP, Inc.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

directly move code from utils/schema.go.

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
@Leavrth
Copy link
Contributor Author

Leavrth commented Dec 27, 2023

/test pull-br-integration-test

Copy link

tiprow bot commented Dec 27, 2023

@Leavrth: 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/test-infra repository.

Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Merging #49628 (a1aed1c) into master (5cc32b6) will decrease coverage by 11.9737%.
Report is 8 commits behind head on master.
The diff coverage is 70.9333%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #49628         +/-   ##
=================================================
- Coverage   79.3020%   67.3283%   -11.9737%     
=================================================
  Files          2447       2561        +114     
  Lines        673965     841957     +167992     
=================================================
+ Hits         534468     566876      +32408     
- Misses       118116     251297     +133181     
- Partials      21381      23784       +2403     
Flag Coverage Δ
integration 36.7097% <19.3415%> (?)
unit 79.3537% <68.5333%> (+0.0517%) ⬆️

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

Components Coverage Δ
dumpling 73.6130% <ø> (ø)
parser ∅ <ø> (∅)
br 71.7469% <70.9333%> (+3.4102%) ⬆️

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Thanks!

pkg/statistics/handle/storage/stats_read_writer.go Outdated Show resolved Hide resolved
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Jan 8, 2024

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

Signed-off-by: Leavrth <jianjun.liao@outlook.com>
br/pkg/metautil/load.go Outdated Show resolved Hide resolved
br/pkg/metautil/statsfile.go Show resolved Hide resolved
br/pkg/metautil/statsfile.go Outdated Show resolved Hide resolved
Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

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

rest LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 8, 2024
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
Copy link

ti-chi-bot bot commented Jan 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, BornChanger

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 Jan 8, 2024
Copy link

ti-chi-bot bot commented Jan 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-08 09:09:35.186862858 +0000 UTC m=+261564.771116544: ☑️ agreed by 3pointer.
  • 2024-01-08 09:45:37.025725729 +0000 UTC m=+263726.609979411: ☑️ agreed by BornChanger.

@Leavrth
Copy link
Contributor Author

Leavrth commented Jan 8, 2024

/retest

Copy link

tiprow bot commented Jan 8, 2024

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

@Leavrth
Copy link
Contributor Author

Leavrth commented Jan 8, 2024

/retest

Copy link

tiprow bot commented Jan 8, 2024

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

@Leavrth
Copy link
Contributor Author

Leavrth commented Jan 8, 2024

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jan 8, 2024
Copy link

ti-chi-bot bot commented Jan 8, 2024

@Leavrth: 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
pull-br-integration-test 6c94432 link false /test pull-br-integration-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.

@wuhuizuo wuhuizuo added the priority/P0 The issue has P0 priority. label Jan 8, 2024
@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Jan 8, 2024

@Leavrth: 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
tiprow_fast_test a1aed1c link true /test tiprow_fast_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 078aeb2 into pingcap:master Jan 8, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. priority/P0 The issue has P0 priority. 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.

oom when backup/restore the statistic if there are many partitions of a table
5 participants