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

tikv-ctl: add bad-regions subcommand. #2624

Merged
merged 12 commits into from Jan 2, 2018
Merged

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Dec 26, 2017

close #2612

Now the command can check all regions which have corrupted last index, commited index or applied index. But it can't handle bad snapshot until now.

@hicqu hicqu requested a review from overvenus December 26, 2017 10:43
@siddontang
Copy link
Contributor

can you give me some examples, like damaging some region metas and using our tool?

@hicqu
Copy link
Contributor Author

hicqu commented Dec 27, 2017

I have add some test cases to show how the command check bad regions. PTAL thanks.

@@ -490,6 +492,10 @@ impl DebugExecutor for DebugClient {
fn set_region_tombstone(&self, _: u64, _: Region) {
unimplemented!();
}

fn print_bad_regions(&self) {
panic!("only avaliable for local mode");
Copy link
Member

Choose a reason for hiding this comment

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

How about unimplemented!?

@siddontang
Copy link
Contributor

Great work

@hicqu
Copy link
Contributor Author

hicqu commented Dec 29, 2017

@overvenus PTAL again, thanks.

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@hicqu
Copy link
Contributor Author

hicqu commented Jan 2, 2018

/run-all-tests

@hicqu hicqu merged commit f5f9619 into tikv:master Jan 2, 2018
@hicqu hicqu deleted the tikv-ctl-bad-regions branch January 2, 2018 08:01
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tikv-ctl check all regions which can't launch
3 participants