Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

pkg/lightning: fix incorrect table counter (#996) #1005

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 14, 2021

cherry-pick #996 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In br repo:
git pr https://github.com/pingcap/br/pull/1005

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/br.git pr/1005:release-5.0-d5e5cdc7676e

What problem does this PR solve?

Fix the wrong table count in the progress log like following:

[2021/04/12 14:26:43.837 +08:00] [INFO] [restore.go:1026] [progress] [total=0.0%] [tables="0/2 (0.0%)"] [chunks="0/99 (0.0%)"] [engines="0/2 (0.0%)"] [speed(MiB/s)=145.03058180393646] [state=preparing] []

There is only one table data in the source files but the pending tables count is 2.

What is changed and how it works?

Calculate pending table count based on the tables in dbMetas instead of tables fetched from TiDB.

Check List

Tests

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

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • Fix the bug that the table count in the progress log is wrong

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@glorv
Copy link
Collaborator

glorv commented Apr 14, 2021

/run-all-tests

@3pointer
Copy link
Collaborator

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 LGTM1 label Apr 15, 2021
@overvenus
Copy link
Member

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3pointer
  • overvenus

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Apr 15, 2021
@glorv
Copy link
Collaborator

glorv commented Apr 15, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 32cfdbf

@glorv
Copy link
Collaborator

glorv commented Apr 15, 2021

/run-all-tests

1 similar comment
@glorv
Copy link
Collaborator

glorv commented Apr 15, 2021

/run-all-tests

@ti-chi-bot ti-chi-bot merged commit 301397a into pingcap:release-5.0 Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants