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

lightning: refactor the backend package (#877)#957

Merged
ti-chi-bot merged 7 commits into
pingcap:release-4.0from
ti-srebot:release-4.0-2652f252f175
May 6, 2021
Merged

lightning: refactor the backend package (#877)#957
ti-chi-bot merged 7 commits into
pingcap:release-4.0from
ti-srebot:release-4.0-2652f252f175

Conversation

@ti-srebot
Copy link
Copy Markdown
Contributor

@ti-srebot ti-srebot commented Mar 29, 2021

cherry-pick #877 to release-4.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/957

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

git push git@github.com:ti-srebot/br.git pr/957:release-4.0-2652f252f175

What problem does this PR solve?

Split the pkg/lightning/backend package into multiple parts, intended to be the true fix for #837 surviving go mod tidy.

What is changed and how it works?

The backend package itself now only contains the abstract type Backend. The concrete stuff are now split into multiple subpackages:

  • Local backend into pkg/lightning/backend/local
  • TiDB backend into pkg/lightning/backend/tidb
  • Importer backend into pkg/lightning/backend/importer
  • KV encoder stuff into pkg/lightning/backend/kv, intended to be merged into pkg/kv in some future PR
  • TiKV connection stuff into pkg/lightning/tikv
  • The version checking code is split into pkg/lightning/backend/importer, pkg/lightning/backend/local, pkg/lightning/tikvandpkg/version` depending on the component being checked.

Reverted #838 as it is proved to be useless.

Check List

Tests

  • Unit test

Code changes

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

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • No release note

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

kennytm commented Mar 29, 2021

blocked by #788.

@glorv glorv force-pushed the release-4.0-2652f252f175 branch 5 times, most recently from 9532588 to 77e2be7 Compare May 6, 2021 07:04
@glorv glorv force-pushed the release-4.0-2652f252f175 branch from 77e2be7 to d752e15 Compare May 6, 2021 07:09
@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/run-all-tests

@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/build

2 similar comments
@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/build

@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/build

@glorv glorv force-pushed the release-4.0-2652f252f175 branch from 33b506c to d924eb5 Compare May 6, 2021 08:26
@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/run-all-tests

@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

@glorv: /merge in this pull request requires 2 /lgtm.

Details

In response to this:

/merge

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 ti-community-infra/tichi repository.

@3pointer
Copy link
Copy Markdown
Collaborator

3pointer commented May 6, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 LGTM1 label May 6, 2021
@lance6716
Copy link
Copy Markdown
Contributor

/lgtm

@ti-chi-bot
Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3pointer
  • lance6716

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.

Details

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 May 6, 2021
@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

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

DetailsCommit hash: 7f0a696

@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/run-all-tests

@glorv glorv force-pushed the release-4.0-2652f252f175 branch from 4b6f47a to 915afe9 Compare May 6, 2021 11:26
@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

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

DetailsCommit hash: 01f10ec

@glorv
Copy link
Copy Markdown
Collaborator

glorv commented May 6, 2021

/unhold

@ti-chi-bot ti-chi-bot merged commit 2442555 into pingcap:release-4.0 May 6, 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.

7 participants