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

Fix the issue that end key of a partial rawkv-restore range is inclusive (#7196) #9583

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

MyonKeminta
Copy link
Contributor

cherry-pick #7196 to release-4.0


What have you changed?

Partially fixes #7163 , but it still doesn't work for restoring plain transactional kv (without TiDB).

This PR adds is_raw_kv field to DownloadRequest to distinguish rawkv restore requests, and adds end_key_exclusive field to SstMeta so that TiKV knows whether the endkey need to be included.l

What is the type of the changes?

  • Bugfix (a change which fixes an issue)

How is the PR tested?

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

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

(I'm not sure if it's necessary)

  • Fix the issue that when restoring partial of backed up raw kv data, TiKV may write out-of-range keys.

Does this PR affect tidb-ansible?

Refer to a related PR or issue link (optional)

Release note

  • No release note

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 27, 2021
@MyonKeminta MyonKeminta added component/backup-restore Component: backup, import, external_storage sig/migrate type/cherry-pick Type: PR - Cherry pick labels Jan 27, 2021
@MyonKeminta MyonKeminta added this to the v4.0.11 milestone Jan 27, 2021
@3pointer
Copy link
Contributor

LGTM

@ti-chi-bot
Copy link
Member

@3pointer: Please use /LGTM instead of LGTM when you want to approve the pull request by comment.

If you use the GitHub review feature, please approve the PR directly, the comment will not take effect in the GitHub review feature.

If you have any qustions please refer to lgtm command help or lgtm plugin design.

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
Contributor

/run-all-tests

@kennytm
Copy link
Contributor

kennytm commented Jan 27, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
@zhouqiang-cl
Copy link
Contributor

/run-all-tests

@3pointer
Copy link
Contributor

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3pointer
  • kennytm

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 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 28, 2021
@MyonKeminta
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@MyonKeminta: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Member

@MyonKeminta: /merge is only allowed for the committers in list.

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
Contributor

/merge

@ti-chi-bot
Copy link
Member

@3pointer: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: 7be5dd2

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 28, 2021
@ti-chi-bot
Copy link
Member

@MyonKeminta: Your PR has out-of-dated, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

@ti-chi-bot ti-chi-bot merged commit ba2e63c into tikv:release-4.0 Jan 28, 2021
gengliqi pushed a commit to gengliqi/tikv that referenced this pull request Feb 20, 2021
…ive (tikv#7196) (tikv#9583)


cherry-pick tikv#7196 to release-4.0

---

<!--
Thank you for contributing to TiKV!

If you haven't already, please read TiKV's [CONTRIBUTING](https://github.com/tikv/tikv/blob/master/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
-->

###  What have you changed?

Partially fixes tikv#7163 , but it still doesn't work for restoring plain transactional kv (without TiDB).

This PR adds is_raw_kv field to DownloadRequest to distinguish rawkv restore requests, and adds end_key_exclusive field to SstMeta so that TiKV knows whether the endkey need to be included.l

###  What is the type of the changes?

- Bugfix (a change which fixes an issue)

###  How is the PR tested?

- Unit test
- Manual test (add detailed scripts or steps below)

###  Does this PR affect documentation (docs) or should it be mentioned in the release notes?

(I'm not sure if it's necessary)
* Fix the issue that when restoring partial of backed up raw kv data, TiKV may write out-of-range keys.

###  Does this PR affect `tidb-ansible`?

###  Refer to a related PR or issue link (optional)

- [x] kvproto pingcap/kvproto#581
- [ ] Corresponding PR of BR

### Release note

* No release note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/backup-restore Component: backup, import, external_storage sig/migrate size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick Type: PR - Cherry pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants