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

Add resolved ts traffic optimizations #1128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions proto/kvrpcpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1345,11 +1345,30 @@ message ReadState {
message CheckLeaderRequest {
repeated LeaderInfo regions = 1;
uint64 ts = 2;
uint64 store_id = 3;
repeated uint64 inactive_regions = 4;
}

message CheckLeaderResponse {
repeated uint64 regions = 1;
uint64 ts = 2;
repeated uint64 failed_regions = 3;
}

message CheckedLeader {
uint64 region_id = 1;
ReadState read_state = 3;
}

message ApplySafeTsRequest {
uint64 ts = 1;
uint64 store_id = 2;
repeated uint64 unsafe_regions = 3;
repeated CheckedLeader checked_leaders = 4;
}

message ApplySafeTsResponse {
uint64 ts = 1;
}

message StoreSafeTSRequest {
Expand Down
3 changes: 3 additions & 0 deletions proto/tikvpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ service Tikv {
/// other stores for every region, and decides to advance resolved ts from these regions.
rpc CheckLeader(kvrpcpb.CheckLeaderRequest) returns (kvrpcpb.CheckLeaderResponse);

/// For pusing safe_ts safety, we need another phase after CheckLeader.
rpc ApplySafeTs(kvrpcpb.ApplySafeTsRequest) returns (kvrpcpb.ApplySafeTsResponse);

/// Get the minimal `safe_ts` from regions at the store
rpc GetStoreSafeTS(kvrpcpb.StoreSafeTSRequest) returns (kvrpcpb.StoreSafeTSResponse);

Expand Down
Loading