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

pkg/core, cluster: save kv and cache if region flashback (#6911) #6948

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #6911

What problem does this PR solve?

Issue Number: ref #6912

Close tikv/tikv#15258

What is changed and how does it work?

TiKV Region merge checks region in operator and in local strictly,
and drops commit merge if there is a mismatch between them.

This change is necessary to prevent flashback from blocking
Region merge. For more details, see tikv/tikv#15258.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix an issue that Region merge may be blocked after flashback

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 10, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • nolouch

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 submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Aug 10, 2023
@ti-chi-bot ti-chi-bot bot requested review from nolouch and rleungx August 10, 2023 09:54
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 11, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 13, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 15, 2023
overvenus and others added 2 commits August 15, 2023 14:59
ref tikv#6912, close tikv/tikv#15258

TiKV Region merge checks region in operator and in local strictly,
and drops commit merge if there is a mismatch between them.

This change is necessary to prevent flashback from blocking
Region merge. For more details, see tikv/tikv#15258.

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
let kvproto match tikv's

Signed-off-by: Neil Shen <[email protected]>
@overvenus overvenus force-pushed the cherry-pick-6911-to-release-6.5 branch from 22a283e to 0bbe4f6 Compare August 15, 2023 07:14
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: -0.07% ⚠️

Comparison is base (4441cd8) 75.64% compared to head (1011ad7) 75.58%.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-6.5    #6948      +/-   ##
===============================================
- Coverage        75.64%   75.58%   -0.07%     
===============================================
  Files              329      329              
  Lines            33595    33602       +7     
===============================================
- Hits             25414    25399      -15     
- Misses            6010     6029      +19     
- Partials          2171     2174       +3     
Flag Coverage Δ
unittests 75.58% <85.71%> (-0.07%) ⬇️

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

Files Changed Coverage Δ
server/cluster/cluster.go 81.58% <ø> (-0.34%) ⬇️
server/core/region.go 90.12% <80.00%> (-0.08%) ⬇️
server/core/region_option.go 67.37% <100.00%> (+0.46%) ⬆️

... and 20 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@overvenus
Copy link
Member

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 15, 2023

@overvenus: 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
Contributor

ti-chi-bot bot commented Aug 15, 2023

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

Commit hash: 9a9b565

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 15, 2023
@overvenus
Copy link
Member

CI fails as follow

make[2]: Entering directory '/home/runner/work/pd/pd'
make[2]: Leaving directory '/home/runner/work/pd/pd'
level=error msg="Running error: context loading failed: no go files to analyze"
make[1]: *** [Makefile:21: static] Error 5
/usr/bin/bash: line 1: cd: ./client: No such file or directory
make[1]: Leaving directory '/home/runner/work/pd/pd/tests/client'
make: *** [Makefile:1[54](https://github.com/tikv/pd/actions/runs/5864608952/job/15899969046?pr=6948#step:5:55): static] Error 1

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 18, 2023

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

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.

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.

Signed-off-by: Neil Shen <[email protected]>
@overvenus overvenus force-pushed the cherry-pick-6911-to-release-6.5 branch from 4425f2b to 1a1d067 Compare August 18, 2023 06:45
@ti-chi-bot ti-chi-bot bot removed the status/can-merge Indicates a PR has been approved by a committer. label Aug 18, 2023
Signed-off-by: Neil Shen <[email protected]>
@overvenus overvenus force-pushed the cherry-pick-6911-to-release-6.5 branch from 96f1e48 to 0f8b77f Compare August 18, 2023 07:12
@overvenus
Copy link
Member

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 18, 2023

@overvenus: 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
Contributor

ti-chi-bot bot commented Aug 18, 2023

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

Commit hash: 1011ad7

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 18, 2023
@ti-chi-bot ti-chi-bot bot merged commit cd4eb78 into tikv:release-6.5 Aug 18, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 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-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants