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 ttl for raw client #324

Merged
merged 2 commits into from
Dec 28, 2023
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ prometheus = { version = "0.13", default-features = false }
prost = "0.12"
rand = "0.8"
regex = "1"
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
semver = "1.0"
serde = "1.0"
serde_derive = "1.0"
Expand All @@ -54,6 +53,7 @@ env_logger = "0.10"
fail = { version = "0.4", features = ["failpoints"] }
proptest = "1"
proptest-derive = "0.3"
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
rstest = "0.18.2"
serde_json = "1"
serial_test = "0.5.0"
Expand Down
2 changes: 1 addition & 1 deletion proto-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ edition = "2021"

[dependencies]
glob = "0.3"
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }
47 changes: 47 additions & 0 deletions proto/autoid.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
syntax = "proto3";
package autoid;

import "gogoproto/gogo.proto";
import "rustproto.proto";

option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (rustproto.lite_runtime_all) = true;

option java_package = "org.tikv.kvproto";

message AutoIDRequest {
int64 dbID = 1;
int64 tblID = 2;
bool isUnsigned = 3;
uint64 n = 4;
int64 increment = 5;
int64 offset = 6;
uint32 keyspaceID = 7;
}

message AutoIDResponse {
int64 min = 1;
int64 max = 2;

bytes errmsg = 3;
}

message RebaseRequest {
int64 dbID = 1;
int64 tblID = 2;
bool isUnsigned = 3;
int64 base = 4;
bool force = 5;
}

message RebaseResponse {
bytes errmsg = 1;
}

service AutoIDAlloc {
rpc AllocAutoID(AutoIDRequest) returns (AutoIDResponse) {}
rpc Rebase(RebaseRequest) returns (RebaseResponse) {}
}

Loading