Skip to content

handle proposals correctly if majority peers are disk full#10671

Merged
ti-chi-bot merged 19 commits intotikv:masterfrom
hicqu:trace-full-store
Aug 8, 2021
Merged

handle proposals correctly if majority peers are disk full#10671
ti-chi-bot merged 19 commits intotikv:masterfrom
hicqu:trace-full-store

Conversation

@hicqu
Copy link
Contributor

@hicqu hicqu commented Aug 5, 2021

Signed-off-by: qupeng qupeng@pingcap.com

What problem does this PR solve?

This PR handles proposals correctly for majority peers are disk full. It contains:

  • Raft peers report disk usage to each other. Please also take a look at #kvproto/791.
  • Leader won't append entries to peers which are disk full any more. It's implemented with Raft::adjust_max_inflight_msgs.
  • If a proposal has a special DiskFullOpt flag, leader can broadcast it in order to commit it.

Related changes

Check List

Tests

  • Integration test

Release note

None

Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 5, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 5kbpers
  • gengliqi

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

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 5, 2021
@tier-cap
Copy link
Collaborator

tier-cap commented Aug 6, 2021

One Advice: If we can change the intercept condition of processing the received raft message from "if not disk normal" to "if disk is already full", then ti will work fine, and no need to get disk usage info from followers. One advantage is Logically decoupling.

hicqu added 2 commits August 6, 2021 14:01
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 6, 2021
@hicqu hicqu requested review from 5kbpers and NingLin-P August 6, 2021 06:10
@hicqu hicqu changed the title report disk usage in raft groups handle proposals correctly if majority peers are disk full Aug 6, 2021
Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 6, 2021
hicqu added 2 commits August 6, 2021 17:01
Signed-off-by: qupeng <qupeng@pingcap.com>
hicqu added 3 commits August 6, 2021 17:50
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 6, 2021
@hicqu
Copy link
Contributor Author

hicqu commented Aug 6, 2021

One Advice: If we can change the intercept condition of processing the received raft message from "if not disk normal" to "if disk is already full", then ti will work fine, and no need to get disk usage info from followers. One advantage is Logically decoupling.

Of course it's a potential solution. However maintaining a Vec<(index, DiskFullOpt)> correctly in raftstore is not easy. You can take try if you have time.

@hicqu hicqu force-pushed the trace-full-store branch from aebc90b to f0cd626 Compare August 7, 2021 11:17
@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 Aug 8, 2021
@hicqu
Copy link
Contributor Author

hicqu commented Aug 8, 2021

/merge

@ti-chi-bot
Copy link
Member

@hicqu: 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.

Details

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.

DetailsCommit hash: f0cd626

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

@hicqu: Your PR was out of date, I have automatically updated it for you.

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

/run-all-tests

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.

Details

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.

@tikv tikv deleted a comment from tier-cap Aug 8, 2021
@ti-chi-bot ti-chi-bot merged commit a1d6048 into tikv:master Aug 8, 2021
@hicqu hicqu deleted the trace-full-store branch August 8, 2021 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants