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

[to #67] remove unused code related to parser #78

Merged
merged 5 commits into from
Mar 30, 2022

Conversation

zz-jason
Copy link
Member

Signed-off-by: Jian Zhang [email protected]

What problem does this PR solve?

Issue Number: [to #67]

Problem Description: I found br relies on pingcap/parser, which makes the dependency hard to manage, i.e, upgrade some packages like kvproto to a newer version

What is changed and how does it work?

this pr aims to delete parser related functions and simplify the dependency

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Check List for Tests

This PR has been tested by at least one of the following methods:

  • Unit test
  • Integration test

Side effects

  • No side effects

Related changes

  • No related changes

@zz-jason
Copy link
Member Author

zz-jason commented Mar 30, 2022

now only the following places directly relaies on parser, I'll try to remove them later in this PR:

➜ find . -name "*.go" | xargs grep --color "parser"
./pkg/task/backup.go:   "github.com/pingcap/tidb/parser/mysql"

@zz-jason zz-jason enabled auto-merge (squash) March 30, 2022 05:11
@zz-jason zz-jason force-pushed the fix/remove-parser-related-files branch from cdb65b5 to 1aef0c7 Compare March 30, 2022 10:53
)

// LoadRestoreStores loads the stores used to restore data.
func (rc *Client) LoadRestoreStores(ctx context.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

These methods seems to be used to stop PD scheduling regions during restore, as we have pre-splitted regions. But need some changes (on the table codes).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. We can add it back once needed.

Copy link
Collaborator

@pingyu pingyu left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason merged commit 69ddf53 into tikv:main Mar 30, 2022
@zz-jason zz-jason deleted the fix/remove-parser-related-files branch March 30, 2022 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants