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

debugpb: rename some fields #195

Merged
merged 5 commits into from Sep 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 22 additions & 15 deletions proto/debugpb.proto
Expand Up @@ -22,10 +22,14 @@ option java_package = "com.pingcap.tikv.kvproto";
// reason can be found in grpc message.
// Note: It bypasses raft layer.
service Debug {
// Read a value arbitrarily for a encoded key.
// Read a value arbitrarily for a key.
// Note: Server uses key directly w/o any encoding.
rpc get(GetRequest) returns (GetResponse) {}

// Read MVCC info arbitrarily for raw key.
// Note: Server takes care about the key in requests.
// It will be encoded to encoded key and then
// encoded to data key.
rpc mvcc(MvccRequest) returns (MvccResponse) {}

// Read raft info.
Expand All @@ -38,22 +42,20 @@ service Debug {

// Scan a specific range.
// Note: DO NOT CALL IT IN PRODUCTION, it's really expensive.
// Server uses keys directly w/o any encoding.
rpc scan(ScanRequest) returns (stream ScanResponse) {}
}

enum CF {
enum DB {
INVALID = 0;
DEFAULT = 1;
WRITE = 2;
LOCK = 3;
RAFT = 4;
KV = 1;
RAFT = 2;
}

message GetRequest {
CF cf = 1;
// An arbitrary key for retrieving value from TiKV.
// Note: Server uses it directly w/o any encoding.
bytes key = 2;
bytes key = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please keep it in the order db, cf then key.

DB db = 2;
string cf = 3;
}

message GetResponse {
Expand All @@ -68,7 +70,7 @@ message MvccRequest {
}

By by = 1;
string key = 2;
bytes key = 2;
uint64 start_ts = 3;
}

Expand All @@ -78,7 +80,7 @@ message MvccRequest {
// 3. Short value in write.
message MvccResponse {
message Entry {
string key = 1;
bytes key = 1;
kvrpcpb.MvccInfo info = 2;
}

Expand All @@ -105,11 +107,16 @@ message RegionInfoResponse {

message SizeRequest {
uint64 region_id = 1;
repeated CF cfs = 2;
repeated string cfs = 2;
}

message SizeResponse {
uint64 size = 1;
message Entry {
string cf = 1;
uint64 size = 2;
}

repeated Entry entries = 1;
}

message ScanRequest {
Expand All @@ -119,7 +126,7 @@ message ScanRequest {
uint64 start_ts = 2;
uint64 commit_ts = 3;
bool key_only = 4;
repeated CF cfs = 5;
repeated string cfs = 5;
}

bytes from_key = 1;
Expand Down