Skip to content

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Oct 12, 2024

What problem does this PR solve?

Issue Number: close #56493

Problem Summary:
See the issue.

What changed and how does it work?

add more details in the summary. And split the progress of snapshot restore

Detail BR log in /tmp/br.log.2024-10-12T15.39.51+0800 
Split&Scatter Region <----------------------------------------------------------------------------------------------------> 100.00%
Download&Ingest SST <-----------------------------------------------------------------------------------------------------> 100.00%
Restore Pipeline <--------------------------------------------------------------------------------------------------------> 100.00%
[2024/10/12 15:47:55.497 +08:00] [INFO] [collector.go:77] ["Full Restore success summary"] [total-ranges=863] [ranges-succeed=863] [ranges-failed=0] [merge-ranges=7.546971ms] [split-region=343.594072ms] [restore-files=5m3.576621503s] [default-CF-files=278] [write-CF-files=558] [split-keys=386] [total-take=6m35.304887635s] [total-kv=871760372] [total-kv-size=143.8GB] [average-speed=363.8MB/s] [restore-data-size(after-compressed)=62.07GB] [Size=62072785167] [BackupTS=452625823236882437] [RestoreTS=453237563041775617]

merge-ranges: the time consumption of ranges merge.
split-region: the time consumption of regions split&scatter.
restore-files: the time consumption of SST files download&ingest.
default-CF-files: the number of default CF files.
write-CF-files: the number of write CF files.
split-keys: the number of keys to split regions.

Detail BR log in /tmp/br.log.2024-10-17T10.25.13+0800 
Full Backup <------------------------------------------------------------------------------------------------------------------------------> 100.00%
Checksum <---------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2024/10/17 10:31:38.602 +08:00] [INFO] [collector.go:77] ["Full Backup success summary"] [total-ranges=1813] [ranges-succeed=1813] [ranges-failed=0] [backup-fast-checksum=17.400535ms] [backup-checksum=1m26.440733343s] [backup-total-ranges=157] [backup-total-regions=510] [write-CF-files=1188] [default-CF-files=625] [total-take=6m25.007059103s] [total-kv=871788040] [total-kv-size=143.8GB] [average-speed=373.5MB/s] [backup-data-size(after-compressed)=62.07GB] [Size=62073954324] [BackupTS=453281586797346817]

backup-total-regions: the approximate number of regions backed up.
default-CF-files: the number of default CF files.
write-CF-files: the number of write CF files.

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.

Improve summary and progress visualization of BR

Signed-off-by: Jianjun Liao <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked 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. labels Oct 12, 2024
Copy link

tiprow bot commented Oct 12, 2024

Hi @Leavrth. 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 Oct 12, 2024

Codecov Report

Attention: Patch coverage is 84.14634% with 26 lines in your changes missing coverage. Please review.

Project coverage is 74.9134%. Comparing base (36e8e34) to head (2191949).
Report is 254 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56612        +/-   ##
================================================
+ Coverage   73.0285%   74.9134%   +1.8849%     
================================================
  Files          1684       1702        +18     
  Lines        465663     471739      +6076     
================================================
+ Hits         340067     353396     +13329     
+ Misses       104691      96664      -8027     
- Partials      20905      21679       +774     
Flag Coverage Δ
integration 46.5120% <84.1463%> (?)
unit 72.6679% <15.8536%> (+0.4561%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 61.3691% <84.1463%> (+16.1371%) ⬆️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
@Leavrth Leavrth changed the title br: improve visualization of br br: improve summary and progress visualization of br Oct 17, 2024
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 28, 2024

/retest

Copy link

tiprow bot commented Oct 28, 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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2024
Copy link

ti-chi-bot bot commented Nov 8, 2024

PR needs rebase.

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

Thanks for the change, it should help a lot of our customers as they are confused why the progress bar stopped at around 70%.

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Jan 7, 2025

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

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 17, 2025
@BornChanger BornChanger added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jan 17, 2025
Signed-off-by: Jianjun Liao <[email protected]>
@BornChanger BornChanger removed needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jan 17, 2025
@Leavrth
Copy link
Contributor Author

Leavrth commented Jan 17, 2025

/retest

Copy link

tiprow bot commented Jan 17, 2025

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

@Leavrth
Copy link
Contributor Author

Leavrth commented Jan 17, 2025

/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 17, 2025
@@ -226,6 +226,9 @@ type MultiTablesRestorer struct {
workerPool *util.WorkerPool
fileImporter BalancedFileImporter
checkpointRunner *checkpoint.CheckpointRunner[checkpoint.RestoreKeyType, checkpoint.RestoreValueType]

fileCount int
Copy link
Contributor

Choose a reason for hiding this comment

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

need lock here or make it atomic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variable fileCount is modified in GoRestore and load in WaitUntilFinish(Notice that fileCount is not used in workerpool or any other goroutines). Actually, the two functions are always appear together like this:

err := restorer.GoRestore()
if err != nil {
  return err
}
err = restorer.WaitUntilFinish()
if err != nil {
  return err
}

Copy link

ti-chi-bot bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Jan 22, 2025
Copy link

ti-chi-bot bot commented Jan 22, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-17 06:21:13.376593028 +0000 UTC m=+272344.831639172: ☑️ agreed by BornChanger.
  • 2025-01-22 04:43:53.549623502 +0000 UTC m=+242360.880542906: ☑️ agreed by YuJuncen.

@ti-chi-bot ti-chi-bot bot merged commit ba79f50 into pingcap:master Jan 22, 2025
29 checks passed
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 10, 2025
zeminzhou pushed a commit to zeminzhou/tidb that referenced this pull request May 6, 2025
Tristan1900 pushed a commit to Tristan1900/tidb that referenced this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Improve summary and progress visualization of BR
5 participants