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: Fix backupmeta division bug #37246

Merged
merged 5 commits into from Aug 31, 2022
Merged

Conversation

MoCuishle28
Copy link
Contributor

@MoCuishle28 MoCuishle28 commented Aug 19, 2022

Signed-off-by: zhanggaoming gaoming.zhang@pingcap.com

What problem does this PR solve?

Issue Number: close #37244

Problem Summary:
backupmeta is not divided as expected.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Manual Test

For testing, I modified MetaFileSize to 20 units.KiB. (i.e., Flush is executed when backupmeta is larger than 20 KiB.)
But in the committed code, MetaFileSize is still 128 * units.MiB.

MetaFileSize = 128 * units.MiB

Run br backup full -u '{IP}:{Port}' -s '{path}' --use-backupmeta-v2=true

Detail BR log in /tmp/br.log.2022-08-22T15.44.54+0800 
Full Backup <--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
Checksum <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2022/08/22 15:45:42.462 +08:00] [INFO] [collector.go:69] ["Full Backup success summary"] [total-ranges=264] [ranges-succeed=264] [ranges-failed=0] [backup-checksum=11.125195947s] [backup-fast-checksum=53.509755ms] [backup-total-ranges=89] [backup-total-regions=244] [total-take=48.402973686s] [BackupTS=435461631597346817] [total-kv=108954045] [total-kv-size=12.51GB] [average-speed=258.5MB/s] [backup-data-size(after-compressed)=4.843GB] [Size=4843046770]

Run du -sh * in backup dir

4.0K    backup.lock
4.0K    backupmeta
24K     backupmeta.datafile.000000001
24K     backupmeta.datafile.000000002
24K     backupmeta.datafile.000000003
4.0K    backupmeta.datafile.000000004
24K     backupmeta.schema.000000005
24K     backupmeta.schema.000000006
24K     backupmeta.schema.000000007
24K     backupmeta.schema.000000008
24K     backupmeta.schema.000000009
24K     backupmeta.schema.000000010
24K     backupmeta.schema.000000011
24K     backupmeta.schema.000000012
28K     backupmeta.schema.000000013
8.0K    backupmeta.schema.000000014

drop database

Run br restore full -u '{IP}:{Port}' -s '{path}'

Detail BR log in /tmp/br.log.2022-08-22T15.59.49+0800 
Full Restore <-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2022/08/22 16:00:39.523 +08:00] [INFO] [collector.go:69] ["Full Restore success summary"] [total-ranges=256] [ranges-succeed=256] [ranges-failed=0] [split-region=227.871055ms] [restore-ranges=176] [total-take=50.097892323s] [total-kv=108910298] [total-kv-size=12.51GB] [average-speed=249.6MB/s] [restore-data-size(after-compressed)=4.842GB] [Size=4842191785] [BackupTS=435461866045833217]

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 19, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3pointer
  • joccau

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none do-not-merge/needs-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 19, 2022
@MoCuishle28
Copy link
Contributor Author

/run-integration-br-test

@MoCuishle28
Copy link
Contributor Author

/component br

@ti-chi-bot ti-chi-bot added the component/br This issue is related to BR of TiDB. label Aug 19, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Aug 19, 2022

@MoCuishle28
Copy link
Contributor Author

/run-build

@MoCuishle28
Copy link
Contributor Author

/run-integration-br-test

Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
@MoCuishle28
Copy link
Contributor Author

/run-integration-br-test

@ti-chi-bot
Copy link
Member

@WangLe1321: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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.

Copy link
Member

@joccau joccau left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 23, 2022
@3pointer 3pointer added affects-5.4 This bug affects 5.4.x versions. affects-6.1 labels Aug 24, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 24, 2022
@3pointer
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 0563391

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 31, 2022
@ti-chi-bot ti-chi-bot merged commit 3ac79e1 into pingcap:master Aug 31, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Aug 31, 2022

TiDB MergeCI notify

🔴 Bad News! [2] CI still failing after this pr merged.
These failed integration tests don't seem to be introduced by the current PR.

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/common-test 🔴 failed 1, success 10, total 11 12 min Existing failure
idc-jenkins-ci-tidb/integration-common-test 🔴 failed 1, success 16, total 17 12 min Existing failure
idc-jenkins-ci/integration-cdc-test 🟢 all 36 tests passed 26 min Existing passed
idc-jenkins-ci-tidb/tics-test 🟢 all 1 tests passed 7 min 35 sec Existing passed
idc-jenkins-ci-tidb/integration-ddl-test 🟢 all 6 tests passed 5 min 2 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 4 min 41 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 4 min 3 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 31 sec Existing passed
idc-jenkins-ci-tidb/integration-compatibility-test 🟢 all 1 tests passed 2 min 46 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects 5.4.x versions. affects-6.1 component/br This issue is related to BR of TiDB. release-note-none size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

br: backupmeta is not divided as expected.
6 participants