Skip to content

Commit d7e581e

Browse files
committed
*: re-vendor kvproto at b41e863 (2026-06-22) and record the vendored revision
The vendored protos were an unrecorded late-2023/early-2024 vintage (errorpb and pdpb untouched since #324, one hand-patched addition from #519). Nothing recorded which kvproto revision they came from, and the staleness now blocks real features. Re-vendor everything at pingcap/kvproto b41e86365ce0 — the revision client-go currently pins — and add proto/VERSION so the vintage is never again guesswork. Regenerated with the existing tonic-build pipeline (21 files). One mechanical source fix: pdpb.RequestHeader gained caller_component/caller_id, so the TSO stream's header construction now defaults the new fields. This commit is the re-vendor and nothing else. Newly available surface includes KvFlush / KvBufferBatchGet (pipelined DML), HealthFeedback, and pdpb.BatchScanRegions. Two new protocol semantics become VISIBLE with the refresh — errorpb.UndeterminedResult (an unknown raft apply outcome) and shared locks (SharedLock / SharedPessimisticLock, whose real holders live in shared_lock_infos). Handling them is deliberately left to follow-up PRs so this one stays a pure re-vendor. Neither is a regression introduced here: - UndeterminedResult falls through to the generic region-error arm, which backs off and retries — the same default the follow-up keeps for every plan that is not a commit point. - A shared-lock wrapper carries no key bytes on the wire regardless of which proto vintage parses it, so the keyspace truncation hazard predates this commit; the refresh only makes the wrapper identifiable. Tests: make check green; 67 lib tests; txn/raw/failpoint integration suites green against a local api-v2 cluster. Signed-off-by: Eduard R. <eduard@ralphovi.net>
1 parent 2c0f2f3 commit d7e581e

59 files changed

Lines changed: 8931 additions & 4765 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

proto/VERSION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pingcap/kvproto b41e86365ce0e0fba482005c0dfa5e2ca967d74c (2026-06-22)
2+
Matches client-go v2.0.8-0.20260708122311-01bd8f99f4da (go.mod: kvproto v0.0.0-20260622063236-b41e86365ce0).
3+
Re-vendor: copy proto/*.proto (matching names only) and include/ from that revision, then `make generate`.

proto/autoid.proto

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,45 @@ package autoid;
44
import "gogoproto/gogo.proto";
55
import "rustproto.proto";
66

7-
option (gogoproto.sizer_all) = true;
7+
option java_package = "org.tikv.kvproto";
8+
option (gogoproto.goproto_sizecache_all) = false;
9+
option (gogoproto.goproto_unkeyed_all) = false;
10+
option (gogoproto.goproto_unrecognized_all) = false;
811
option (gogoproto.marshaler_all) = true;
12+
option (gogoproto.sizer_all) = true;
913
option (gogoproto.unmarshaler_all) = true;
1014
option (rustproto.lite_runtime_all) = true;
1115

12-
option java_package = "org.tikv.kvproto";
13-
1416
message AutoIDRequest {
15-
int64 dbID = 1;
16-
int64 tblID = 2;
17-
bool isUnsigned = 3;
18-
uint64 n = 4;
19-
int64 increment = 5;
20-
int64 offset = 6;
21-
uint32 keyspaceID = 7;
17+
int64 dbID = 1;
18+
int64 tblID = 2;
19+
bool isUnsigned = 3;
20+
uint64 n = 4;
21+
int64 increment = 5;
22+
int64 offset = 6;
23+
uint32 keyspaceID = 7;
2224
}
2325

2426
message AutoIDResponse {
25-
int64 min = 1;
26-
int64 max = 2;
27+
int64 min = 1;
28+
int64 max = 2;
2729

28-
bytes errmsg = 3;
30+
bytes errmsg = 3;
2931
}
3032

3133
message RebaseRequest {
32-
int64 dbID = 1;
33-
int64 tblID = 2;
34-
bool isUnsigned = 3;
35-
int64 base = 4;
36-
bool force = 5;
34+
int64 dbID = 1;
35+
int64 tblID = 2;
36+
bool isUnsigned = 3;
37+
int64 base = 4;
38+
bool force = 5;
3739
}
3840

3941
message RebaseResponse {
40-
bytes errmsg = 1;
42+
bytes errmsg = 1;
4143
}
4244

4345
service AutoIDAlloc {
44-
rpc AllocAutoID(AutoIDRequest) returns (AutoIDResponse) {}
45-
rpc Rebase(RebaseRequest) returns (RebaseResponse) {}
46+
rpc AllocAutoID(AutoIDRequest) returns (AutoIDResponse) {}
47+
rpc Rebase(RebaseRequest) returns (RebaseResponse) {}
4648
}
47-

0 commit comments

Comments
 (0)