Skip to content

Commit

Permalink
store/tikv: fix typo (#23269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahacad authored Mar 12, 2021
1 parent 6b69883 commit b578af4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions store/tikv/tikvrpc/tikvrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ type Request struct {
Type CmdType
Req interface{}
kvrpcpb.Context
ReplicaReadType kv.ReplicaReadType // dirrerent from `kvrpcpb.Context.ReplicaRead`
ReplicaReadType kv.ReplicaReadType // different from `kvrpcpb.Context.ReplicaRead`
ReplicaReadSeed *uint32 // pointer to follower read seed in snapshot/coprocessor
StoreTp kv.StoreType
}
Expand Down Expand Up @@ -337,7 +337,7 @@ func (req *Request) DispatchMPPTask() *mpp.DispatchTaskRequest {
return req.Req.(*mpp.DispatchTaskRequest)
}

// EstablishMPPConn returns stablishMPPConnectionRequest in request.
// EstablishMPPConn returns EstablishMPPConnectionRequest in request.
func (req *Request) EstablishMPPConn() *mpp.EstablishMPPConnectionRequest {
return req.Req.(*mpp.EstablishMPPConnectionRequest)
}
Expand Down Expand Up @@ -539,7 +539,7 @@ func FromBatchCommandsResponse(res *tikvpb.BatchCommandsResponse_Response) (*Res
panic("unreachable")
}

// CopStreamResponse combinates tikvpb.Tikv_CoprocessorStreamClient and the first Recv() result together.
// CopStreamResponse combines tikvpb.Tikv_CoprocessorStreamClient and the first Recv() result together.
// In streaming API, get grpc stream client may not involve any network packet, then region error have
// to be handled in Recv() function. This struct facilitates the error handling.
type CopStreamResponse struct {
Expand Down Expand Up @@ -811,7 +811,7 @@ func (resp *Response) GetRegionError() (*errorpb.Error, error) {
}

// CallRPC launches a rpc call.
// ch is needed to implement timeout for coprocessor streaing, the stream object's
// ch is needed to implement timeout for coprocessor streaming, the stream object's
// cancel function will be sent to the channel, together with a lease checked by a background goroutine.
func CallRPC(ctx context.Context, client tikvpb.TikvClient, req *Request) (*Response, error) {
resp := &Response{}
Expand Down Expand Up @@ -999,7 +999,7 @@ func (resp *MPPStreamResponse) Close() {
}
}

// CheckStreamTimeoutLoop runs periodically to check is there any stream request timeouted.
// CheckStreamTimeoutLoop runs periodically to check is there any stream request timed out.
// Lease is an object to track stream requests, call this function with "go CheckStreamTimeoutLoop()"
// It is not guaranteed to call every Lease.Cancel() putting into channel when exits.
// If grpc-go supports SetDeadline(https://github.com/grpc/grpc-go/issues/2917), we can stop using this method.
Expand Down

0 comments on commit b578af4

Please sign in to comment.