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 debug decode backupmeta #56627

Merged
merged 9 commits into from
Nov 13, 2024
Merged

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Oct 14, 2024

What problem does this PR solve?

Issue Number: close #56296

Problem Summary:
We can only see the main backupmeta.json.

What changed and how does it work?

decode the meta file and stats file.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
$ ls -aF1 /tmp/testbr
./
../
1/
backup.lock
backupmeta
backupmeta.datafile.000000001
backupmeta.schema.000000002
backupmeta.schema.stats.000000110
jsons/

$ ls -aF1 /tmp/testbr/jsons
./
../
backupmeta.datafile.000000001.json
backupmeta.json
backupmeta.schema.000000002.json
backupmeta.schema.stats.000000110.json
backupmeta.datafile.000000001.json

{
  "data_files": [
    {
      "name":"..",
      "sha256":"lu4KiCseT0M6dG2gghZXDwD5WOUOqDMhYKcLHMuDYGA=",
      "start_key":"..",
      "end_key":"..",
      "end_version":452625823236882437,
      "crc64xor":17088955387164552884,
      "total_kvs":1,
      "total_bytes":47,
      "cf":"write",
      "size":1673,
      "cipher_iv":..,
    },
    ...
  ],
}
backupmeta.schema.000000002.json

{
  "schemas":[
    {
      "db": ..,
      "table": ..,
      "crc64xor":4505190652257934775,
      "total_kvs":32,
      "total_bytes":3031,
    },
    ...
  ],
}
backupmeta.schema.stats.000000110.json

{
  "blocks":[
    {
      "physical_id":110,
      "json_table": ..,
    },
}
  • 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: Jianjun Liao <jianjun.liao@outlook.com>
@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Oct 14, 2024
Copy link

tiprow bot commented Oct 14, 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 14, 2024

Codecov Report

Attention: Patch coverage is 48.54369% with 106 lines in your changes missing coverage. Please review.

Project coverage is 59.5305%. Comparing base (9b1fa1c) to head (2971ded).
Report is 238 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56627         +/-   ##
=================================================
- Coverage   73.4078%   59.5305%   -13.8774%     
=================================================
  Files          1626       1800        +174     
  Lines        449038     675158     +226120     
=================================================
+ Hits         329629     401925      +72296     
- Misses        99214     248828     +149614     
- Partials      20195      24405       +4210     
Flag Coverage Δ
integration 40.2446% <16.5048%> (?)
unit 74.5483% <46.6019%> (+2.0399%) ⬆️

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

Components Coverage Δ
dumpling 55.2602% <ø> (+2.3124%) ⬆️
parser ∅ <ø> (∅)
br 63.5201% <48.5436%> (+17.9595%) ⬆️

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 14, 2024
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 15, 2024

/retest

Copy link

tiprow bot commented Oct 15, 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.

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 16, 2024
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 28, 2024
return nil
}
eg, ectx := errgroup.WithContext(ctx)
workers := tidbutil.NewWorkerPool(8, "download files workers")
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to make the pool size configurable or at least move 8 to constant definition section in l33.

Copy link

ti-chi-bot bot commented Nov 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, 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 12, 2024
Copy link

ti-chi-bot bot commented Nov 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-28 09:38:25.842526879 +0000 UTC m=+256218.681682419: ☑️ agreed by 3pointer.
  • 2024-11-12 06:35:09.777197289 +0000 UTC m=+338071.968066285: ☑️ agreed by YuJuncen.

Copy link

tiprow bot commented Nov 12, 2024

@Leavrth: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tidb_parser_test 2971ded link true /test tidb_parser_test
fast_test_tiprow 2971ded 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.

@purelind
Copy link
Contributor

/test all

Copy link

tiprow bot commented Nov 12, 2024

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

In response to this:

/test all

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 6b72ec4 into pingcap:master Nov 13, 2024
34 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

br debug decode is useless when the backupmeta file got split.
5 participants