tidb icon indicating copy to clipboard operation
tidb copied to clipboard

br: fix debug decode backupmeta

Open Leavrth opened this issue 1 year ago • 6 comments

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
  • [x] 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

Leavrth avatar Oct 14 '24 04:10 Leavrth

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.

tiprow[bot] avatar Oct 14 '24 04:10 tiprow[bot]

Codecov Report

:x: Patch coverage is 48.54369% with 106 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 59.5305%. Comparing base (9b1fa1c) to head (2971ded). :warning: Report is 2427 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 52.8883% <16.5048%> (?)
unit 74.8216% <46.6019%> (+2.0767%) :arrow_up:

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

Components Coverage Δ
dumpling ∅ <ø> (∅)
parser ∅ <ø> (∅)
br 63.8206% <48.5436%> (+17.5811%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 14 '24 04:10 codecov[bot]

/retest

Leavrth avatar Oct 15 '24 01:10 Leavrth

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

tiprow[bot] avatar Oct 15 '24 01:10 tiprow[bot]

[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[bot] avatar Nov 12 '24 06:11 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

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

ti-chi-bot[bot] avatar Nov 12 '24 06:11 ti-chi-bot[bot]

@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 2971ded8c789204aa91eeeb3caa3fde04f0c12f0 link true /test tidb_parser_test
fast_test_tiprow 2971ded8c789204aa91eeeb3caa3fde04f0c12f0 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.

tiprow[bot] avatar Nov 12 '24 06:11 tiprow[bot]

/test all

purelind avatar Nov 12 '24 15:11 purelind

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

tiprow[bot] avatar Nov 12 '24 15:11 tiprow[bot]

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

ti-chi-bot avatar Dec 02 '24 09:12 ti-chi-bot

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

ti-chi-bot avatar Dec 02 '24 09:12 ti-chi-bot

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

ti-chi-bot avatar Dec 01 '25 06:12 ti-chi-bot