Skip to content
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
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ regex = "1"
semver = "1.0"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1"
take_mut = "0.2.2"
thiserror = "1"
tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros"] }
tonic = { version = "0.10", features = ["tls"] }
Expand All @@ -51,9 +53,8 @@ env_logger = "0.10"
fail = { version = "0.4", features = ["failpoints"] }
proptest = "1"
proptest-derive = "0.3"
reqwest = { version = "0.11", default-features = false, features = [
"native-tls-vendored",
] }
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
rstest = "0.18.2"
serde_json = "1"
serial_test = "0.5.0"
simple_logger = "1"
Expand Down
79 changes: 79 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- 5kbpers
- AndreMouche
- andylokandy
- breezewish
- brson
- bufferflies
- BusyJay
- cfzjywxk
- Connor1996
- coocood
- crazycs520
- disksing
- ekexium
- gengliqi
- glorv
- hicqu
- hunterlxt
- imtbkcat
- innerr
- iosmanthus
- jackysp
- kennytm
- Little-Wallace
- liuzix
- lonng
- LykxSassinator
- lysu
- marsishandsome
- MyonKeminta
- niedhui
- NingLin-P
- nrc
- overvenus
- pingyu
- skyzh
- SpadeA-Tang
- sticnarf
- sunxiaoguang
- tabokie
- TennyZhuang
- tonyxuqqi
- yiwu-arbug
- you06
- youjiali1995
- YuJuncen
- zhangjinpeng87
- zhongzc
- zhouqiang-cl
- zyguan
reviewers:
- 3AceShowHand
- 3pointer
- CalvinNeo
- ethercflow
- fredchenbj
- Fullstop000
- gozssky
- haojinming
- hbisheng
- HuSharp
- jayzhan211
- Jibbow
- JmPotato
- Leavrth
- lhy1024
- longfangsong
- lzmhhh123
- Mossaka
- MrCroxx
- nolouch
- rleungx
- Rustin170506
- tier-cap
- v01dstar
- wjhuang2016
- wshwsh12
- Xuanwo
4 changes: 4 additions & 0 deletions config/tikv.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ max-open-files = 10000

[raftdb]
max-open-files = 10000

[storage]
api-version = 2
enable-ttl = true
4 changes: 3 additions & 1 deletion examples/pessimistic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ async fn main() {
Config::default().with_security(ca, cert, key)
} else {
Config::default()
};
}
// This example uses the default keyspace, so api-v2 must be enabled on the server.
.with_default_keyspace();

// init
let client = Client::new_with_config(args.pd, config)
Expand Down
8 changes: 6 additions & 2 deletions examples/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ async fn main() -> Result<()> {
Config::default().with_security(ca, cert, key)
} else {
Config::default()
};
}
// This example uses the default keyspace, so api-v2 must be enabled on the server.
.with_default_keyspace();

// When we first create a client we receive a `Connect` structure which must be resolved before
// the client is actually connected and usable.
Expand Down Expand Up @@ -136,6 +138,8 @@ async fn main() -> Result<()> {
);
println!("Scanning batch scan from {batch_scan_keys:?} gives: {vals:?}");

// Cleanly exit.
// Delete all keys in the whole range.
client.delete_range("".to_owned().."".to_owned()).await?;

Ok(())
}
4 changes: 3 additions & 1 deletion examples/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ async fn main() {
Config::default().with_security(ca, cert, key)
} else {
Config::default()
};
}
// This example uses the default keyspace, so api-v2 must be enabled on the server.
.with_default_keyspace();

let txn = Client::new_with_config(args.pd, config)
.await
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
Loading