Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/golang.org/x/net-0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
disksing authored Jun 20, 2024
2 parents ad9370f + bca367d commit 4175795
Show file tree
Hide file tree
Showing 7 changed files with 1,738 additions and 924 deletions.
6 changes: 4 additions & 2 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Sort the member alphabetically.
aliases:
emeritus-approvers: # do not assign it in any OWNERS file.
- tonyxuqqi # 2024-05
sig-approvers: # default approvers for the repo on rest folders.
- cfzjywxk
- lance6716
Expand All @@ -19,8 +21,8 @@ aliases:
sig-approvers-pb-deadlock: [MyonKeminta, cfzjywxk]
sig-approvers-pb-debug: [cfzjywxk]
sig-approvers-pb-pd: [niubell, rleungx]
sig-approvers-pb-raftstore: [tonyxuqqi, overvenus]
sig-approvers-pb-tikv: [tonyxuqqi]
sig-approvers-pb-raftstore: [zhangjinpeng1987, overvenus]
sig-approvers-pb-tikv: [zhangjinpeng1987]
sig-approvers-pb-error: [cfzjywxk]
sig-approvers-pb-kvrpc: [cfzjywxk]
sig-approvers-pb-trace: [you06]
1,666 changes: 1,213 additions & 453 deletions pkg/kvrpcpb/kvrpcpb.pb.go

Large diffs are not rendered by default.

826 changes: 393 additions & 433 deletions pkg/tikvpb/tikvpb.pb.go

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions proto/kvrpcpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,9 @@ message SplitRegionResponse {
metapb.Region left = 2 [deprecated=true]; // set when there are only 2 result regions.
metapb.Region right = 3 [deprecated=true]; // set when there are only 2 result regions.
repeated metapb.Region regions = 4; // include all result regions.

// Reserved for file based transaction.
repeated KeyError errors = 100;
}

// Sent from TiFlash to a TiKV node.
Expand Down Expand Up @@ -1597,3 +1600,32 @@ message BufferBatchGetResponse {
// Time and scan details when processing the request.
ExecDetailsV2 exec_details_v2 = 4;
}

// Actively request TiKV to report health feedback information. TiKV won't omit the health feedback information when sending the
// `BatchCommandsResponse` that contains this response.
// The health feedback information won't be replied in the response, but will be attached to `BatchCommandsResponse.health_feedback` field as usual.
// Only works when batch RPC is enabled.
message GetHealthFeedbackRequest {
Context context = 1;
}

message GetHealthFeedbackResponse {
// The error field is added for keeping consistent. This request won't meet any region error as it's store level rather than region level.
errorpb.Error region_error = 1;
HealthFeedback health_feedback = 2;
}

message HealthFeedback {
uint64 store_id = 1;
// The sequence number of the feedback message.
// It's defined as an incrementing integer, starting from the unix timestamp (milliseconds) at
// the time that the TiKV node is started.
// This can be useful for filtering out out-of-order feedback messages.
// Note that considering the possibility of system clock changing, this field doesn't guarantee
// uniqueness and monotonic if the TiKV node is restarted.
uint64 feedback_seq_no = 2;
// The slow_score calculated in raftstore module. Due to some limitations of slow score, this would
// be replaced by `SlowTrend` in the future.
int32 slow_score = 3;
}

6 changes: 6 additions & 0 deletions proto/raft_serverpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ enum ExtraMessageType {
MsgGcPeerResponse = 12;
MsgFlushMemtable = 13;
MsgRefreshBuckets = 14;
// Messages for the snapshot gen precheck process.
MsgSnapGenPrecheckRequest = 15;
MsgSnapGenPrecheckResponse = 16;
}

message FlushMemtable {
Expand Down Expand Up @@ -293,4 +296,7 @@ message ExtraMessage {
AvailabilityContext availability_context = 8;
// notice the peer to refresh buckets version
RefreshBuckets refresh_buckets = 9;
// snap_gen_precheck_passed is used to indicate the precheck result when
// a follower responds to a leader's snapshot gen precheck request.
bool snap_gen_precheck_passed = 10;
}
23 changes: 8 additions & 15 deletions proto/tikvpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ service Tikv {
rpc FetchDisaggPages(disaggregated.FetchDisaggPagesRequest) returns (stream disaggregated.PagesPacket) {}
/// Compute node get configuration from Write node
rpc GetDisaggConfig(disaggregated.GetDisaggConfigRequest) returns (disaggregated.GetDisaggConfigResponse) {}

/// Get health feedback info from the TiKV node.
rpc GetHealthFeedback(kvrpcpb.GetHealthFeedbackRequest) returns (kvrpcpb.GetHealthFeedbackResponse) {}
}

message BatchCommandsRequest {
Expand Down Expand Up @@ -183,6 +186,8 @@ message BatchCommandsRequest {
kvrpcpb.FlushRequest Flush = 37;
kvrpcpb.BufferBatchGetRequest BufferBatchGet = 38;

kvrpcpb.GetHealthFeedbackRequest GetHealthFeedback = 39;

// For some test cases.
BatchCommandsEmptyRequest Empty = 255;
}
Expand All @@ -197,7 +202,7 @@ message BatchCommandsResponse {
repeated uint64 request_ids = 2;
// 280 means TiKV gRPC cpu usage is 280%.
uint64 transport_layer_load = 3;
HealthFeedback health_feedback = 4;
kvrpcpb.HealthFeedback health_feedback = 4;

message Response {
oneof cmd {
Expand Down Expand Up @@ -241,6 +246,8 @@ message BatchCommandsResponse {
kvrpcpb.FlushResponse Flush = 37;
kvrpcpb.BufferBatchGetResponse BufferBatchGet = 38;

kvrpcpb.GetHealthFeedbackResponse GetHealthFeedback = 39;

// For some test cases.
BatchCommandsEmptyResponse Empty = 255;
}
Expand All @@ -265,17 +272,3 @@ message BatchCommandsEmptyResponse {
// ID of the test request.
uint64 test_id = 1;
}

message HealthFeedback {
uint64 store_id = 1;
// The sequence number of the feedback message.
// It's defined as an incrementing integer, starting from the unix timestamp (milliseconds) at
// the time that the TiKV node is started.
// This can be useful for filtering out out-of-order feedback messages.
// Note that considering the possibility of system clock changing, this field doesn't guarantee
// uniqueness and monotonic if the TiKV node is restarted.
uint64 feedback_seq_no = 2;
// The slow_score calculated in raftstore module. Due to some limitations of slow score, this would
// be replaced by `SlowTrend` in the future.
int32 slow_score = 3;
}
103 changes: 82 additions & 21 deletions scripts/proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9843,6 +9843,12 @@
"name": "regions",
"type": "metapb.Region",
"is_repeated": true
},
{
"id": 100,
"name": "errors",
"type": "KeyError",
"is_repeated": true
}
]
},
Expand Down Expand Up @@ -11616,6 +11622,51 @@
"type": "ExecDetailsV2"
}
]
},
{
"name": "GetHealthFeedbackRequest",
"fields": [
{
"id": 1,
"name": "context",
"type": "Context"
}
]
},
{
"name": "GetHealthFeedbackResponse",
"fields": [
{
"id": 1,
"name": "region_error",
"type": "errorpb.Error"
},
{
"id": 2,
"name": "health_feedback",
"type": "HealthFeedback"
}
]
},
{
"name": "HealthFeedback",
"fields": [
{
"id": 1,
"name": "store_id",
"type": "uint64"
},
{
"id": 2,
"name": "feedback_seq_no",
"type": "uint64"
},
{
"id": 3,
"name": "slow_score",
"type": "int32"
}
]
}
],
"imports": [
Expand Down Expand Up @@ -17446,6 +17497,14 @@
{
"name": "MsgRefreshBuckets",
"integer": 14
},
{
"name": "MsgSnapGenPrecheckRequest",
"integer": 15
},
{
"name": "MsgSnapGenPrecheckResponse",
"integer": 16
}
]
}
Expand Down Expand Up @@ -18154,6 +18213,11 @@
"id": 9,
"name": "refresh_buckets",
"type": "RefreshBuckets"
},
{
"id": 10,
"name": "snap_gen_precheck_passed",
"type": "bool"
}
]
}
Expand Down Expand Up @@ -20105,6 +20169,12 @@
"type": "kvrpcpb.BufferBatchGetRequest",
"oneof_parent": "cmd"
},
{
"id": 39,
"name": "GetHealthFeedback",
"type": "kvrpcpb.GetHealthFeedbackRequest",
"oneof_parent": "cmd"
},
{
"id": 255,
"name": "Empty",
Expand Down Expand Up @@ -20146,7 +20216,7 @@
{
"id": 4,
"name": "health_feedback",
"type": "HealthFeedback"
"type": "kvrpcpb.HealthFeedback"
}
],
"messages": [
Expand Down Expand Up @@ -20345,6 +20415,12 @@
"type": "kvrpcpb.BufferBatchGetResponse",
"oneof_parent": "cmd"
},
{
"id": 39,
"name": "GetHealthFeedback",
"type": "kvrpcpb.GetHealthFeedbackResponse",
"oneof_parent": "cmd"
},
{
"id": 255,
"name": "Empty",
Expand Down Expand Up @@ -20398,26 +20474,6 @@
"type": "uint64"
}
]
},
{
"name": "HealthFeedback",
"fields": [
{
"id": 1,
"name": "store_id",
"type": "uint64"
},
{
"id": 2,
"name": "feedback_seq_no",
"type": "uint64"
},
{
"id": 3,
"name": "slow_score",
"type": "int32"
}
]
}
],
"services": [
Expand Down Expand Up @@ -20774,6 +20830,11 @@
"name": "GetDisaggConfig",
"in_type": "disaggregated.GetDisaggConfigRequest",
"out_type": "disaggregated.GetDisaggConfigResponse"
},
{
"name": "GetHealthFeedback",
"in_type": "kvrpcpb.GetHealthFeedbackRequest",
"out_type": "kvrpcpb.GetHealthFeedbackResponse"
}
]
}
Expand Down

0 comments on commit 4175795

Please sign in to comment.