@@ -2,6 +2,7 @@ syntax = "proto3";
22package tikvpb ;
33
44import "coprocessor.proto" ;
5+ import "coprocessor_v2.proto" ;
56import "kvrpcpb.proto" ;
67import "mpp.proto" ;
78import "raft_serverpb.proto" ;
@@ -69,6 +70,9 @@ service Tikv {
6970 rpc CoprocessorStream (coprocessor .Request ) returns (stream coprocessor .Response ) {}
7071 rpc BatchCoprocessor (coprocessor .BatchRequest ) returns (stream coprocessor .BatchResponse ) {}
7172
73+ // Command for executing custom user requests in TiKV coprocessor_v2.
74+ rpc CoprocessorV2 (coprocessor_v2 .RawCoprocessorRequest ) returns (coprocessor_v2 .RawCoprocessorResponse ) {}
75+
7276 // Raft commands (sent between TiKV nodes).
7377 rpc Raft (stream raft_serverpb .RaftMessage ) returns (raft_serverpb .Done ) {}
7478 rpc BatchRaft (stream BatchRaftMessage ) returns (raft_serverpb .Done ) {}
@@ -92,7 +96,7 @@ service Tikv {
9296 rpc EstablishMPPConnection (mpp .EstablishMPPConnectionRequest ) returns (stream mpp .MPPDataPacket ) {}
9397
9498 /// CheckLeader sends all information (includes region term and epoch) to other stores.
95- /// Once a store receives a request, it checks term and epoch for each region, and sends the regions whose
99+ /// Once a store receives a request, it checks term and epoch for each region, and sends the regions whose
96100 /// term and epoch match with local information in the store.
97101 /// After the client collected all responses from all stores, it checks if got a quorum of responses from
98102 /// other stores for every region, and decides to advance resolved ts from these regions.
@@ -144,6 +148,8 @@ message BatchCommandsRequest {
144148
145149 kvrpcpb.CheckSecondaryLocksRequest CheckSecondaryLocks = 33 ;
146150
151+ coprocessor_v2.RawCoprocessorRequest CoprocessorV2 = 34 ;
152+
147153 // For some test cases.
148154 BatchCommandsEmptyRequest Empty = 255 ;
149155 }
@@ -197,6 +203,8 @@ message BatchCommandsResponse {
197203
198204 kvrpcpb.CheckSecondaryLocksResponse CheckSecondaryLocks = 33 ;
199205
206+ coprocessor_v2.RawCoprocessorResponse CoprocessorV2 = 34 ;
207+
200208 // For some test cases.
201209 BatchCommandsEmptyResponse Empty = 255 ;
202210 }
0 commit comments