Skip to content

Commit

Permalink
debugpb: support fail point (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
overvenus authored Oct 16, 2017
1 parent 9de27a0 commit 146f027
Show file tree
Hide file tree
Showing 11 changed files with 3,392 additions and 224 deletions.
1,093 changes: 1,045 additions & 48 deletions pkg/debugpb/debugpb.pb.go

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions proto/debugpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ service Debug {
// Compact a column family in a specified range.
// Note: Server uses keys directly w/o any encoding.
rpc Compact(CompactRequest) returns (CompactResponse) {}

// Inject a fail point. Currently, it's only used in tests.
// Note: DO NOT CALL IT IN PRODUCTION.
rpc InjectFailPoint(InjectFailPointRequest) returns (InjectFailPointResponse) {}
// Recover from a fail point.
rpc RecoverFailPoint(RecoverFailPointRequest) returns (RecoverFailPointResponse) {}
// List all fail points.
rpc ListFailPoints(ListFailPointsRequest) returns (ListFailPointsResponse) {}
}

enum DB {
Expand Down Expand Up @@ -113,3 +121,30 @@ message CompactRequest {

message CompactResponse {
}

message InjectFailPointRequest {
string name = 1;
string actions = 2;
}

message InjectFailPointResponse {
}

message RecoverFailPointRequest {
string name = 1;
}

message RecoverFailPointResponse {
}

message ListFailPointsRequest {
}

message ListFailPointsResponse {
message Entry {
string name = 1;
string actions = 2;
}

repeated Entry entries = 1;
}
2 changes: 1 addition & 1 deletion src/coprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x0cregion_error\x18\x02\x20\x01(\x0b2\x0e.errorpb.ErrorR\x0bregionError\
\x12)\n\x06locked\x18\x03\x20\x01(\x0b2\x11.kvrpcpb.LockInfoR\x06locked\
\x12\x1f\n\x0bother_error\x18\x04\x20\x01(\tR\notherErrorB&\n\x18com.pin\
gcap.tikv.kvproto\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\xc8\xe2\x1e\x01J\xde\n\
gcap.tikv.kvproto\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01J\xde\n\
\n\x06\x12\x04\0\0\x1f\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\
\x02\x12\x03\x01\x08\x13\n\t\n\x02\x03\0\x12\x03\x03\x07\x16\n\t\n\x02\
\x03\x01\x12\x03\x04\x07\x16\n\t\n\x02\x03\x02\x12\x03\x05\x07\x1d\n\x08\
Expand Down
Loading

0 comments on commit 146f027

Please sign in to comment.