diff --git a/go/mysql/conn.go b/go/mysql/conn.go index 57ababf4762..fe9f736b593 100644 --- a/go/mysql/conn.go +++ b/go/mysql/conn.go @@ -775,6 +775,7 @@ func (c *Conn) handleNextCommand(handler Handler) error { switch data[0] { case ComQuit: + // TODO(systay): send a message through to all shards to clean up c.recycleReadPacket() return errors.New("ComQuit") case ComInitDB: diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index cd029d6e0a5..7d0d9d82f70 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -1360,6 +1360,7 @@ type ExecuteRequest struct { Query *BoundQuery `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` TransactionId int64 `protobuf:"varint,5,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` Options *ExecuteOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` + ReservedId int64 `protobuf:"varint,7,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1432,6 +1433,13 @@ func (m *ExecuteRequest) GetOptions() *ExecuteOptions { return nil } +func (m *ExecuteRequest) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + // ExecuteResponse is the returned value from Execute type ExecuteResponse struct { Result *QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` @@ -2899,6 +2907,7 @@ type BeginExecuteRequest struct { Target *Target `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` Query *BoundQuery `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` Options *ExecuteOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` + ReservedId int64 `protobuf:"varint,6,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2964,6 +2973,13 @@ func (m *BeginExecuteRequest) GetOptions() *ExecuteOptions { return nil } +func (m *BeginExecuteRequest) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + // BeginExecuteResponse is the returned value from BeginExecute type BeginExecuteResponse struct { // error contains an application level error if necessary. Note the @@ -3401,6 +3417,426 @@ func (m *MessageAckResponse) GetResult() *QueryResult { return nil } +// ReserveExecuteRequest is the payload to ReserveExecute +type ReserveExecuteRequest struct { + EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId,proto3" json:"effective_caller_id,omitempty"` + ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId,proto3" json:"immediate_caller_id,omitempty"` + Target *Target `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + Query *BoundQuery `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` + TransactionId int64 `protobuf:"varint,5,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Options *ExecuteOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` + PreQueries []string `protobuf:"bytes,7,rep,name=pre_queries,json=preQueries,proto3" json:"pre_queries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveExecuteRequest) Reset() { *m = ReserveExecuteRequest{} } +func (m *ReserveExecuteRequest) String() string { return proto.CompactTextString(m) } +func (*ReserveExecuteRequest) ProtoMessage() {} +func (*ReserveExecuteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{49} +} + +func (m *ReserveExecuteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveExecuteRequest.Unmarshal(m, b) +} +func (m *ReserveExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveExecuteRequest.Marshal(b, m, deterministic) +} +func (m *ReserveExecuteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveExecuteRequest.Merge(m, src) +} +func (m *ReserveExecuteRequest) XXX_Size() int { + return xxx_messageInfo_ReserveExecuteRequest.Size(m) +} +func (m *ReserveExecuteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveExecuteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveExecuteRequest proto.InternalMessageInfo + +func (m *ReserveExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { + if m != nil { + return m.EffectiveCallerId + } + return nil +} + +func (m *ReserveExecuteRequest) GetImmediateCallerId() *VTGateCallerID { + if m != nil { + return m.ImmediateCallerId + } + return nil +} + +func (m *ReserveExecuteRequest) GetTarget() *Target { + if m != nil { + return m.Target + } + return nil +} + +func (m *ReserveExecuteRequest) GetQuery() *BoundQuery { + if m != nil { + return m.Query + } + return nil +} + +func (m *ReserveExecuteRequest) GetTransactionId() int64 { + if m != nil { + return m.TransactionId + } + return 0 +} + +func (m *ReserveExecuteRequest) GetOptions() *ExecuteOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *ReserveExecuteRequest) GetPreQueries() []string { + if m != nil { + return m.PreQueries + } + return nil +} + +// ReserveExecuteResponse is the returned value from ReserveExecute +type ReserveExecuteResponse struct { + Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Result *QueryResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + ReservedId int64 `protobuf:"varint,3,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` + TabletAlias *topodata.TabletAlias `protobuf:"bytes,4,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveExecuteResponse) Reset() { *m = ReserveExecuteResponse{} } +func (m *ReserveExecuteResponse) String() string { return proto.CompactTextString(m) } +func (*ReserveExecuteResponse) ProtoMessage() {} +func (*ReserveExecuteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{50} +} + +func (m *ReserveExecuteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveExecuteResponse.Unmarshal(m, b) +} +func (m *ReserveExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveExecuteResponse.Marshal(b, m, deterministic) +} +func (m *ReserveExecuteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveExecuteResponse.Merge(m, src) +} +func (m *ReserveExecuteResponse) XXX_Size() int { + return xxx_messageInfo_ReserveExecuteResponse.Size(m) +} +func (m *ReserveExecuteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveExecuteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveExecuteResponse proto.InternalMessageInfo + +func (m *ReserveExecuteResponse) GetError() *vtrpc.RPCError { + if m != nil { + return m.Error + } + return nil +} + +func (m *ReserveExecuteResponse) GetResult() *QueryResult { + if m != nil { + return m.Result + } + return nil +} + +func (m *ReserveExecuteResponse) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + +func (m *ReserveExecuteResponse) GetTabletAlias() *topodata.TabletAlias { + if m != nil { + return m.TabletAlias + } + return nil +} + +// ReserveBeginExecuteRequest is the payload to ReserveBeginExecute +type ReserveBeginExecuteRequest struct { + EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId,proto3" json:"effective_caller_id,omitempty"` + ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId,proto3" json:"immediate_caller_id,omitempty"` + Target *Target `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + Query *BoundQuery `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` + Options *ExecuteOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` + PreQueries []string `protobuf:"bytes,6,rep,name=pre_queries,json=preQueries,proto3" json:"pre_queries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveBeginExecuteRequest) Reset() { *m = ReserveBeginExecuteRequest{} } +func (m *ReserveBeginExecuteRequest) String() string { return proto.CompactTextString(m) } +func (*ReserveBeginExecuteRequest) ProtoMessage() {} +func (*ReserveBeginExecuteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{51} +} + +func (m *ReserveBeginExecuteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveBeginExecuteRequest.Unmarshal(m, b) +} +func (m *ReserveBeginExecuteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveBeginExecuteRequest.Marshal(b, m, deterministic) +} +func (m *ReserveBeginExecuteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveBeginExecuteRequest.Merge(m, src) +} +func (m *ReserveBeginExecuteRequest) XXX_Size() int { + return xxx_messageInfo_ReserveBeginExecuteRequest.Size(m) +} +func (m *ReserveBeginExecuteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveBeginExecuteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveBeginExecuteRequest proto.InternalMessageInfo + +func (m *ReserveBeginExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID { + if m != nil { + return m.EffectiveCallerId + } + return nil +} + +func (m *ReserveBeginExecuteRequest) GetImmediateCallerId() *VTGateCallerID { + if m != nil { + return m.ImmediateCallerId + } + return nil +} + +func (m *ReserveBeginExecuteRequest) GetTarget() *Target { + if m != nil { + return m.Target + } + return nil +} + +func (m *ReserveBeginExecuteRequest) GetQuery() *BoundQuery { + if m != nil { + return m.Query + } + return nil +} + +func (m *ReserveBeginExecuteRequest) GetOptions() *ExecuteOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *ReserveBeginExecuteRequest) GetPreQueries() []string { + if m != nil { + return m.PreQueries + } + return nil +} + +// ReserveBeginExecuteResponse is the returned value from ReserveBeginExecute +type ReserveBeginExecuteResponse struct { + // error contains an application level error if necessary. Note the + // transaction_id may be set, even when an error is returned, if the begin + // worked but the execute failed. + Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Result *QueryResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + // The following fields might be non-zero even if an error is present. + TransactionId int64 `protobuf:"varint,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + TabletAlias *topodata.TabletAlias `protobuf:"bytes,4,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` + ReservedId int64 `protobuf:"varint,5,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveBeginExecuteResponse) Reset() { *m = ReserveBeginExecuteResponse{} } +func (m *ReserveBeginExecuteResponse) String() string { return proto.CompactTextString(m) } +func (*ReserveBeginExecuteResponse) ProtoMessage() {} +func (*ReserveBeginExecuteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{52} +} + +func (m *ReserveBeginExecuteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveBeginExecuteResponse.Unmarshal(m, b) +} +func (m *ReserveBeginExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveBeginExecuteResponse.Marshal(b, m, deterministic) +} +func (m *ReserveBeginExecuteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveBeginExecuteResponse.Merge(m, src) +} +func (m *ReserveBeginExecuteResponse) XXX_Size() int { + return xxx_messageInfo_ReserveBeginExecuteResponse.Size(m) +} +func (m *ReserveBeginExecuteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveBeginExecuteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveBeginExecuteResponse proto.InternalMessageInfo + +func (m *ReserveBeginExecuteResponse) GetError() *vtrpc.RPCError { + if m != nil { + return m.Error + } + return nil +} + +func (m *ReserveBeginExecuteResponse) GetResult() *QueryResult { + if m != nil { + return m.Result + } + return nil +} + +func (m *ReserveBeginExecuteResponse) GetTransactionId() int64 { + if m != nil { + return m.TransactionId + } + return 0 +} + +func (m *ReserveBeginExecuteResponse) GetTabletAlias() *topodata.TabletAlias { + if m != nil { + return m.TabletAlias + } + return nil +} + +func (m *ReserveBeginExecuteResponse) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + +// ReserveTransactionReleaseRequest is the payload to ReserveTransactionRelease +type ReserveTransactionReleaseRequest struct { + EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id,json=effectiveCallerId,proto3" json:"effective_caller_id,omitempty"` + ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id,json=immediateCallerId,proto3" json:"immediate_caller_id,omitempty"` + Target *Target `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + TransactionId int64 `protobuf:"varint,4,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + ReservedId int64 `protobuf:"varint,5,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveTransactionReleaseRequest) Reset() { *m = ReserveTransactionReleaseRequest{} } +func (m *ReserveTransactionReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*ReserveTransactionReleaseRequest) ProtoMessage() {} +func (*ReserveTransactionReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{53} +} + +func (m *ReserveTransactionReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveTransactionReleaseRequest.Unmarshal(m, b) +} +func (m *ReserveTransactionReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveTransactionReleaseRequest.Marshal(b, m, deterministic) +} +func (m *ReserveTransactionReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveTransactionReleaseRequest.Merge(m, src) +} +func (m *ReserveTransactionReleaseRequest) XXX_Size() int { + return xxx_messageInfo_ReserveTransactionReleaseRequest.Size(m) +} +func (m *ReserveTransactionReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveTransactionReleaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveTransactionReleaseRequest proto.InternalMessageInfo + +func (m *ReserveTransactionReleaseRequest) GetEffectiveCallerId() *vtrpc.CallerID { + if m != nil { + return m.EffectiveCallerId + } + return nil +} + +func (m *ReserveTransactionReleaseRequest) GetImmediateCallerId() *VTGateCallerID { + if m != nil { + return m.ImmediateCallerId + } + return nil +} + +func (m *ReserveTransactionReleaseRequest) GetTarget() *Target { + if m != nil { + return m.Target + } + return nil +} + +func (m *ReserveTransactionReleaseRequest) GetTransactionId() int64 { + if m != nil { + return m.TransactionId + } + return 0 +} + +func (m *ReserveTransactionReleaseRequest) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + +// ReserveTransactionReleaseResponse is the returned value from ReserveTransactionRelease +type ReserveTransactionReleaseResponse struct { + Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReserveTransactionReleaseResponse) Reset() { *m = ReserveTransactionReleaseResponse{} } +func (m *ReserveTransactionReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*ReserveTransactionReleaseResponse) ProtoMessage() {} +func (*ReserveTransactionReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{54} +} + +func (m *ReserveTransactionReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReserveTransactionReleaseResponse.Unmarshal(m, b) +} +func (m *ReserveTransactionReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReserveTransactionReleaseResponse.Marshal(b, m, deterministic) +} +func (m *ReserveTransactionReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReserveTransactionReleaseResponse.Merge(m, src) +} +func (m *ReserveTransactionReleaseResponse) XXX_Size() int { + return xxx_messageInfo_ReserveTransactionReleaseResponse.Size(m) +} +func (m *ReserveTransactionReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReserveTransactionReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReserveTransactionReleaseResponse proto.InternalMessageInfo + +func (m *ReserveTransactionReleaseResponse) GetError() *vtrpc.RPCError { + if m != nil { + return m.Error + } + return nil +} + // StreamHealthRequest is the payload for StreamHealth type StreamHealthRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -3412,7 +3848,7 @@ func (m *StreamHealthRequest) Reset() { *m = StreamHealthRequest{} } func (m *StreamHealthRequest) String() string { return proto.CompactTextString(m) } func (*StreamHealthRequest) ProtoMessage() {} func (*StreamHealthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{49} + return fileDescriptor_5c6ac9b241082464, []int{55} } func (m *StreamHealthRequest) XXX_Unmarshal(b []byte) error { @@ -3472,7 +3908,7 @@ func (m *RealtimeStats) Reset() { *m = RealtimeStats{} } func (m *RealtimeStats) String() string { return proto.CompactTextString(m) } func (*RealtimeStats) ProtoMessage() {} func (*RealtimeStats) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{50} + return fileDescriptor_5c6ac9b241082464, []int{56} } func (m *RealtimeStats) XXX_Unmarshal(b []byte) error { @@ -3561,7 +3997,7 @@ func (m *AggregateStats) Reset() { *m = AggregateStats{} } func (m *AggregateStats) String() string { return proto.CompactTextString(m) } func (*AggregateStats) ProtoMessage() {} func (*AggregateStats) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{51} + return fileDescriptor_5c6ac9b241082464, []int{57} } func (m *AggregateStats) XXX_Unmarshal(b []byte) error { @@ -3667,7 +4103,7 @@ func (m *StreamHealthResponse) Reset() { *m = StreamHealthResponse{} } func (m *StreamHealthResponse) String() string { return proto.CompactTextString(m) } func (*StreamHealthResponse) ProtoMessage() {} func (*StreamHealthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{52} + return fileDescriptor_5c6ac9b241082464, []int{58} } func (m *StreamHealthResponse) XXX_Unmarshal(b []byte) error { @@ -3738,7 +4174,7 @@ func (m *TransactionMetadata) Reset() { *m = TransactionMetadata{} } func (m *TransactionMetadata) String() string { return proto.CompactTextString(m) } func (*TransactionMetadata) ProtoMessage() {} func (*TransactionMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{53} + return fileDescriptor_5c6ac9b241082464, []int{59} } func (m *TransactionMetadata) XXX_Unmarshal(b []byte) error { @@ -3847,6 +4283,12 @@ func init() { proto.RegisterType((*MessageStreamResponse)(nil), "query.MessageStreamResponse") proto.RegisterType((*MessageAckRequest)(nil), "query.MessageAckRequest") proto.RegisterType((*MessageAckResponse)(nil), "query.MessageAckResponse") + proto.RegisterType((*ReserveExecuteRequest)(nil), "query.ReserveExecuteRequest") + proto.RegisterType((*ReserveExecuteResponse)(nil), "query.ReserveExecuteResponse") + proto.RegisterType((*ReserveBeginExecuteRequest)(nil), "query.ReserveBeginExecuteRequest") + proto.RegisterType((*ReserveBeginExecuteResponse)(nil), "query.ReserveBeginExecuteResponse") + proto.RegisterType((*ReserveTransactionReleaseRequest)(nil), "query.ReserveTransactionReleaseRequest") + proto.RegisterType((*ReserveTransactionReleaseResponse)(nil), "query.ReserveTransactionReleaseResponse") proto.RegisterType((*StreamHealthRequest)(nil), "query.StreamHealthRequest") proto.RegisterType((*RealtimeStats)(nil), "query.RealtimeStats") proto.RegisterType((*AggregateStats)(nil), "query.AggregateStats") @@ -3857,193 +4299,201 @@ func init() { func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } var fileDescriptor_5c6ac9b241082464 = []byte{ - // 2996 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x49, 0x70, 0x1b, 0xc7, - 0xb9, 0xd6, 0x60, 0x23, 0xf0, 0x83, 0x00, 0x9b, 0x4d, 0x52, 0x82, 0x28, 0x2f, 0xf4, 0xd8, 0xb2, - 0xf9, 0xf8, 0xde, 0xa3, 0x64, 0x4a, 0x56, 0x14, 0xdb, 0x49, 0x34, 0x04, 0x87, 0x32, 0x24, 0x60, - 0x00, 0x35, 0x06, 0x92, 0xa5, 0x4a, 0xd5, 0xd4, 0x10, 0x68, 0x81, 0x53, 0x1c, 0x60, 0xa0, 0x99, - 0x21, 0x25, 0xde, 0x94, 0x38, 0xce, 0xbe, 0x38, 0xab, 0xe3, 0xb8, 0xe2, 0x4a, 0x55, 0x0e, 0xa9, - 0x5c, 0x72, 0xce, 0x31, 0x95, 0x43, 0x0e, 0x39, 0xa4, 0x2a, 0xc7, 0x24, 0x87, 0x9c, 0x52, 0xb9, - 0xb9, 0x72, 0xca, 0x21, 0x87, 0x54, 0xaa, 0x97, 0x19, 0x00, 0x24, 0x2c, 0xc9, 0x4a, 0x72, 0x90, - 0xec, 0x5b, 0xff, 0x4b, 0x2f, 0xdf, 0xd7, 0x7f, 0xff, 0xbd, 0xcc, 0x40, 0xfe, 0xd6, 0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 0x10, 0x53, 0x36, 0x75, 0x13, 0xbd, 0xcb, - 0x94, 0x69, 0xb3, 0xd5, 0xa8, 0xea, 0xe8, 0x09, 0x36, 0xb8, 0x8b, 0x7a, 0xbd, 0xa6, 0x9b, 0xe4, - 0x3a, 0xfa, 0x31, 0x77, 0xbf, 0xd4, 0xac, 0x1b, 0xe8, 0x3d, 0x84, 0x8b, 0x00, 0xfa, 0xeb, 0x0d, - 0xa2, 0x37, 0x9b, 0x95, 0xba, 0x81, 0x9e, 0x5e, 0xd9, 0x04, 0x74, 0x30, 0x1d, 0x30, 0x00, 0x2d, - 0xe3, 0xb2, 0x51, 0xbf, 0x66, 0xa0, 0x23, 0x4c, 0x68, 0x10, 0xbd, 0xa1, 0x11, 0x1d, 0x29, 0x18, - 0x20, 0x23, 0x7f, 0xbd, 0x49, 0xe0, 0x69, 0xc8, 0x92, 0x7a, 0xb5, 0xba, 0xae, 0x95, 0x2f, 0xa3, - 0xe4, 0xfa, 0x4b, 0x30, 0xe3, 0x78, 0xab, 0x7b, 0x4e, 0x48, 0x83, 0x40, 0xfc, 0xe2, 0x78, 0x43, - 0x95, 0x92, 0xe3, 0x9d, 0x12, 0xa5, 0x53, 0x5d, 0xef, 0xd4, 0x5e, 0x78, 0x8a, 0x5b, 0x4f, 0xf1, - 0x8c, 0xb1, 0x95, 0xe1, 0xc2, 0x99, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xa2, 0x63, 0xc8, - 0x40, 0x29, 0x00, 0x00, + // 3133 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4b, 0x70, 0x1b, 0x47, + 0x7a, 0xd6, 0xe0, 0x45, 0xe0, 0x07, 0x01, 0x36, 0x9b, 0xa4, 0x04, 0x51, 0x7e, 0xd0, 0x63, 0xcb, + 0x66, 0x98, 0x84, 0x92, 0x29, 0x59, 0x51, 0x6c, 0x27,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a/go/vt/proto/queryservice/queryservice.pb.go b/go/vt/proto/queryservice/queryservice.pb.go index 822d6ddd6d4..d3d0eb20903 100644 --- a/go/vt/proto/queryservice/queryservice.pb.go +++ b/go/vt/proto/queryservice/queryservice.pb.go @@ -30,42 +30,45 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("queryservice.proto", fileDescriptor_4bd2dde8711f22e3) } var fileDescriptor_4bd2dde8711f22e3 = []byte{ - // 554 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x95, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x86, 0xe1, 0xd0, 0x06, 0x4d, 0xd2, 0x52, 0xb6, 0x14, 0xa8, 0x53, 0xd2, 0x8f, 0x1b, 0x42, - 0x4a, 0x10, 0x20, 0x21, 0x55, 0xe2, 0xd0, 0x44, 0x54, 0x20, 0xc4, 0x57, 0x0a, 0x15, 0x02, 0x09, - 0x69, 0xe3, 0x8c, 0x82, 0x55, 0xc7, 0x9b, 0x7a, 0xd7, 0x29, 0xfc, 0x09, 0x7e, 0x33, 0xaa, 0xed, - 0x19, 0xef, 0x6e, 0xec, 0xde, 0xb2, 0xef, 0x3b, 0xf3, 0x64, 0xbc, 0xe3, 0x19, 0x83, 0xb8, 0xcc, - 0x30, 0xfd, 0xab, 0x31, 0x5d, 0x46, 0x21, 0xf6, 0x17, 0xa9, 0x32, 0x4a, 0x74, 0x6c, 0x2d, 0x68, - 0xe7, 0xa7, 0xc2, 0x0a, 0xb6, 0x26, 0x51, 0x12, 0xab, 0xd9, 0x54, 0x1a, 0x59, 0x28, 0xcf, 0xff, - 0x6d, 0xc0, 0xda, 0x97, 0xeb, 0x08, 0x71, 0x0c, 0xad, 0x37, 0x7f, 0x30, 0xcc, 0x0c, 0x8a, 0x9d, - 0x7e, 0x91, 0x54, 0x9e, 0xc7, 0x78, 0x99, 0xa1, 0x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, 0xfa, 0x32, 0xae, 0xbd, 0xea, 0x8d, 0xbe, 0x21, 0xa4, 0x82, 0x0f, 0x9f, - 0xfe, 0x78, 0xb2, 0x8c, 0x0c, 0x6a, 0xdd, 0x8f, 0xd4, 0xa0, 0xf8, 0x35, 0x98, 0xa9, 0xc1, 0xd2, - 0x0c, 0xf2, 0x0f, 0xd6, 0xc0, 0xfe, 0xb8, 0x4d, 0xd6, 0x73, 0xed, 0xc5, 0xff, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x16, 0x79, 0x9a, 0xc3, 0x07, 0x07, 0x00, 0x00, + // 608 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0x5d, 0x6f, 0xd3, 0x30, + 0x14, 0x85, 0x87, 0xad, 0xe8, 0xb6, 0x6c, 0xc3, 0x63, 0x40, 0xd3, 0xd2, 0xad, 0x7d, 0x01, 0x84, + 0xd4, 0x22, 0x40, 0x42, 0x9a, 0xc4, 0xc3, 0x5a, 0x31, 0x81, 0x10, 0x5f, 0x19, 0x4c, 0x08, 0x24, + 0x24, 0x37, 0xbd, 0x2a, 0xd1, 0xd2, 0xb8, 0x8b, 0xdd, 0x0e, 0x7e, 0x16, 0xff, 0x10, 0x35, 0xc9, + 0x75, 0x6c, 0x37, 0xe9, 0xde, 0xea, 0x73, 0xce, 0x3d, 0x71, 0x7d, 0x7c, 0xaf, 0x81, 0x5d, 0x2e, + 0x30, 0xf9, 0x2b, 0x31, 0x59, 0x86, 0x01, 0xf6, 0xe7, 0x89, 0x50, 0x82, 0x35, 0x4c, 0xcc, 0xab, + 0xa7, 0xab, 0x8c, 0xf2, 0xf6, 0xc6, 0x61, 0x1c, 0x89, 0xe9, 0x84, 0x2b, 0x9e, 0x21, 0xcf, 0xff, + 0xed, 0xc2, 0xd6, 0x97, 0x95, 0x82, 0x1d, 0x43, 0xed, 0xcd, 0x1f, 0x0c, 0x16, 0x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xaf, 0x17, 0xea, 0x2f, 0xbe, 0x87, 0x46, + 0x76, 0xfa, 0x6f, 0x91, 0x47, 0xaa, 0x78, 0x27, 0x4c, 0xd0, 0xbd, 0x5c, 0x36, 0x67, 0x84, 0x76, + 0x0a, 0xb5, 0xf3, 0x3c, 0x7e, 0xaf, 0x6f, 0x3c, 0x6c, 0xe7, 0x76, 0xfa, 0xad, 0x52, 0xce, 0xf0, + 0xf1, 0xa1, 0x4e, 0xb0, 0xb8, 0x92, 0xac, 0x53, 0xa6, 0x17, 0x57, 0xb2, 0x98, 0x70, 0x55, 0xbc, + 0xe1, 0xf9, 0x13, 0x76, 0x8a, 0x4f, 0x2d, 0x22, 0x25, 0x59, 0xb7, 0x7c, 0x1b, 0x2b, 0xae, 0x48, + 0x6d, 0x83, 0xa4, 0x30, 0x1f, 0x3e, 0xfd, 0xf1, 0x64, 0x19, 0x2a, 0x94, 0xb2, 0x1f, 0x8a, 0x41, + 0xf6, 0x6b, 0x30, 0x15, 0x83, 0xa5, 0x1a, 0xa4, 0x6f, 0xfa, 0xc0, 0x7c, 0xff, 0xc7, 0xdb, 0x29, + 0xf6, 0xe2, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xc5, 0x39, 0x97, 0x2a, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -121,6 +124,9 @@ type QueryClient interface { MessageStream(ctx context.Context, in *query.MessageStreamRequest, opts ...grpc.CallOption) (Query_MessageStreamClient, error) // MessageAck acks messages for a table. MessageAck(ctx context.Context, in *query.MessageAckRequest, opts ...grpc.CallOption) (*query.MessageAckResponse, error) + ReserveExecute(ctx context.Context, in *query.ReserveExecuteRequest, opts ...grpc.CallOption) (*query.ReserveExecuteResponse, error) + ReserveBeginExecute(ctx context.Context, in *query.ReserveBeginExecuteRequest, opts ...grpc.CallOption) (*query.ReserveBeginExecuteResponse, error) + ReserveTransactionRelease(ctx context.Context, in *query.ReserveTransactionReleaseRequest, opts ...grpc.CallOption) (*query.ReserveTransactionReleaseResponse, error) // StreamHealth runs a streaming RPC to the tablet, that returns the // current health of the tablet on a regular basis. StreamHealth(ctx context.Context, in *query.StreamHealthRequest, opts ...grpc.CallOption) (Query_StreamHealthClient, error) @@ -348,6 +354,33 @@ func (c *queryClient) MessageAck(ctx context.Context, in *query.MessageAckReques return out, nil } +func (c *queryClient) ReserveExecute(ctx context.Context, in *query.ReserveExecuteRequest, opts ...grpc.CallOption) (*query.ReserveExecuteResponse, error) { + out := new(query.ReserveExecuteResponse) + err := c.cc.Invoke(ctx, "/queryservice.Query/ReserveExecute", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ReserveBeginExecute(ctx context.Context, in *query.ReserveBeginExecuteRequest, opts ...grpc.CallOption) (*query.ReserveBeginExecuteResponse, error) { + out := new(query.ReserveBeginExecuteResponse) + err := c.cc.Invoke(ctx, "/queryservice.Query/ReserveBeginExecute", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ReserveTransactionRelease(ctx context.Context, in *query.ReserveTransactionReleaseRequest, opts ...grpc.CallOption) (*query.ReserveTransactionReleaseResponse, error) { + out := new(query.ReserveTransactionReleaseResponse) + err := c.cc.Invoke(ctx, "/queryservice.Query/ReserveTransactionRelease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) StreamHealth(ctx context.Context, in *query.StreamHealthRequest, opts ...grpc.CallOption) (Query_StreamHealthClient, error) { stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/queryservice.Query/StreamHealth", opts...) if err != nil { @@ -519,6 +552,9 @@ type QueryServer interface { MessageStream(*query.MessageStreamRequest, Query_MessageStreamServer) error // MessageAck acks messages for a table. MessageAck(context.Context, *query.MessageAckRequest) (*query.MessageAckResponse, error) + ReserveExecute(context.Context, *query.ReserveExecuteRequest) (*query.ReserveExecuteResponse, error) + ReserveBeginExecute(context.Context, *query.ReserveBeginExecuteRequest) (*query.ReserveBeginExecuteResponse, error) + ReserveTransactionRelease(context.Context, *query.ReserveTransactionReleaseRequest) (*query.ReserveTransactionReleaseResponse, error) // StreamHealth runs a streaming RPC to the tablet, that returns the // current health of the tablet on a regular basis. StreamHealth(*query.StreamHealthRequest, Query_StreamHealthServer) error @@ -588,6 +624,15 @@ func (*UnimplementedQueryServer) MessageStream(req *query.MessageStreamRequest, func (*UnimplementedQueryServer) MessageAck(ctx context.Context, req *query.MessageAckRequest) (*query.MessageAckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MessageAck not implemented") } +func (*UnimplementedQueryServer) ReserveExecute(ctx context.Context, req *query.ReserveExecuteRequest) (*query.ReserveExecuteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReserveExecute not implemented") +} +func (*UnimplementedQueryServer) ReserveBeginExecute(ctx context.Context, req *query.ReserveBeginExecuteRequest) (*query.ReserveBeginExecuteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReserveBeginExecute not implemented") +} +func (*UnimplementedQueryServer) ReserveTransactionRelease(ctx context.Context, req *query.ReserveTransactionReleaseRequest) (*query.ReserveTransactionReleaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReserveTransactionRelease not implemented") +} func (*UnimplementedQueryServer) StreamHealth(req *query.StreamHealthRequest, srv Query_StreamHealthServer) error { return status.Errorf(codes.Unimplemented, "method StreamHealth not implemented") } @@ -935,6 +980,60 @@ func _Query_MessageAck_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_ReserveExecute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(query.ReserveExecuteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReserveExecute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/queryservice.Query/ReserveExecute", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReserveExecute(ctx, req.(*query.ReserveExecuteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ReserveBeginExecute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(query.ReserveBeginExecuteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReserveBeginExecute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/queryservice.Query/ReserveBeginExecute", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReserveBeginExecute(ctx, req.(*query.ReserveBeginExecuteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ReserveTransactionRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(query.ReserveTransactionReleaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReserveTransactionRelease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/queryservice.Query/ReserveTransactionRelease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReserveTransactionRelease(ctx, req.(*query.ReserveTransactionReleaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_StreamHealth_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(query.StreamHealthRequest) if err := stream.RecvMsg(m); err != nil { @@ -1087,6 +1186,18 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "MessageAck", Handler: _Query_MessageAck_Handler, }, + { + MethodName: "ReserveExecute", + Handler: _Query_ReserveExecute_Handler, + }, + { + MethodName: "ReserveBeginExecute", + Handler: _Query_ReserveBeginExecute_Handler, + }, + { + MethodName: "ReserveTransactionRelease", + Handler: _Query_ReserveTransactionRelease_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index 5e23cf2aab6..c73627f3a04 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -114,11 +114,6 @@ type Session struct { InTransaction bool `protobuf:"varint,1,opt,name=in_transaction,json=inTransaction,proto3" json:"in_transaction,omitempty"` // shard_sessions keep track of per-shard transaction info. ShardSessions []*Session_ShardSession `protobuf:"bytes,2,rep,name=shard_sessions,json=shardSessions,proto3" json:"shard_sessions,omitempty"` - // single_db is deprecated. Use transaction_mode instead. - // The value specifies if the transaction should be restricted - // to a single shard. - // TODO(sougou): remove in 3.1 - SingleDb bool `protobuf:"varint,3,opt,name=single_db,json=singleDb,proto3" json:"single_db,omitempty"` // autocommit specifies if the session is in autocommit mode. // This is used only for V3. Autocommit bool `protobuf:"varint,4,opt,name=autocommit,proto3" json:"autocommit,omitempty"` @@ -191,13 +186,6 @@ func (m *Session) GetShardSessions() []*Session_ShardSession { return nil } -func (m *Session) GetSingleDb() bool { - if m != nil { - return m.SingleDb - } - return false -} - func (m *Session) GetAutocommit() bool { if m != nil { return m.Autocommit @@ -283,12 +271,14 @@ func (m *Session) GetRowCount() int64 { } type Session_ShardSession struct { - Target *query.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - TransactionId int64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` - TabletAlias *topodata.TabletAlias `protobuf:"bytes,3,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Target *query.Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + TransactionId int64 `protobuf:"varint,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + TabletAlias *topodata.TabletAlias `protobuf:"bytes,3,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` + // reserved connection if a dedicated connection is needed + ReservedId int64 `protobuf:"varint,4,opt,name=reserved_id,json=reservedId,proto3" json:"reserved_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Session_ShardSession) Reset() { *m = Session_ShardSession{} } @@ -337,6 +327,13 @@ func (m *Session_ShardSession) GetTabletAlias() *topodata.TabletAlias { return nil } +func (m *Session_ShardSession) GetReservedId() int64 { + if m != nil { + return m.ReservedId + } + return 0 +} + // ExecuteRequest is the payload to Execute. type ExecuteRequest struct { // caller_id identifies the caller. This is the effective caller ID, @@ -982,76 +979,77 @@ func init() { func init() { proto.RegisterFile("vtgate.proto", fileDescriptor_aab96496ceaf1ebb) } var fileDescriptor_aab96496ceaf1ebb = []byte{ - // 1133 bytes of a gzipped FileDescriptorProto + // 1140 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0xee, 0xfa, 0xdf, 0xc7, 0x7f, 0xcb, 0xd4, 0x2d, 0x5b, 0x53, 0x90, 0xe5, 0xb6, 0xaa, 0x13, - 0x90, 0x8d, 0x82, 0x40, 0x15, 0x02, 0xa1, 0xc4, 0x71, 0x2b, 0xa3, 0x24, 0x0e, 0x63, 0x27, 0x91, - 0x10, 0x68, 0xb5, 0xf1, 0x4e, 0x9c, 0x51, 0x9d, 0x9d, 0xed, 0xcc, 0xd8, 0xc1, 0x4f, 0xc1, 0x1d, - 0x17, 0xbc, 0x00, 0xef, 0xc2, 0x15, 0xbc, 0x11, 0x9a, 0x99, 0xb5, 0xbd, 0x31, 0x81, 0xa6, 0xa9, - 0x72, 0xb3, 0x9a, 0x73, 0xbe, 0x33, 0x67, 0xcf, 0x7c, 0xe7, 0x67, 0x06, 0x8a, 0x33, 0x39, 0xf6, - 0x24, 0x69, 0x85, 0x9c, 0x49, 0x86, 0x32, 0x46, 0xaa, 0xd9, 0xa7, 0x34, 0x98, 0xb0, 0xb1, 0xef, - 0x49, 0xcf, 0x20, 0xb5, 0xc2, 0x9b, 0x29, 0xe1, 0xf3, 0x48, 0x28, 0x4b, 0x16, 0xb2, 0x38, 0x38, - 0x93, 0x3c, 0x1c, 0x19, 0xa1, 0xf1, 0x57, 0x0e, 0xb2, 0x03, 0x22, 0x04, 0x65, 0x01, 0x7a, 0x06, - 0x65, 0x1a, 0xb8, 0x92, 0x7b, 0x81, 0xf0, 0x46, 0x92, 0xb2, 0xc0, 0xb1, 0xea, 0x56, 0x33, 0x87, - 0x4b, 0x34, 0x18, 0xae, 0x94, 0xa8, 0x03, 0x65, 0x71, 0xee, 0x71, 0xdf, 0x15, 0x66, 0x9f, 0x70, - 0x12, 0xf5, 0x64, 0xb3, 0xb0, 0xf5, 0xb8, 0x15, 0x45, 0x17, 0xf9, 0x6b, 0x0d, 0x94, 0x55, 0x24, - 0xe0, 0x92, 0x88, 0x49, 0x02, 0x7d, 0x04, 0x79, 0x41, 0x83, 0xf1, 0x84, 0xb8, 0xfe, 0xa9, 0x93, - 0xd4, 0xbf, 0xc9, 0x19, 0xc5, 0xee, 0x29, 0xfa, 0x04, 0xc0, 0x9b, 0x4a, 0x36, 0x62, 0x17, 0x17, - 0x54, 0x3a, 0x29, 0x8d, 0xc6, 0x34, 0xe8, 0x09, 0x94, 0xa4, 0xc7, 0xc7, 0x44, 0xba, 0x42, 0x72, - 0x1a, 0x8c, 0x9d, 0x74, 0xdd, 0x6a, 0xe6, 0x71, 0xd1, 0x28, 0x07, 0x5a, 0x87, 0xda, 0x90, 0x65, - 0xa1, 0xd4, 0xf1, 0x65, 0xea, 0x56, 0xb3, 0xb0, 0xf5, 0xa0, 0x65, 0x58, 0xe9, 0xfe, 0x42, 0x46, - 0x53, 0x49, 0xfa, 0x06, 0xc4, 0x0b, 0x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 0xac, 0xbd, 0x31, 0x81, 0xa6, + 0xa9, 0x72, 0xb3, 0x9a, 0xf3, 0x33, 0x67, 0xcf, 0xf9, 0xbe, 0x73, 0x66, 0x06, 0x8a, 0x73, 0x31, + 0xf6, 0x04, 0x69, 0x4d, 0x19, 0x15, 0x14, 0x65, 0xb4, 0x54, 0xb3, 0x4f, 0x82, 0x70, 0x42, 0xc7, + 0xbe, 0x27, 0x3c, 0x6d, 0xa9, 0x15, 0xde, 0xcc, 0x08, 0x5b, 0x18, 0xa1, 0x2c, 0xe8, 0x94, 0xc6, + 0x8d, 0x73, 0xc1, 0xa6, 0x23, 0x2d, 0x34, 0xfe, 0xce, 0x41, 0x76, 0x40, 0x38, 0x0f, 0x68, 0x88, + 0x9e, 0x40, 0x39, 0x08, 0x5d, 0xc1, 0xbc, 0x90, 0x7b, 0x23, 0x11, 0xd0, 0xd0, 0xb1, 0xea, 0x56, + 0x33, 0x87, 0x4b, 0x41, 0x38, 0x5c, 0x29, 0x51, 0x07, 0xca, 0xfc, 0xcc, 0x63, 0xbe, 0xcb, 0xf5, + 0x3e, 0xee, 0x24, 0xea, 0xc9, 0x66, 0x61, 0xf3, 0x61, 0xcb, 0x64, 0x67, 0xe2, 0xb5, 0x06, 0xd2, + 0xcb, 0x08, 0xb8, 0xc4, 0x63, 0x12, 0x47, 0x9f, 0x00, 0x78, 0x33, 0x41, 0x47, 0xf4, 0xfc, 0x3c, + 0x10, 0x4e, 0x4a, 0xfd, 0x27, 0xa6, 0x41, 0x8f, 0xa0, 0x24, 0x3c, 0x36, 0x26, 0xc2, 0xe5, 0x82, + 0x05, 0xe1, 0xd8, 0x49, 0xd7, 0xad, 0x66, 0x1e, 0x17, 0xb5, 0x72, 0xa0, 0x74, 0xa8, 0x0d, 0x59, + 0x3a, 0x15, 0x2a, 0x85, 0x4c, 0xdd, 0x6a, 0x16, 0x36, 0xef, 0xb5, 0x74, 0xe1, 0xdd, 0x5f, 0xc8, + 0x68, 0x26, 0x48, 0x5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0xb4, 0xfd, 0xa8, + 0x2b, 0x4d, 0xd8, 0x78, 0x6c, 0xec, 0x40, 0x65, 0xed, 0xcd, 0x87, 0x2a, 0x50, 0x38, 0xdc, 0x1f, + 0x1c, 0x74, 0x3b, 0xbd, 0x17, 0xbd, 0xee, 0x8e, 0x7d, 0x07, 0x01, 0x64, 0x06, 0xbd, 0xfd, 0x97, + 0xbb, 0x5d, 0xdb, 0x42, 0x79, 0x48, 0xef, 0x1d, 0xee, 0x0e, 0x7b, 0x76, 0x42, 0x2e, 0x87, 0xc7, + 0xfd, 0x83, 0x8e, 0x9d, 0xdc, 0xf8, 0x16, 0x0a, 0x1d, 0xf5, 0x72, 0xed, 0x33, 0x9f, 0x30, 0xb9, + 0x61, 0xbf, 0x8f, 0xf7, 0xb6, 0x76, 0xed, 0x3b, 0x28, 0x0b, 0xc9, 0x03, 0x2c, 0x77, 0xe6, 0x20, + 0x75, 0xd0, 0x1f, 0x0c, 0xed, 0x04, 0x2a, 0x03, 0x6c, 0x1d, 0x0e, 0xfb, 0x9d, 0xfe, 0xde, 0x5e, + 0x6f, 0x68, 0x27, 0xb7, 0xbf, 0x86, 0x4a, 0x40, 0x5b, 0xf3, 0x40, 0x10, 0xce, 0xf5, 0xc3, 0xfc, + 0xc7, 0x47, 0x46, 0x0a, 0x68, 0x5b, 0xaf, 0xda, 0x63, 0xda, 0x9e, 0x8b, 0xb6, 0xb2, 0xb6, 0x75, + 0x6b, 0x9e, 0x64, 0x94, 0xf4, 0xe5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x57, 0xac, 0xe8, 0xa9, + 0x18, 0x0c, 0x00, 0x00, } diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index ed5c45425f7..361ee8ac048 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -306,9 +306,9 @@ type internalTabletConn struct { // Execute is part of queryservice.QueryService // We need to copy the bind variables as tablet server will change them. -func (itc *internalTabletConn) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (itc *internalTabletConn) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { bindVars = sqltypes.CopyBindVariables(bindVars) - reply, err := itc.tablet.qsc.QueryService().Execute(ctx, target, query, bindVars, transactionID, options) + reply, err := itc.tablet.qsc.QueryService().Execute(ctx, target, query, bindVars, transactionID, reservedID, options) if err != nil { return nil, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) } @@ -410,12 +410,12 @@ func (itc *internalTabletConn) ReadTransaction(ctx context.Context, target *quer } // BeginExecute is part of queryservice.QueryService -func (itc *internalTabletConn) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { +func (itc *internalTabletConn) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { transactionID, alias, err := itc.Begin(ctx, target, options) if err != nil { return nil, 0, nil, err } - result, err := itc.Execute(ctx, target, query, bindVars, transactionID, options) + result, err := itc.Execute(ctx, target, query, bindVars, transactionID, reservedID, options) return result, transactionID, alias, err } @@ -441,6 +441,34 @@ func (itc *internalTabletConn) MessageAck(ctx context.Context, target *querypb.T return count, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) } +// ReserveExecute is part of queryservice.QueryService +// We need to copy the bind variables as tablet server will change them. +func (itc *internalTabletConn) ReserveExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { + bindVars = sqltypes.CopyBindVariables(bindVars) + reply, rID, alias, err := itc.tablet.qsc.QueryService().ReserveExecute(ctx, target, query, bindVars, reservedID, options, preQueries) + if err != nil { + return nil, 0, nil, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) + } + return reply, rID, alias, nil +} + +// ReserveBeginExecute is part of queryservice.QueryService +// We need to copy the bind variables as tablet server will change them. +func (itc *internalTabletConn) ReserveBeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, int64, *topodatapb.TabletAlias, error) { + bindVars = sqltypes.CopyBindVariables(bindVars) + reply, transactionID, reservedID, alias, err := itc.tablet.qsc.QueryService().ReserveBeginExecute(ctx, target, query, bindVars, options, preQueries) + if err != nil { + return nil, 0, 0, nil, tabletconn.ErrorFromGRPC(vterrors.ToGRPC(err)) + } + return reply, transactionID, reservedID, alias, nil +} + +// ReserveRelease is part of queryservice.QueryService +// We need to copy the bind variables as tablet server will change them. +func (itc *internalTabletConn) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + return itc.tablet.qsc.QueryService().ReserveTransactionRelease(ctx, target, transactionID, reservedID) +} + // Handle panic is part of the QueryService interface. func (itc *internalTabletConn) HandlePanic(err *error) { } diff --git a/go/vt/vtctl/query.go b/go/vt/vtctl/query.go index b30b6ab83a7..25fe88eae43 100644 --- a/go/vt/vtctl/query.go +++ b/go/vt/vtctl/query.go @@ -232,7 +232,7 @@ func commandVtTabletExecute(ctx context.Context, wr *wrangler.Wrangler, subFlags Keyspace: tabletInfo.Tablet.Keyspace, Shard: tabletInfo.Tablet.Shard, TabletType: tabletInfo.Tablet.Type, - }, subFlags.Arg(1), bindVars, int64(*transactionID), executeOptions) + }, subFlags.Arg(1), bindVars, int64(*transactionID), 0, executeOptions) if err != nil { return fmt.Errorf("execute failed: %v", err) } diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index cf19f6707cb..fa778a231db 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -1668,8 +1668,8 @@ func commandCreateKeyspace(ctx context.Context, wr *wrangler.Wrangler, subFlags } if !*allowEmptyVSchema { - cells, err := wr.TopoServer().GetKnownCells(ctx) - if err != nil { + cells, cerr := wr.TopoServer().GetKnownCells(ctx) + if cerr != nil { return fmt.Errorf("GetKnownCells failed: %v", err) } diff --git a/go/vt/vterrors/aggregate.go b/go/vt/vterrors/aggregate.go index 232d778908b..8ac4b4626d1 100644 --- a/go/vt/vterrors/aggregate.go +++ b/go/vt/vterrors/aggregate.go @@ -80,12 +80,25 @@ func Aggregate(errors []error) error { if len(errors) == 0 { return nil } + found := false + for _, e := range errors { + if e == nil { // e can be nil when we are collecting errors across shards and some shards have no error + continue + } + found = true + } + if !found { + return nil + } return New(aggregateCodes(errors), aggregateErrors(errors)) } func aggregateCodes(errors []error) vtrpcpb.Code { highCode := vtrpcpb.Code_OK for _, e := range errors { + if e == nil { // e can be nil when we are collecting errors across shards and some shards have no error + continue + } code := Code(e) if errorPriorities[code] > errorPriorities[highCode] { highCode = code @@ -98,6 +111,9 @@ func aggregateCodes(errors []error) vtrpcpb.Code { func aggregateErrors(errs []error) string { errStrs := make([]string, 0, len(errs)) for _, e := range errs { + if e == nil { // e can be nil when we are collecting errors across shards and some shards have no error + continue + } errStrs = append(errStrs, e.Error()) } // sort the error strings so we always have deterministic ordering diff --git a/go/vt/vtexplain/vtexplain.go b/go/vt/vtexplain/vtexplain.go index d1db8cea0e7..28a00efa5b8 100644 --- a/go/vt/vtexplain/vtexplain.go +++ b/go/vt/vtexplain/vtexplain.go @@ -155,7 +155,7 @@ func Init(vSchemaStr, sqlSchema string, opts *Options) error { return fmt.Errorf("parseSchema: %v", err) } - err = initTabletEnvironment(parsedDDLs, opts) + err = initTabletEnvironment(parsedDDLs) if err != nil { return fmt.Errorf("initTabletEnvironment: %v", err) } diff --git a/go/vt/vtexplain/vtexplain_vttablet.go b/go/vt/vtexplain/vtexplain_vttablet.go index 26724bc0684..e8043f16265 100644 --- a/go/vt/vtexplain/vtexplain_vttablet.go +++ b/go/vt/vtexplain/vtexplain_vttablet.go @@ -154,7 +154,7 @@ func (t *explainTablet) Rollback(ctx context.Context, target *querypb.Target, tr } // Execute is part of the QueryService interface. -func (t *explainTablet) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (t *explainTablet) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { t.mu.Lock() t.currentTime = batchTime.Wait() @@ -168,7 +168,7 @@ func (t *explainTablet) Execute(ctx context.Context, target *querypb.Target, sql }) t.mu.Unlock() - return t.tsv.Execute(ctx, target, sql, bindVariables, transactionID, options) + return t.tsv.Execute(ctx, target, sql, bindVariables, transactionID, reservedID, options) } // Prepare is part of the QueryService interface. @@ -248,7 +248,7 @@ func (t *explainTablet) ExecuteBatch(ctx context.Context, target *querypb.Target } // BeginExecute is part of the QueryService interface. -func (t *explainTablet) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { +func (t *explainTablet) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { t.mu.Lock() t.currentTime = batchTime.Wait() bindVariables = sqltypes.CopyBindVariables(bindVariables) @@ -259,7 +259,7 @@ func (t *explainTablet) BeginExecute(ctx context.Context, target *querypb.Target }) t.mu.Unlock() - return t.tsv.BeginExecute(ctx, target, sql, bindVariables, options) + return t.tsv.BeginExecute(ctx, target, sql, bindVariables, reservedID, options) } // Close is part of the QueryService interface. @@ -267,7 +267,7 @@ func (t *explainTablet) Close(ctx context.Context) error { return t.tsv.Close(ctx) } -func initTabletEnvironment(ddls []*sqlparser.DDL, opts *Options) error { +func initTabletEnvironment(ddls []*sqlparser.DDL) error { tableColumns = make(map[string]map[string]querypb.Type) schemaQueries = map[string]*sqltypes.Result{ "select unix_timestamp()": { @@ -422,7 +422,7 @@ func initTabletEnvironment(ddls []*sqlparser.DDL, opts *Options) error { } // HandleQuery implements the fakesqldb query handler interface -func (t *explainTablet) HandleQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result) error) error { +func (t *explainTablet) HandleQuery(_ *mysql.Conn, query string, callback func(*sqltypes.Result) error) error { t.mu.Lock() defer t.mu.Unlock() diff --git a/go/vt/vtexplain/vtexplain_vttablet_test.go b/go/vt/vtexplain/vtexplain_vttablet_test.go index a13c749c4fa..752219e0e0a 100644 --- a/go/vt/vtexplain/vtexplain_vttablet_test.go +++ b/go/vt/vtexplain/vtexplain_vttablet_test.go @@ -58,7 +58,7 @@ create table test_partitioned ( if err != nil { t.Fatalf("parseSchema: %v", err) } - initTabletEnvironment(ddls, defaultTestOpts()) + initTabletEnvironment(ddls) tablet := newTablet(defaultTestOpts(), &topodatapb.Tablet{ Keyspace: "test_keyspace", @@ -124,7 +124,7 @@ create table t1 like t2; if err != nil { t.Fatalf("parseSchema: %v", err) } - err = initTabletEnvironment(ddl, defaultTestOpts()) + err = initTabletEnvironment(ddl) if err.Error() != expected { t.Errorf("want: %s, got %s", expected, err.Error()) } diff --git a/go/vt/vtgate/discoverygateway_test.go b/go/vt/vtgate/discoverygateway_test.go index d2fc547f293..21efacb918e 100644 --- a/go/vt/vtgate/discoverygateway_test.go +++ b/go/vt/vtgate/discoverygateway_test.go @@ -38,11 +38,11 @@ import ( func TestDiscoveryGatewayExecute(t *testing.T) { testDiscoveryGatewayGeneric(t, func(dg *DiscoveryGateway, target *querypb.Target) error { - _, err := dg.Execute(context.Background(), target, "query", nil, 0, nil) + _, err := dg.Execute(context.Background(), target, "query", nil, 0, 0, nil) return err }) testDiscoveryGatewayTransact(t, func(dg *DiscoveryGateway, target *querypb.Target) error { - _, err := dg.Execute(context.Background(), target, "query", nil, 1, nil) + _, err := dg.Execute(context.Background(), target, "query", nil, 1, 0, nil) return err }) } @@ -90,7 +90,7 @@ func TestDiscoveryGatewayRollback(t *testing.T) { func TestDiscoveryGatewayBeginExecute(t *testing.T) { testDiscoveryGatewayGeneric(t, func(dg *DiscoveryGateway, target *querypb.Target) error { - _, _, _, err := dg.BeginExecute(context.Background(), target, "query", nil, nil) + _, _, _, err := dg.BeginExecute(context.Background(), target, "query", nil, 0, nil) return err }) } diff --git a/go/vt/vtgate/executor.go b/go/vt/vtgate/executor.go index fd67b23ddae..e45975b7802 100644 --- a/go/vt/vtgate/executor.go +++ b/go/vt/vtgate/executor.go @@ -159,7 +159,7 @@ func (e *Executor) Execute(ctx context.Context, method string, safeSession *Safe func saveSessionStats(safeSession *SafeSession, stmtType sqlparser.StatementType, result *sqltypes.Result, err error) { safeSession.RowCount = -1 - if err != nil { + if err != nil || result == nil { return } safeSession.FoundRows = result.RowsAffected diff --git a/go/vt/vtgate/plan_execute.go b/go/vt/vtgate/plan_execute.go index 10d9c21714a..ef61dff6e73 100644 --- a/go/vt/vtgate/plan_execute.go +++ b/go/vt/vtgate/plan_execute.go @@ -177,7 +177,7 @@ func (e *Executor) logExecutionEnd(logStats *LogStats, execStart time.Time, plan if err != nil { logStats.Error = err errCount = 1 - } else { + } else if qr != nil { logStats.RowsAffected = qr.RowsAffected } return errCount diff --git a/go/vt/vtgate/safe_session.go b/go/vt/vtgate/safe_session.go index 2eaacdbd6d3..00911ba60b3 100644 --- a/go/vt/vtgate/safe_session.go +++ b/go/vt/vtgate/safe_session.go @@ -17,6 +17,7 @@ limitations under the License. package vtgate import ( + "fmt" "sync" "github.com/golang/protobuf/proto" @@ -92,7 +93,6 @@ func (session *SafeSession) Reset() { session.mustRollback = false session.autocommitState = notAutocommittable session.Session.InTransaction = false - session.SingleDb = false session.ShardSessions = nil session.PreSessions = nil session.PostSessions = nil @@ -151,7 +151,7 @@ func (session *SafeSession) InTransaction() bool { } // Find returns the transactionId and tabletAlias, if any, for a session -func (session *SafeSession) Find(keyspace, shard string, tabletType topodatapb.TabletType) (transactionID int64, alias *topodatapb.TabletAlias) { +func (session *SafeSession) Find(keyspace, shard string, tabletType topodatapb.TabletType) (transactionID int64, reservedID int64, alias *topodatapb.TabletAlias) { session.mu.Lock() defer session.mu.Unlock() sessions := session.ShardSessions @@ -163,14 +163,15 @@ func (session *SafeSession) Find(keyspace, shard string, tabletType topodatapb.T } for _, shardSession := range sessions { if keyspace == shardSession.Target.Keyspace && tabletType == shardSession.Target.TabletType && shard == shardSession.Target.Shard { - return shardSession.TransactionId, shardSession.TabletAlias + return shardSession.TransactionId, shardSession.ReservedId, shardSession.TabletAlias } } - return 0, nil + return 0, 0, nil } // Append adds a new ShardSession func (session *SafeSession) Append(shardSession *vtgatepb.Session_ShardSession, txMode vtgatepb.TransactionMode) error { + // TODO (deepthi/systay) this should be able to be done even if not in transaction session.mu.Lock() defer session.mu.Unlock() @@ -202,8 +203,7 @@ func (session *SafeSession) Append(shardSession *vtgatepb.Session_ShardSession, } func (session *SafeSession) isSingleDB(txMode vtgatepb.TransactionMode) bool { - return session.SingleDb || - session.TransactionMode == vtgatepb.TransactionMode_SINGLE || + return session.TransactionMode == vtgatepb.TransactionMode_SINGLE || (session.TransactionMode == vtgatepb.TransactionMode_UNSPECIFIED && txMode == vtgatepb.TransactionMode_SINGLE) } @@ -264,3 +264,14 @@ func (session *SafeSession) SetSystemVariable(name string, expr string) { } session.SystemVariables[name] = expr } + +//SetSystemVarQueries returns the queries needed to set the system variables to the state expected +func (session *SafeSession) SetSystemVarQueries() []string { + session.mu.Lock() + defer session.mu.Unlock() + result := make([]string, len(session.SystemVariables)) + for k, v := range session.SystemVariables { + result = append(result, fmt.Sprintf("SET %s = %s", k, v)) + } + return result +} diff --git a/go/vt/vtgate/scatter_conn.go b/go/vt/vtgate/scatter_conn.go index 4ece8d648fb..fbe073d3610 100644 --- a/go/vt/vtgate/scatter_conn.go +++ b/go/vt/vtgate/scatter_conn.go @@ -62,15 +62,6 @@ type ScatterConn struct { // consolidating the results and errors for the caller. type shardActionFunc func(rs *srvtopo.ResolvedShard, i int) error -// shardActionTransactionFunc defines the contract for a shard action -// that may be in a transaction. Every such function executes the -// necessary action on a shard (with an optional Begin call), aggregates -// the results, and return an error if any. -// multiGoTransaction is capable of executing multiple -// shardActionTransactionFunc actions in parallel and consolidating -// the results and errors for the caller. -type shardActionTransactionFunc func(rs *srvtopo.ResolvedShard, i int, shouldBegin bool, transactionID int64, alias *topodatapb.TabletAlias) (int64, *topodatapb.TabletAlias, error) - // NewLegacyScatterConn creates a new ScatterConn. func NewLegacyScatterConn(statsName string, txConn *TxConn, gw Gateway, hc discovery.LegacyHealthCheck) *ScatterConn { tabletCallErrorCountStatsName := "" @@ -121,13 +112,12 @@ func (stc *ScatterConn) startAction(name string, target *querypb.Target) (time.T return startTime, statsKey } -func (stc *ScatterConn) endAction(startTime time.Time, allErrors *concurrency.AllErrorRecorder, statsKey []string, err *error, session *SafeSession) { - if *err != nil { - allErrors.RecordError(*err) +func (stc *ScatterConn) handleError(err error, statsKey []string, session *SafeSession) { + if err != nil { // Don't increment the error counter for duplicate // keys or bad queries, as those errors are caused by // client queries and are not VTGate's fault. - ec := vterrors.Code(*err) + ec := vterrors.Code(err) if ec != vtrpcpb.Code_ALREADY_EXISTS && ec != vtrpcpb.Code_INVALID_ARGUMENT { stc.tabletCallErrorCount.Add(statsKey, 1) } @@ -135,7 +125,6 @@ func (stc *ScatterConn) endAction(startTime time.Time, allErrors *concurrency.Al session.SetRollback() } } - stc.timings.Record(statsKey, startTime) } // Execute executes a non-streaming query on the specified shards. @@ -149,63 +138,14 @@ func (stc *ScatterConn) Execute( options *querypb.ExecuteOptions, autocommit bool, ) (*sqltypes.Result, error) { - - // mu protects qr - var mu sync.Mutex - qr := new(sqltypes.Result) - - allErrors := stc.multiGoTransaction( - ctx, - "Execute", - rss, - session, - notInTransaction, - func(rs *srvtopo.ResolvedShard, i int, shouldBegin bool, transactionID int64, alias *topodatapb.TabletAlias) (int64, *topodatapb.TabletAlias, error) { - var ( - innerqr *sqltypes.Result - err error - opts *querypb.ExecuteOptions - ) - switch { - case autocommit: - innerqr, err = stc.executeAutocommit(ctx, rs, query, bindVars, opts) - case shouldBegin: - innerqr, transactionID, alias, err = rs.Gateway.BeginExecute(ctx, rs.Target, query, bindVars, options) - default: - var qs queryservice.QueryService - _, usingLegacy := rs.Gateway.(*DiscoveryGateway) - if transactionID != 0 && usingLegacy && rs.Target.TabletType != topodatapb.TabletType_MASTER { - return 0, nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "replica transactions not supported using the legacy healthcheck") - } - - if usingLegacy || transactionID == 0 { - qs = rs.Gateway - } else { - qs, err = rs.Gateway.QueryServiceByAlias(alias) - } - if err == nil { - innerqr, err = qs.Execute(ctx, rs.Target, query, bindVars, transactionID, options) - } - } - if err != nil { - return transactionID, alias, err - } - - mu.Lock() - defer mu.Unlock() - // Don't append more rows if row count is exceeded. - if len(qr.Rows) <= *maxMemoryRows { - qr.AppendResult(innerqr) - } - return transactionID, alias, nil - }, - ) - - if len(qr.Rows) > *maxMemoryRows { - return nil, vterrors.Errorf(vtrpcpb.Code_RESOURCE_EXHAUSTED, "in-memory row count exceeded allowed limit of %d", *maxMemoryRows) + qf := func(int) (string, map[string]*querypb.BindVariable) { + return query, bindVars } - - return qr, allErrors.AggrError(vterrors.Aggregate) + result, errors := stc.multiGoTxOrReserve(ctx, "Execute", rss, session, options, notInTransaction, autocommit, false, qf) + if len(errors) > 0 { + return nil, vterrors.Aggregate(errors) + } + return result, nil } // ExecuteMultiShard is like Execute, @@ -221,65 +161,74 @@ func (stc *ScatterConn) ExecuteMultiShard( session *SafeSession, notInTransaction bool, autocommit bool, -) (qr *sqltypes.Result, errs []error) { +) (*sqltypes.Result, []error) { - // mu protects qr - var mu sync.Mutex - qr = new(sqltypes.Result) - - allErrors := stc.multiGoTransaction( - ctx, - "Execute", - rss, - session, - notInTransaction, - func(rs *srvtopo.ResolvedShard, i int, shouldBegin bool, transactionID int64, alias *topodatapb.TabletAlias) (int64, *topodatapb.TabletAlias, error) { - var ( - innerqr *sqltypes.Result - err error - opts *querypb.ExecuteOptions - ) - if session != nil && session.Session != nil { - opts = session.Session.Options - } + qf := func(idx int) (string, map[string]*querypb.BindVariable) { + bq := queries[idx] + return bq.Sql, bq.BindVariables + } + var opts *querypb.ExecuteOptions + if session != nil && session.Session != nil { + opts = session.Session.Options + } - switch { - case autocommit: - // tansactionID and alias are not used by this call, it is one round trip - innerqr, err = stc.executeAutocommit(ctx, rs, queries[i].Sql, queries[i].BindVariables, opts) - case shouldBegin: - innerqr, transactionID, alias, err = rs.Gateway.BeginExecute(ctx, rs.Target, queries[i].Sql, queries[i].BindVariables, opts) - default: - var qs queryservice.QueryService - _, usingLegacy := rs.Gateway.(*DiscoveryGateway) - if usingLegacy || transactionID == 0 { - qs = rs.Gateway - } else { - qs, err = rs.Gateway.QueryServiceByAlias(alias) - } - if err == nil { - innerqr, err = qs.Execute(ctx, rs.Target, queries[i].Sql, queries[i].BindVariables, transactionID, opts) - } - } - if err != nil { - return transactionID, alias, err - } + return stc.multiGoTxOrReserve(ctx, "ExecuteMultiShard", rss, session, opts, notInTransaction, autocommit, false, qf) +} - mu.Lock() - defer mu.Unlock() - // Don't append more rows if row count is exceeded. - if len(qr.Rows) <= *maxMemoryRows { - qr.AppendResult(innerqr) - } - return transactionID, alias, nil - }, - ) +func (stc *ScatterConn) executeOne( + ctx context.Context, + rs *srvtopo.ResolvedShard, + info tabletConnInfo, + query string, + bv map[string]*querypb.BindVariable, + autocommit bool, + session *SafeSession, + opts *querypb.ExecuteOptions, +) (int64, int64, *topodatapb.TabletAlias, *sqltypes.Result, error) { + switch { + case autocommit: + innerqr, err := stc.executeAutocommit(ctx, rs, query, bv, opts) + if err != nil { + return 0, 0, nil, nil, err + } + return 0, 0, nil, innerqr, nil + case info.shouldBegin && info.shouldReserve: + innerqr, transactionID, reservedID, alias, err := rs.Gateway.ReserveBeginExecute(ctx, rs.Target, query, bv, opts, session.SetSystemVarQueries()) + if err != nil { + return 0, 0, nil, nil, err + } + return transactionID, reservedID, alias, innerqr, nil + case info.shouldBegin: + innerqr, transactionID, alias, err := rs.Gateway.BeginExecute(ctx, rs.Target, query, bv, info.reserveID, opts) + if err != nil { + return 0, 0, nil, nil, err + } + return transactionID, info.reserveID, alias, innerqr, nil + case info.shouldReserve: + innerqr, reservedID, alias, err := rs.Gateway.ReserveExecute(ctx, rs.Target, query, bv, info.transactionID, opts, session.SetSystemVarQueries()) + if err != nil { + return 0, 0, nil, nil, err + } + return info.transactionID, reservedID, alias, innerqr, nil + default: + var qs queryservice.QueryService + _, usingLegacy := rs.Gateway.(*DiscoveryGateway) + if info.transactionID != 0 && usingLegacy && rs.Target.TabletType != topodatapb.TabletType_MASTER { + return 0, 0, nil, nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "replica transactions not supported using the legacy healthcheck") + } - if len(qr.Rows) > *maxMemoryRows { - return nil, []error{vterrors.Errorf(vtrpcpb.Code_RESOURCE_EXHAUSTED, "in-memory row count exceeded allowed limit of %d", *maxMemoryRows)} + if usingLegacy || info.transactionID == 0 { + qs = rs.Gateway + } else { + var err error + qs, err = rs.Gateway.QueryServiceByAlias(info.alias) + if err != nil { + return 0, 0, nil, nil, err + } + } + innerqr, err := qs.Execute(ctx, rs.Target, query, bv, info.transactionID, info.reserveID, opts) + return info.transactionID, info.reserveID, info.alias, innerqr, err } - - return qr, allErrors.GetErrors() } func (stc *ScatterConn) executeAutocommit(ctx context.Context, rs *srvtopo.ResolvedShard, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { @@ -493,12 +442,15 @@ func (stc *ScatterConn) multiGo( } oneShard := func(rs *srvtopo.ResolvedShard, i int) { - var err error startTime, statsKey := stc.startAction(name, rs.Target) // Send a dummy session. - // TODO(sougou): plumb a real session through this call. - defer stc.endAction(startTime, allErrors, statsKey, &err, NewSafeSession(nil)) - err = action(rs, i) + defer stc.timings.Record(statsKey, startTime) + err := action(rs, i) + if err != nil { + // TODO(sougou): plumb a real session through this call. + stc.handleError(err, statsKey, NewSafeSession(nil)) + allErrors.RecordError(err) + } } if len(rss) == 1 { @@ -519,46 +471,65 @@ func (stc *ScatterConn) multiGo( return allErrors } -// multiGoTransaction performs the requested 'action' on the specified +// multiGoTxOrReserve performs the requested 'action' on the specified // ResolvedShards in parallel. For each shard, if the requested // session is in a transaction, it opens a new transactions on the connection, // and updates the Session with the transaction id. If the session already // contains a transaction id for the shard, it reuses it. // The action function must match the shardActionTransactionFunc signature. // -// It returns an error recorder in which each shard error is recorded positionally, +// It returns an error slice in which each shard error is recorded positionally, // i.e. if rss[2] had an error, then the error recorder will store that error // in the second position. -func (stc *ScatterConn) multiGoTransaction( +func (stc *ScatterConn) multiGoTxOrReserve( ctx context.Context, name string, rss []*srvtopo.ResolvedShard, session *SafeSession, + options *querypb.ExecuteOptions, notInTransaction bool, - action shardActionTransactionFunc, -) (allErrors *concurrency.AllErrorRecorder) { + autocommit bool, + needReserved bool, + query func(i int) (string, map[string]*querypb.BindVariable), +) (*sqltypes.Result, []error) { numShards := len(rss) - allErrors = new(concurrency.AllErrorRecorder) + errors := make([]error, numShards) if numShards == 0 { - return allErrors + return &sqltypes.Result{}, nil } - oneShard := func(rs *srvtopo.ResolvedShard, i int) { - var err error - startTime, statsKey := stc.startAction(name, rs.Target) - defer stc.endAction(startTime, allErrors, statsKey, &err, session) - shouldBegin, transactionID, alias := transactionInfo(rs.Target, session, notInTransaction) - transactionID, alias, err = action(rs, i, shouldBegin, transactionID, alias) - if shouldBegin && transactionID != 0 { - if appendErr := session.Append(&vtgatepb.Session_ShardSession{ + // mu protects qr + var mu sync.Mutex + result := new(sqltypes.Result) + + oneShard := func(rs *srvtopo.ResolvedShard, shardIdx int) { + startTime, statsKey := stc.startAction(name, rs.Target) + defer stc.timings.Record(statsKey, startTime) + + connInfo := txAndReservedInfo(rs.Target, session, notInTransaction, needReserved) + query, bindVars := query(shardIdx) + transactionID, reservedID, alias, innerResult, err := stc.executeOne(ctx, rs, connInfo, query, bindVars, autocommit, session, options) + if err != nil { + stc.handleError(err, statsKey, session) + errors[shardIdx] = err + } + if connInfo.shouldBegin || connInfo.shouldReserve && transactionID != 0 { + appendErr := session.Append(&vtgatepb.Session_ShardSession{ Target: rs.Target, TransactionId: transactionID, + ReservedId: reservedID, TabletAlias: alias, - }, stc.txConn.mode); appendErr != nil { - err = appendErr - } + }, stc.txConn.mode) + stc.handleError(appendErr, statsKey, session) + } + + mu.Lock() + defer mu.Unlock() + // Don't append more rows if row count is exceeded. + if len(result.Rows) <= *maxMemoryRows { + result.AppendResult(innerResult) } } @@ -582,34 +553,47 @@ func (stc *ScatterConn) multiGoTransaction( if session.MustRollback() { stc.txConn.Rollback(ctx, session) } - return allErrors + return result, errors } -// transactionInfo looks at the current session, and returns: +type tabletConnInfo struct { + shouldBegin bool + shouldReserve bool + transactionID int64 + reserveID int64 + alias *topodatapb.TabletAlias +} + +// txAndReservedInfo looks at the current session, and returns: // - shouldBegin: if we should call 'Begin' to get a transactionID // - transactionID: the transactionID to use, or 0 if not in a transaction. -func transactionInfo( +func txAndReservedInfo( target *querypb.Target, session *SafeSession, notInTransaction bool, -) (shouldBegin bool, transactionID int64, alias *topodatapb.TabletAlias) { - if !session.InTransaction() { - return false, 0, nil - } + needReserved bool, +) tabletConnInfo { // No need to protect ourselves from the race condition between // Find and Append. The higher level functions ensure that no // duplicate (target) tuples can execute // this at the same time. - transactionID, alias = session.Find(target.Keyspace, target.Shard, target.TabletType) - if transactionID != 0 { - return false, transactionID, alias - } + transactionID, reservedID, alias := session.Find(target.Keyspace, target.Shard, target.TabletType) + + shouldReserve := needReserved && reservedID == 0 + var shouldBegin bool + // We are in a transaction at higher level, // but client requires not to start a transaction for this query. // If a transaction was started on this conn, we will use it (as above). - if notInTransaction { - return false, 0, nil + if transactionID != 0 || notInTransaction { + shouldBegin = false + } else { + shouldBegin = !session.InTransaction() } - - return true, 0, nil + return tabletConnInfo{ + shouldBegin: shouldBegin, + shouldReserve: shouldReserve, + transactionID: transactionID, + reserveID: reservedID, + alias: alias} } diff --git a/go/vt/vtgate/scatter_conn_test.go b/go/vt/vtgate/scatter_conn_test.go index 078c5704994..ac050243ea9 100644 --- a/go/vt/vtgate/scatter_conn_test.go +++ b/go/vt/vtgate/scatter_conn_test.go @@ -19,7 +19,6 @@ package vtgate import ( "fmt" "reflect" - "strings" "testing" "github.com/stretchr/testify/assert" @@ -45,9 +44,7 @@ func TestScatterConnExecute(t *testing.T) { testScatterConnGeneric(t, "TestScatterConnExecute", func(sc *ScatterConn, shards []string) (*sqltypes.Result, error) { res := srvtopo.NewResolver(&sandboxTopo{}, sc.gateway, "aa") rss, err := res.ResolveDestination(ctx, "TestScatterConnExecute", topodatapb.TabletType_REPLICA, key.DestinationShards(shards)) - if err != nil { - return nil, err - } + require.NoError(t, err) return sc.Execute(ctx, "query", nil, rss, NewSafeSession(nil), false, nil, false) }) @@ -112,12 +109,8 @@ func TestScatterConnStreamExecuteMulti(t *testing.T) { // type, and error code. func verifyScatterConnError(t *testing.T, err error, wantErr string, wantCode vtrpcpb.Code) { t.Helper() - if err == nil || err.Error() != wantErr { - t.Errorf("wanted error: %s, got error: %v", wantErr, err) - } - if code := vterrors.Code(err); code != wantCode { - t.Errorf("wanted error code: %s, got: %v", wantCode, code) - } + assert.EqualError(t, err, wantErr) + assert.Equal(t, wantCode, vterrors.Code(err)) } func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, shards []string) (*sqltypes.Result, error)) { @@ -127,12 +120,10 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s s := createSandbox(name) sc := newTestLegacyScatterConn(hc, new(sandboxTopo), "aa") qr, err := f(sc, nil) + require.NoError(t, err) if qr.RowsAffected != 0 { t.Errorf("want 0, got %v", qr.RowsAffected) } - if err != nil { - t.Errorf("want nil, got %v", err) - } // single shard s.Reset() @@ -141,14 +132,8 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s sbc.MustFailCodes[vtrpcpb.Code_INVALID_ARGUMENT] = 1 _, err = f(sc, []string{"0"}) want := fmt.Sprintf("target: %v.0.replica, used tablet: aa-0 (0): INVALID_ARGUMENT error", name) - // Verify server error string. - if err == nil || err.Error() != want { - t.Errorf("want %s, got %v", want, err) - } - // Ensure that we tried only once. - if execCount := sbc.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } + require.EqualError(t, err, want) + assert.EqualValues(t, 1, sbc.ExecCount.Get()) // two shards s.Reset() @@ -163,12 +148,8 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s want = fmt.Sprintf("target: %v.0.replica, used tablet: aa-0 (0): INVALID_ARGUMENT error\ntarget: %v.1.replica, used tablet: aa-0 (1): INVALID_ARGUMENT error", name, name) verifyScatterConnError(t, err, want, vtrpcpb.Code_INVALID_ARGUMENT) // Ensure that we tried only once. - if execCount := sbc0.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } - if execCount := sbc1.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } + assert.EqualValues(t, 1, sbc0.ExecCount.Get()) + assert.EqualValues(t, 1, sbc1.ExecCount.Get()) // two shards with different errors s.Reset() @@ -184,12 +165,8 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s // We should only surface the higher priority error code verifyScatterConnError(t, err, want, vtrpcpb.Code_INVALID_ARGUMENT) // Ensure that we tried only once. - if execCount := sbc0.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } - if execCount := sbc1.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } + assert.EqualValues(t, 1, sbc0.ExecCount.Get()) + assert.EqualValues(t, 1, sbc1.ExecCount.Get()) // duplicate shards s.Reset() @@ -198,9 +175,7 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s sbc = hc.AddTestTablet("aa", "0", 1, name, "0", topodatapb.TabletType_REPLICA, true, 1, nil) _, _ = f(sc, []string{"0", "0"}) // Ensure that we executed only once. - if execCount := sbc.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } + assert.EqualValues(t, 1, sbc.ExecCount.Get()) // no errors s.Reset() @@ -209,21 +184,11 @@ func testScatterConnGeneric(t *testing.T, name string, f func(sc *ScatterConn, s sbc0 = hc.AddTestTablet("aa", "0", 1, name, "0", topodatapb.TabletType_REPLICA, true, 1, nil) sbc1 = hc.AddTestTablet("aa", "1", 1, name, "1", topodatapb.TabletType_REPLICA, true, 1, nil) qr, err = f(sc, []string{"0", "1"}) - if err != nil { - t.Fatalf("want nil, got %v", err) - } - if execCount := sbc0.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } - if execCount := sbc1.ExecCount.Get(); execCount != 1 { - t.Errorf("want 1, got %v", execCount) - } - if qr.RowsAffected != 2 { - t.Errorf("want 2, got %v", qr.RowsAffected) - } - if len(qr.Rows) != 2 { - t.Errorf("want 2, got %v", len(qr.Rows)) - } + require.NoError(t, err) + assert.EqualValues(t, 1, sbc0.ExecCount.Get()) + assert.EqualValues(t, 1, sbc1.ExecCount.Get()) + assert.EqualValues(t, 2, qr.RowsAffected) + assert.Equal(t, 2, len(qr.Rows)) } func TestMaxMemoryRows(t *testing.T) { @@ -370,17 +335,14 @@ func TestScatterConnStreamExecuteSendError(t *testing.T) { hc.AddTestTablet("aa", "0", 1, "TestScatterConnStreamExecuteSendError", "0", topodatapb.TabletType_REPLICA, true, 1, nil) res := srvtopo.NewResolver(&sandboxTopo{}, sc.gateway, "aa") rss, err := res.ResolveDestination(ctx, "TestScatterConnStreamExecuteSendError", topodatapb.TabletType_REPLICA, key.DestinationShard("0")) - if err != nil { - t.Fatalf("ResolveDestination failed: %v", err) - } + require.NoError(t, err) err = sc.StreamExecute(ctx, "query", nil, rss, nil, func(*sqltypes.Result) error { return fmt.Errorf("send error") }) want := "send error" // Ensure that we handle send errors. - if err == nil || !strings.Contains(err.Error(), want) { - t.Errorf("got %s, must contain %v", err, want) - } + require.Error(t, err) + require.Contains(t, err, want) } func TestScatterConnQueryNotInTransaction(t *testing.T) { @@ -395,13 +357,10 @@ func TestScatterConnQueryNotInTransaction(t *testing.T) { res := srvtopo.NewResolver(&sandboxTopo{}, sc.gateway, "aa") rss0, err := res.ResolveDestination(ctx, "TestScatterConnQueryNotInTransaction", topodatapb.TabletType_REPLICA, key.DestinationShard("0")) - if err != nil { - t.Fatalf("ResolveDestination(0) failed: %v", err) - } + require.NoError(t, err) + rss1, err := res.ResolveDestination(ctx, "TestScatterConnQueryNotInTransaction", topodatapb.TabletType_REPLICA, key.DestinationShard("1")) - if err != nil { - t.Fatalf("ResolveDestination(1) failed: %v", err) - } + require.NoError(t, err) session := NewSafeSession(&vtgatepb.Session{InTransaction: true}) sc.Execute(ctx, "query1", nil, rss0, session, true, nil, false) @@ -447,13 +406,10 @@ func TestScatterConnQueryNotInTransaction(t *testing.T) { res = srvtopo.NewResolver(&sandboxTopo{}, sc.gateway, "aa") rss0, err = res.ResolveDestination(ctx, "TestScatterConnQueryNotInTransaction", topodatapb.TabletType_REPLICA, key.DestinationShard("0")) - if err != nil { - t.Fatalf("ResolveDestination(0) failed: %v", err) - } + require.NoError(t, err) + rss1, err = res.ResolveDestination(ctx, "TestScatterConnQueryNotInTransaction", topodatapb.TabletType_REPLICA, key.DestinationShard("1")) - if err != nil { - t.Fatalf("ResolveDestination(1) failed: %v", err) - } + require.NoError(t, err) sc.Execute(ctx, "query1", nil, rss0, session, false, nil, false) sc.Execute(ctx, "query1", nil, rss1, session, true, nil, false) @@ -550,33 +506,20 @@ func TestScatterConnSingleDB(t *testing.T) { res := srvtopo.NewResolver(&sandboxTopo{}, sc.gateway, "aa") rss0, err := res.ResolveDestination(ctx, "TestScatterConnSingleDB", topodatapb.TabletType_MASTER, key.DestinationShard("0")) - if err != nil { - t.Fatalf("ResolveDestination(0) failed: %v", err) - } + require.NoError(t, err) + rss1, err := res.ResolveDestination(ctx, "TestScatterConnSingleDB", topodatapb.TabletType_MASTER, key.DestinationShard("1")) - if err != nil { - t.Fatalf("ResolveDestination(1) failed: %v", err) - } + require.NoError(t, err) want := "multi-db transaction attempted" - // SingleDb (legacy) - session := NewSafeSession(&vtgatepb.Session{InTransaction: true, SingleDb: true}) - _, err = sc.Execute(ctx, "query1", nil, rss0, session, false, nil, false) - require.NoError(t, err) - _, err = sc.Execute(ctx, "query1", nil, rss1, session, false, nil, false) - if err == nil || !strings.Contains(err.Error(), want) { - t.Errorf("Multi DB exec: %v, must contain %s", err, want) - } - // TransactionMode_SINGLE in session - session = NewSafeSession(&vtgatepb.Session{InTransaction: true, TransactionMode: vtgatepb.TransactionMode_SINGLE}) + session := NewSafeSession(&vtgatepb.Session{InTransaction: true, TransactionMode: vtgatepb.TransactionMode_SINGLE}) _, err = sc.Execute(ctx, "query1", nil, rss0, session, false, nil, false) require.NoError(t, err) _, err = sc.Execute(ctx, "query1", nil, rss1, session, false, nil, false) - if err == nil || !strings.Contains(err.Error(), want) { - t.Errorf("Multi DB exec: %v, must contain %s", err, want) - } + require.Error(t, err) + require.Contains(t, err, want) // TransactionMode_SINGLE in txconn sc.txConn.mode = vtgatepb.TransactionMode_SINGLE @@ -584,9 +527,8 @@ func TestScatterConnSingleDB(t *testing.T) { _, err = sc.Execute(ctx, "query1", nil, rss0, session, false, nil, false) require.NoError(t, err) _, err = sc.Execute(ctx, "query1", nil, rss1, session, false, nil, false) - if err == nil || !strings.Contains(err.Error(), want) { - t.Errorf("Multi DB exec: %v, must contain %s", err, want) - } + require.Error(t, err) + require.Contains(t, err, want) // TransactionMode_MULTI in txconn. Should not fail. sc.txConn.mode = vtgatepb.TransactionMode_MULTI diff --git a/go/vt/vttablet/endtoend/framework/client.go b/go/vt/vttablet/endtoend/framework/client.go index a1c3021b6fe..547cf8a0ec3 100644 --- a/go/vt/vttablet/endtoend/framework/client.go +++ b/go/vt/vttablet/endtoend/framework/client.go @@ -37,6 +37,7 @@ type QueryClient struct { target querypb.Target server *tabletserver.TabletServer transactionID int64 + connectionID int64 } // NewClient creates a new client for Server. @@ -169,6 +170,7 @@ func (client *QueryClient) BeginExecute(query string, bindvars map[string]*query &client.target, query, bindvars, + client.connectionID, &querypb.ExecuteOptions{IncludedFields: querypb.ExecuteOptions_ALL}, ) if err != nil { @@ -186,6 +188,7 @@ func (client *QueryClient) ExecuteWithOptions(query string, bindvars map[string] query, bindvars, client.transactionID, + client.connectionID, options, ) } diff --git a/go/vt/vttablet/grpcqueryservice/server.go b/go/vt/vttablet/grpcqueryservice/server.go index e7979e14972..b42278d9a45 100644 --- a/go/vt/vttablet/grpcqueryservice/server.go +++ b/go/vt/vttablet/grpcqueryservice/server.go @@ -44,7 +44,7 @@ func (q *query) Execute(ctx context.Context, request *querypb.ExecuteRequest) (r request.EffectiveCallerId, request.ImmediateCallerId, ) - result, err := q.server.Execute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.TransactionId, request.Options) + result, err := q.server.Execute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.TransactionId, request.ReservedId, request.Options) if err != nil { return nil, vterrors.ToGRPC(err) } @@ -249,7 +249,7 @@ func (q *query) BeginExecute(ctx context.Context, request *querypb.BeginExecuteR request.EffectiveCallerId, request.ImmediateCallerId, ) - result, transactionID, alias, err := q.server.BeginExecute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.Options) + result, transactionID, alias, err := q.server.BeginExecute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.ReservedId, request.Options) if err != nil { // if we have a valid transactionID, return the error in-band if transactionID != 0 { @@ -327,6 +327,57 @@ func (q *query) MessageAck(ctx context.Context, request *querypb.MessageAckReque }, nil } +// ReserveExecute is part of the queryservice.QueryServer interface +func (q *query) ReserveExecute(ctx context.Context, request *querypb.ReserveExecuteRequest) (response *querypb.ReserveExecuteResponse, err error) { + defer q.server.HandlePanic(&err) + ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx), + request.EffectiveCallerId, + request.ImmediateCallerId, + ) + result, reservedID, alias, err := q.server.ReserveExecute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.TransactionId, request.Options, request.PreQueries) + if err != nil { + return nil, vterrors.ToGRPC(err) + } + return &querypb.ReserveExecuteResponse{ + Result: sqltypes.ResultToProto3(result), + ReservedId: reservedID, + TabletAlias: alias, + }, nil +} + +// ReserveBeginExecute is part of the queryservice.QueryServer interface +func (q *query) ReserveBeginExecute(ctx context.Context, request *querypb.ReserveBeginExecuteRequest) (response *querypb.ReserveBeginExecuteResponse, err error) { + defer q.server.HandlePanic(&err) + ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx), + request.EffectiveCallerId, + request.ImmediateCallerId, + ) + result, transactionID, reservedID, alias, err := q.server.ReserveBeginExecute(ctx, request.Target, request.Query.Sql, request.Query.BindVariables, request.Options, request.PreQueries) + if err != nil { + return nil, vterrors.ToGRPC(err) + } + return &querypb.ReserveBeginExecuteResponse{ + Result: sqltypes.ResultToProto3(result), + TransactionId: transactionID, + ReservedId: reservedID, + TabletAlias: alias, + }, nil +} + +// ReserveTransactionRelease is part of the queryservice.QueryServer interface +func (q *query) ReserveTransactionRelease(ctx context.Context, request *querypb.ReserveTransactionReleaseRequest) (response *querypb.ReserveTransactionReleaseResponse, err error) { + defer q.server.HandlePanic(&err) + ctx = callerid.NewContext(callinfo.GRPCCallInfo(ctx), + request.EffectiveCallerId, + request.ImmediateCallerId, + ) + err = q.server.ReserveTransactionRelease(ctx, request.Target, request.TransactionId, request.ReservedId) + if err != nil { + return nil, vterrors.ToGRPC(err) + } + return &querypb.ReserveTransactionReleaseResponse{}, nil +} + // StreamHealth is part of the queryservice.QueryServer interface func (q *query) StreamHealth(request *querypb.StreamHealthRequest, stream queryservicepb.Query_StreamHealthServer) (err error) { defer q.server.HandlePanic(&err) diff --git a/go/vt/vttablet/grpctabletconn/conn.go b/go/vt/vttablet/grpctabletconn/conn.go index 3c3a62cb32b..e588ebdbd36 100644 --- a/go/vt/vttablet/grpctabletconn/conn.go +++ b/go/vt/vttablet/grpctabletconn/conn.go @@ -89,7 +89,7 @@ func DialTablet(tablet *topodatapb.Tablet, failFast grpcclient.FailFast) (querys } // Execute sends the query to VTTablet. -func (conn *gRPCQueryClient) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (conn *gRPCQueryClient) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { conn.mu.RLock() defer conn.mu.RUnlock() if conn.cc == nil { @@ -106,6 +106,7 @@ func (conn *gRPCQueryClient) Execute(ctx context.Context, target *querypb.Target }, TransactionId: transactionID, Options: options, + ReservedId: reservedID, } er, err := conn.c.Execute(ctx, req) if err != nil { @@ -440,7 +441,7 @@ func (conn *gRPCQueryClient) ReadTransaction(ctx context.Context, target *queryp } // BeginExecute starts a transaction and runs an Execute. -func (conn *gRPCQueryClient) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (result *sqltypes.Result, transactionID int64, alias *topodatapb.TabletAlias, err error) { +func (conn *gRPCQueryClient) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (result *sqltypes.Result, transactionID int64, alias *topodatapb.TabletAlias, err error) { conn.mu.RLock() defer conn.mu.RUnlock() if conn.cc == nil { @@ -455,7 +456,8 @@ func (conn *gRPCQueryClient) BeginExecute(ctx context.Context, target *querypb.T Sql: query, BindVariables: bindVars, }, - Options: options, + Options: options, + ReservedId: reservedID, } reply, err := conn.c.BeginExecute(ctx, req) if err != nil { @@ -597,6 +599,87 @@ func (conn *gRPCQueryClient) StreamHealth(ctx context.Context, callback func(*qu } } +// ReserveExecute calls the ReserveExecute RPC on VTTablet. +func (conn *gRPCQueryClient) ReserveExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { + conn.mu.RLock() + defer conn.mu.RUnlock() + if conn.cc == nil { + return nil, 0, nil, tabletconn.ConnClosed + } + + req := &querypb.ReserveExecuteRequest{ + Target: target, + EffectiveCallerId: callerid.EffectiveCallerIDFromContext(ctx), + ImmediateCallerId: callerid.ImmediateCallerIDFromContext(ctx), + Query: &querypb.BoundQuery{ + Sql: query, + BindVariables: bindVars, + }, + TransactionId: transactionID, + Options: options, + PreQueries: preQueries, + } + er, err := conn.c.ReserveExecute(ctx, req) + if err != nil { + return nil, 0, nil, tabletconn.ErrorFromGRPC(err) + } + return sqltypes.Proto3ToResult(er.Result), er.ReservedId, er.TabletAlias, nil +} + +// ReserveBeginExecute reserves a connection, starts a transaction and runs an Execute. +func (conn *gRPCQueryClient) ReserveBeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (result *sqltypes.Result, transactionID, reservedID int64, alias *topodatapb.TabletAlias, err error) { + conn.mu.RLock() + defer conn.mu.RUnlock() + if conn.cc == nil { + return nil, 0, 0, nil, tabletconn.ConnClosed + } + + req := &querypb.ReserveBeginExecuteRequest{ + Target: target, + EffectiveCallerId: callerid.EffectiveCallerIDFromContext(ctx), + ImmediateCallerId: callerid.ImmediateCallerIDFromContext(ctx), + Query: &querypb.BoundQuery{ + Sql: query, + BindVariables: bindVars, + }, + Options: options, + PreQueries: preQueries, + } + reply, err := conn.c.ReserveBeginExecute(ctx, req) + if err != nil { + return nil, 0, 0, nil, tabletconn.ErrorFromGRPC(err) + } + if reply.Error != nil { + return nil, reply.TransactionId, reply.ReservedId, conn.tablet.Alias, tabletconn.ErrorFromVTRPC(reply.Error) + } + return sqltypes.Proto3ToResult(reply.Result), reply.TransactionId, reply.ReservedId, conn.tablet.Alias, nil +} + +// ReserveTransactionRelease releases the reserved connection and closes the transaction. +func (conn *gRPCQueryClient) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + conn.mu.RLock() + defer conn.mu.RUnlock() + if conn.cc == nil { + return tabletconn.ConnClosed + } + + req := &querypb.ReserveTransactionReleaseRequest{ + Target: target, + EffectiveCallerId: callerid.EffectiveCallerIDFromContext(ctx), + ImmediateCallerId: callerid.ImmediateCallerIDFromContext(ctx), + TransactionId: transactionID, + ReservedId: reservedID, + } + reply, err := conn.c.ReserveTransactionRelease(ctx, req) + if err != nil { + return tabletconn.ErrorFromGRPC(err) + } + if reply.Error != nil { + return tabletconn.ErrorFromVTRPC(reply.Error) + } + return nil +} + // VStream starts a VReplication stream. func (conn *gRPCQueryClient) VStream(ctx context.Context, target *querypb.Target, position string, filter *binlogdatapb.Filter, send func([]*binlogdatapb.VEvent) error) error { stream, err := func() (queryservicepb.Query_VStreamClient, error) { diff --git a/go/vt/vttablet/queryservice/fakes/stream_health_query_service.go b/go/vt/vttablet/queryservice/fakes/stream_health_query_service.go index 3c21cf8314b..2f4efe09c14 100644 --- a/go/vt/vttablet/queryservice/fakes/stream_health_query_service.go +++ b/go/vt/vttablet/queryservice/fakes/stream_health_query_service.go @@ -61,7 +61,7 @@ func (q *StreamHealthQueryService) Begin(ctx context.Context, target *querypb.Ta } // Execute implemented as a no op -func (q *StreamHealthQueryService) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (q *StreamHealthQueryService) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { return &sqltypes.Result{}, nil } diff --git a/go/vt/vttablet/queryservice/queryservice.go b/go/vt/vttablet/queryservice/queryservice.go index 2f6a9b68ba9..017047912d8 100644 --- a/go/vt/vttablet/queryservice/queryservice.go +++ b/go/vt/vttablet/queryservice/queryservice.go @@ -79,7 +79,7 @@ type QueryService interface { ReadTransaction(ctx context.Context, target *querypb.Target, dtid string) (metadata *querypb.TransactionMetadata, err error) // Query execution - Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) + Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) // Currently always called with transactionID = 0 StreamExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, callback func(*sqltypes.Result) error) error // Currently always called with transactionID = 0 @@ -89,13 +89,17 @@ type QueryService interface { // Begin part. If err != nil, the transactionID may still be // non-zero, and needs to be propagated back (like for a DB // Integrity Error) - BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) + BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) BeginExecuteBatch(ctx context.Context, target *querypb.Target, queries []*querypb.BoundQuery, asTransaction bool, options *querypb.ExecuteOptions) ([]sqltypes.Result, int64, *topodatapb.TabletAlias, error) // Messaging methods. MessageStream(ctx context.Context, target *querypb.Target, name string, callback func(*sqltypes.Result) error) error MessageAck(ctx context.Context, target *querypb.Target, name string, ids []*querypb.Value) (count int64, err error) + ReserveExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) + ReserveBeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, int64, *topodatapb.TabletAlias, error) + ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error + // VStream streams VReplication events based on the specified filter. VStream(ctx context.Context, target *querypb.Target, startPos string, filter *binlogdatapb.Filter, send func([]*binlogdatapb.VEvent) error) error diff --git a/go/vt/vttablet/queryservice/wrapped.go b/go/vt/vttablet/queryservice/wrapped.go index 2ac41122d4d..14c5ef5c793 100644 --- a/go/vt/vttablet/queryservice/wrapped.go +++ b/go/vt/vttablet/queryservice/wrapped.go @@ -165,11 +165,11 @@ func (ws *wrappedService) ReadTransaction(ctx context.Context, target *querypb.T return metadata, err } -func (ws *wrappedService) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (qr *sqltypes.Result, err error) { +func (ws *wrappedService) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, reservedID int64, options *querypb.ExecuteOptions) (qr *sqltypes.Result, err error) { inTransaction := (transactionID != 0) err = ws.wrapper(ctx, target, ws.impl, "Execute", inTransaction, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { var innerErr error - qr, innerErr = conn.Execute(ctx, target, query, bindVars, transactionID, options) + qr, innerErr = conn.Execute(ctx, target, query, bindVars, transactionID, reservedID, options) // You cannot retry if you're in a transaction. retryable := canRetry(ctx, innerErr) && (!inTransaction) return retryable, innerErr @@ -202,10 +202,10 @@ func (ws *wrappedService) ExecuteBatch(ctx context.Context, target *querypb.Targ return qrs, err } -func (ws *wrappedService) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (qr *sqltypes.Result, transactionID int64, alias *topodatapb.TabletAlias, err error) { +func (ws *wrappedService) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (qr *sqltypes.Result, transactionID int64, alias *topodatapb.TabletAlias, err error) { err = ws.wrapper(ctx, target, ws.impl, "BeginExecute", false, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { var innerErr error - qr, transactionID, alias, innerErr = conn.BeginExecute(ctx, target, query, bindVars, options) + qr, transactionID, alias, innerErr = conn.BeginExecute(ctx, target, query, bindVars, reservedID, options) return canRetry(ctx, innerErr), innerErr }) return qr, transactionID, alias, err @@ -236,6 +236,35 @@ func (ws *wrappedService) MessageAck(ctx context.Context, target *querypb.Target return count, err } +func (ws *wrappedService) ReserveExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (qr *sqltypes.Result, reservedID int64, alias *topodatapb.TabletAlias, err error) { + inTransaction := transactionID != 0 + err = ws.wrapper(ctx, target, ws.impl, "ReserveExecute", inTransaction, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { + var innerErr error + qr, reservedID, alias, innerErr = conn.ReserveExecute(ctx, target, sql, bindVariables, transactionID, options, preQueries) + // You cannot retry if you're in a transaction. + retryable := canRetry(ctx, innerErr) && (!inTransaction) + return retryable, innerErr + }) + return qr, reservedID, alias, err + +} + +func (ws *wrappedService) ReserveBeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (qr *sqltypes.Result, transactionID, reservedID int64, alias *topodatapb.TabletAlias, err error) { + err = ws.wrapper(ctx, target, ws.impl, "ReserveBeginExecute", false, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { + var innerErr error + qr, transactionID, reservedID, alias, innerErr = conn.ReserveBeginExecute(ctx, target, sql, bindVariables, options, preQueries) + return canRetry(ctx, innerErr), innerErr + }) + return qr, transactionID, reservedID, alias, err +} + +func (ws *wrappedService) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + return ws.wrapper(ctx, target, ws.impl, "ReserveRelease", false, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { + innerErr := conn.ReserveTransactionRelease(ctx, target, transactionID, reservedID) + return canRetry(ctx, innerErr), innerErr + }) +} + func (ws *wrappedService) VStream(ctx context.Context, target *querypb.Target, startPos string, filter *binlogdatapb.Filter, send func([]*binlogdatapb.VEvent) error) error { return ws.wrapper(ctx, target, ws.impl, "VStream", false, func(ctx context.Context, target *querypb.Target, conn QueryService) (bool, error) { innerErr := conn.VStream(ctx, target, startPos, filter, send) diff --git a/go/vt/vttablet/sandboxconn/sandboxconn.go b/go/vt/vttablet/sandboxconn/sandboxconn.go index a37d50ae556..e07ebd91a16 100644 --- a/go/vt/vttablet/sandboxconn/sandboxconn.go +++ b/go/vt/vttablet/sandboxconn/sandboxconn.go @@ -65,6 +65,7 @@ type SandboxConn struct { SetRollbackCount sync2.AtomicInt64 ConcludeTransactionCount sync2.AtomicInt64 ReadTransactionCount sync2.AtomicInt64 + ReserveCount sync2.AtomicInt64 // Queries stores the non-batch requests received. Queries []*querypb.BoundQuery @@ -93,6 +94,9 @@ type SandboxConn struct { // transaction id generator TransactionID sync2.AtomicInt64 + + // connection id generator + reservedID sync2.AtomicInt64 } var _ queryservice.QueryService = (*SandboxConn)(nil) // compile-time interface check @@ -122,7 +126,7 @@ func (sbc *SandboxConn) SetResults(r []*sqltypes.Result) { } // Execute is part of the QueryService interface. -func (sbc *SandboxConn) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (sbc *SandboxConn) Execute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, transactionID int64, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { sbc.ExecCount.Add(1) bv := make(map[string]*querypb.BindVariable) for k, v := range bindVars { @@ -186,6 +190,15 @@ func (sbc *SandboxConn) Begin(ctx context.Context, target *querypb.Target, optio return sbc.TransactionID.Add(1), sbc.tablet.Alias, nil } +func (sbc *SandboxConn) reserveConnection(ctx context.Context, target *querypb.Target, transactionID int64, options *querypb.ExecuteOptions) (int64, *topodatapb.TabletAlias, error) { + sbc.ReserveCount.Add(1) + err := sbc.getError() + if err != nil { + return 0, nil, err + } + return sbc.reservedID.Add(1), sbc.tablet.Alias, nil +} + // Commit is part of the QueryService interface. func (sbc *SandboxConn) Commit(ctx context.Context, target *querypb.Target, transactionID int64) error { sbc.CommitCount.Add(1) @@ -286,15 +299,43 @@ func (sbc *SandboxConn) ReadTransaction(ctx context.Context, target *querypb.Tar } // BeginExecute is part of the QueryService interface. -func (sbc *SandboxConn) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { +func (sbc *SandboxConn) BeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { transactionID, alias, err := sbc.Begin(ctx, target, options) if err != nil { return nil, 0, nil, err } - result, err := sbc.Execute(ctx, target, query, bindVars, transactionID, options) + result, err := sbc.Execute(ctx, target, query, bindVars, transactionID, reservedID, options) return result, transactionID, alias, err } +// ReserveBeginExecute is part of the QueryService interface. +func (sbc *SandboxConn) ReserveBeginExecute(ctx context.Context, target *querypb.Target, query string, bindVars map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, int64, *topodatapb.TabletAlias, error) { + reservedConnID, _, err := sbc.reserveConnection(ctx, target, 0, options) + // TODO(systay): fake execute preQueries + if err != nil { + return &sqltypes.Result{}, 0, 0, nil, err + } + qr, txID, alias, err := sbc.BeginExecute(ctx, target, query, bindVars, reservedConnID, options) + //TODO(systay): do we need special handling if err != nil + return qr, txID, reservedConnID, alias, err +} + +// ReserveTransactionRelease is part of the QueryService interface. +func (sbc *SandboxConn) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + return nil +} + +// ReserveExecute is part of the QueryService interface. +func (sbc *SandboxConn) ReserveExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (qr *sqltypes.Result, reservedID int64, alias *topodatapb.TabletAlias, err error) { + reservedID, alias, err = sbc.reserveConnection(ctx, target, transactionID, options) + // TODO(systay): fake execute preQueries + if err != nil { + return nil, 0, nil, err + } + qr, err = sbc.Execute(ctx, target, sql, bindVariables, transactionID, reservedID, options) + return qr, reservedID, alias, err +} + // BeginExecuteBatch is part of the QueryService interface. func (sbc *SandboxConn) BeginExecuteBatch(ctx context.Context, target *querypb.Target, queries []*querypb.BoundQuery, asTransaction bool, options *querypb.ExecuteOptions) ([]sqltypes.Result, int64, *topodatapb.TabletAlias, error) { transactionID, alias, err := sbc.Begin(ctx, target, options) diff --git a/go/vt/vttablet/tabletconntest/fakequeryservice.go b/go/vt/vttablet/tabletconntest/fakequeryservice.go index f49776f6164..bbd5744d8d9 100644 --- a/go/vt/vttablet/tabletconntest/fakequeryservice.go +++ b/go/vt/vttablet/tabletconntest/fakequeryservice.go @@ -60,6 +60,8 @@ type FakeQueryService struct { StreamHealthResponse *querypb.StreamHealthResponse } +var _ queryservice.QueryService = (*FakeQueryService)(nil) + // Close is a no-op. func (f *FakeQueryService) Close(ctx context.Context) error { return nil @@ -366,6 +368,9 @@ var ExecuteBindVars = map[string]*querypb.BindVariable{ // ExecuteTransactionID is a test transaction id. const ExecuteTransactionID int64 = 678 +// ReserveConnectionID is a test reserved connection id. +const ReserveConnectionID int64 = 933 + // ExecuteQueryResult is a test query result. var ExecuteQueryResult = sqltypes.Result{ Fields: []*querypb.Field{ @@ -393,7 +398,7 @@ var ExecuteQueryResult = sqltypes.Result{ } // Execute is part of the queryservice.QueryService interface -func (f *FakeQueryService) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { +func (f *FakeQueryService) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) { if f.HasError { return nil, f.TabletError } @@ -575,14 +580,14 @@ func (f *FakeQueryService) ExecuteBatch(ctx context.Context, target *querypb.Tar } // BeginExecute combines Begin and Execute. -func (f *FakeQueryService) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { +func (f *FakeQueryService) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { transactionID, _, err := f.Begin(ctx, target, options) if err != nil { return nil, 0, nil, err } // TODO(deepthi): what alias should we actually return here? - result, err := f.Execute(ctx, target, sql, bindVariables, transactionID, options) + result, err := f.Execute(ctx, target, sql, bindVariables, transactionID, reservedID, options) return result, transactionID, nil, err } @@ -598,6 +603,21 @@ func (f *FakeQueryService) BeginExecuteBatch(ctx context.Context, target *queryp return results, transactionID, nil, err } +//ReserveExecute implements QueryService interface +func (f *FakeQueryService) ReserveExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { + panic("implement me") +} + +//ReserveBeginExecute implements QueryService interface +func (f *FakeQueryService) ReserveBeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, int64, *topodatapb.TabletAlias, error) { + panic("implement me") +} + +//ReserveTransactionRelease implements QueryService interface +func (f *FakeQueryService) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + panic("implement me") +} + var ( // MessageName is a test message name. MessageName = "vitess_message" diff --git a/go/vt/vttablet/tabletconntest/tabletconntest.go b/go/vt/vttablet/tabletconntest/tabletconntest.go index 80a01603cd0..cd564868bd2 100644 --- a/go/vt/vttablet/tabletconntest/tabletconntest.go +++ b/go/vt/vttablet/tabletconntest/tabletconntest.go @@ -398,7 +398,9 @@ func testExecute(t *testing.T, conn queryservice.QueryService, f *FakeQueryServi f.ExpectedTransactionID = ExecuteTransactionID ctx := context.Background() ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) - qr, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, TestExecuteOptions) + // TODO(systay): pass 0 or ReserveID? + // maybe we need to duplicate these tests for the two cases + qr, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, ReserveConnectionID, TestExecuteOptions) if err != nil { t.Fatalf("Execute failed: %v", err) } @@ -411,7 +413,7 @@ func testExecuteError(t *testing.T, conn queryservice.QueryService, f *FakeQuery t.Log("testExecuteError") f.HasError = true testErrorHelper(t, f, "Execute", func(ctx context.Context) error { - _, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, TestExecuteOptions) + _, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, ReserveConnectionID, TestExecuteOptions) return err }) f.HasError = false @@ -420,7 +422,7 @@ func testExecuteError(t *testing.T, conn queryservice.QueryService, f *FakeQuery func testExecutePanics(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { t.Log("testExecutePanics") testPanicHelper(t, f, "Execute", func(ctx context.Context) error { - _, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, TestExecuteOptions) + _, err := conn.Execute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ExecuteTransactionID, ReserveConnectionID, TestExecuteOptions) return err }) } @@ -430,7 +432,7 @@ func testBeginExecute(t *testing.T, conn queryservice.QueryService, f *FakeQuery f.ExpectedTransactionID = beginTransactionID ctx := context.Background() ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) - qr, transactionID, alias, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, TestExecuteOptions) + qr, transactionID, alias, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ReserveConnectionID, TestExecuteOptions) if err != nil { t.Fatalf("BeginExecute failed: %v", err) } @@ -447,7 +449,7 @@ func testBeginExecuteErrorInBegin(t *testing.T, conn queryservice.QueryService, t.Log("testBeginExecuteErrorInBegin") f.HasBeginError = true testErrorHelper(t, f, "BeginExecute.Begin", func(ctx context.Context) error { - _, transactionID, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, TestExecuteOptions) + _, transactionID, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ReserveConnectionID, TestExecuteOptions) if transactionID != 0 { t.Errorf("Unexpected transactionID from BeginExecute: got %v wanted 0", transactionID) } @@ -461,7 +463,7 @@ func testBeginExecuteErrorInExecute(t *testing.T, conn queryservice.QueryService f.HasError = true testErrorHelper(t, f, "BeginExecute.Execute", func(ctx context.Context) error { ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) - _, transactionID, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, TestExecuteOptions) + _, transactionID, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ReserveConnectionID, TestExecuteOptions) if transactionID != beginTransactionID { t.Errorf("Unexpected transactionID from BeginExecute: got %v wanted %v", transactionID, beginTransactionID) } @@ -473,7 +475,7 @@ func testBeginExecuteErrorInExecute(t *testing.T, conn queryservice.QueryService func testBeginExecutePanics(t *testing.T, conn queryservice.QueryService, f *FakeQueryService) { t.Log("testBeginExecutePanics") testPanicHelper(t, f, "BeginExecute", func(ctx context.Context) error { - _, _, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, TestExecuteOptions) + _, _, _, err := conn.BeginExecute(ctx, TestTarget, ExecuteQuery, ExecuteBindVars, ReserveConnectionID, TestExecuteOptions) return err }) } diff --git a/go/vt/vttablet/tabletserver/bench_test.go b/go/vt/vttablet/tabletserver/bench_test.go index 496b70230ab..c757454db45 100644 --- a/go/vt/vttablet/tabletserver/bench_test.go +++ b/go/vt/vttablet/tabletserver/bench_test.go @@ -77,7 +77,7 @@ func BenchmarkExecuteVarBinary(b *testing.B) { db.AllowAll = true for i := 0; i < b.N; i++ { - if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, nil); err != nil { + if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, 0, nil); err != nil { panic(err) } } @@ -107,7 +107,7 @@ func BenchmarkExecuteExpression(b *testing.B) { db.AllowAll = true for i := 0; i < b.N; i++ { - if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, nil); err != nil { + if _, err := tsv.Execute(context.Background(), &target, benchQuery, bv, 0, 0, nil); err != nil { panic(err) } } diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index dcf1951f937..b0ef4156623 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -692,6 +692,7 @@ func (tsv *TabletServer) IsHealthy() error { "/* health */ select 1 from dual", nil, 0, + 0, nil, ) return err @@ -984,7 +985,7 @@ func (tsv *TabletServer) ReadTransaction(ctx context.Context, target *querypb.Ta } // Execute executes the query and returns the result as response. -func (tsv *TabletServer) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions) (result *sqltypes.Result, err error) { +func (tsv *TabletServer) Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, reservedID int64, options *querypb.ExecuteOptions) (result *sqltypes.Result, err error) { span, ctx := trace.NewSpan(ctx, "TabletServer.Execute") trace.AnnotateSQL(span, sql) defer span.Finish() @@ -1133,7 +1134,7 @@ func (tsv *TabletServer) ExecuteBatch(ctx context.Context, target *querypb.Targe } results = make([]sqltypes.Result, 0, len(queries)) for _, bound := range queries { - localReply, err := tsv.Execute(ctx, target, bound.Sql, bound.BindVariables, transactionID, options) + localReply, err := tsv.Execute(ctx, target, bound.Sql, bound.BindVariables, transactionID, 0, options) if err != nil { return nil, err } @@ -1150,7 +1151,7 @@ func (tsv *TabletServer) ExecuteBatch(ctx context.Context, target *querypb.Targe } // BeginExecute combines Begin and Execute. -func (tsv *TabletServer) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { +func (tsv *TabletServer) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, reservedID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { if tsv.enableHotRowProtection { txDone, err := tsv.beginWaitForSameRangeTransactions(ctx, target, options, sql, bindVariables) if err != nil { @@ -1166,7 +1167,7 @@ func (tsv *TabletServer) BeginExecute(ctx context.Context, target *querypb.Targe return nil, 0, nil, err } - result, err := tsv.Execute(ctx, target, sql, bindVariables, transactionID, options) + result, err := tsv.Execute(ctx, target, sql, bindVariables, transactionID, reservedID, options) return result, transactionID, alias, err } @@ -1317,6 +1318,44 @@ func (tsv *TabletServer) PurgeMessages(ctx context.Context, target *querypb.Targ }) } +// placeholder. actual reserve logic to be implemented in TxEngine +func (tsv *TabletServer) reserveConnection(ctx context.Context, target *querypb.Target, transactionID int64, options *querypb.ExecuteOptions) (int64, *topodatapb.TabletAlias, error) { + panic("implement me") +} + +// placeholder. actual release logic to be implemented in TxEngine +func (tsv *TabletServer) releaseConnection(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) (err error) { + panic("implement me") +} + +// ReserveExecute reserves a connection and then executes sql on it +func (tsv *TabletServer) ReserveExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, transactionID int64, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, *topodatapb.TabletAlias, error) { + reservedConnID, alias, err := tsv.reserveConnection(ctx, target, transactionID, options) + if err != nil { + return nil, 0, nil, err + } + // TODO(systay): execute preQueries + qr, err := tsv.Execute(ctx, target, sql, bindVariables, transactionID, reservedConnID, options) + return qr, reservedConnID, alias, err +} + +// ReserveBeginExecute performs a reserve following by BeginExecute +func (tsv *TabletServer) ReserveBeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]*querypb.BindVariable, options *querypb.ExecuteOptions, preQueries []string) (*sqltypes.Result, int64, int64, *topodatapb.TabletAlias, error) { + reservedConnID, _, err := tsv.reserveConnection(ctx, target, 0, options) + if err != nil { + return nil, 0, 0, nil, err + } + // TODO(systay): execute preQueries + qr, txID, alias, err := tsv.BeginExecute(ctx, target, sql, bindVariables, reservedConnID, options) + // TODO(systay): special handling for err != nil? + return qr, txID, reservedConnID, alias, err +} + +// ReserveTransactionRelease releases a reserved connection +func (tsv *TabletServer) ReserveTransactionRelease(ctx context.Context, target *querypb.Target, transactionID, reservedID int64) error { + return tsv.releaseConnection(ctx, target, transactionID, reservedID) +} + func (tsv *TabletServer) execDML(ctx context.Context, target *querypb.Target, queryGenerator func() (string, map[string]*querypb.BindVariable, error)) (count int64, err error) { if err = tsv.startRequest(ctx, target, false /* allowOnShutdown */); err != nil { return 0, err @@ -1340,7 +1379,8 @@ func (tsv *TabletServer) execDML(ctx context.Context, target *querypb.Target, qu tsv.Rollback(ctx, target, transactionID) } }() - qr, err := tsv.Execute(ctx, target, query, bv, transactionID, nil) + // TODO(deepthi): are we sure reservedID can be passed as 0 here? + qr, err := tsv.Execute(ctx, target, query, bv, transactionID, 0, nil) if err != nil { return 0, err } diff --git a/go/vt/vttablet/tabletserver/tabletserver_test.go b/go/vt/vttablet/tabletserver/tabletserver_test.go index 2478f92ee76..af1ee11e63f 100644 --- a/go/vt/vttablet/tabletserver/tabletserver_test.go +++ b/go/vt/vttablet/tabletserver/tabletserver_test.go @@ -344,12 +344,12 @@ func TestTabletServerReconnect(t *testing.T) { if err != nil { t.Fatalf("TabletServer.StartService should success but get error: %v", err) } - _, err = tsv.Execute(context.Background(), &target, query, nil, 0, nil) + _, err = tsv.Execute(context.Background(), &target, query, nil, 0, 0, nil) require.NoError(t, err) // make mysql conn fail db.Close() - _, err = tsv.Execute(context.Background(), &target, query, nil, 0, nil) + _, err = tsv.Execute(context.Background(), &target, query, nil, 0, 0, nil) if err == nil { t.Error("Execute: want error, got nil") } @@ -365,7 +365,7 @@ func TestTabletServerReconnect(t *testing.T) { dbcfgs = newDBConfigs(db) err = tsv.StartService(target, dbcfgs) require.NoError(t, err) - _, err = tsv.Execute(context.Background(), &target, query, nil, 0, nil) + _, err = tsv.Execute(context.Background(), &target, query, nil, 0, 0, nil) require.NoError(t, err) } @@ -388,28 +388,28 @@ func TestTabletServerTarget(t *testing.T) { // query that works db.AddQuery("select * from test_table limit 1000", &sqltypes.Result{}) - _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, 0, nil) require.NoError(t, err) // wrong tablet type target2 := proto.Clone(&target1).(*querypb.Target) target2.TabletType = topodatapb.TabletType_REPLICA - _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, 0, nil) want := "invalid tablet type" require.Error(t, err) assert.Contains(t, err.Error(), want) // set expected target type to MASTER, but also accept REPLICA tsv.SetServingType(topodatapb.TabletType_MASTER, true, []topodatapb.TabletType{topodatapb.TabletType_REPLICA}) - _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, 0, nil) require.NoError(t, err) - _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, 0, nil) require.NoError(t, err) // wrong keyspace target2 = proto.Clone(&target1).(*querypb.Target) target2.Keyspace = "bad" - _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, 0, nil) want = "invalid keyspace bad" require.Error(t, err) assert.Contains(t, err.Error(), want) @@ -417,20 +417,20 @@ func TestTabletServerTarget(t *testing.T) { // wrong shard target2 = proto.Clone(&target1).(*querypb.Target) target2.Shard = "bad" - _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, target2, "select * from test_table limit 1000", nil, 0, 0, nil) want = "invalid shard bad" require.Error(t, err) assert.Contains(t, err.Error(), want) // no target - _, err = tsv.Execute(ctx, nil, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, nil, "select * from test_table limit 1000", nil, 0, 0, nil) want = "No target" require.Error(t, err) assert.Contains(t, err.Error(), want) // Disallow all if service is stopped. tsv.StopService() - _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, nil) + _, err = tsv.Execute(ctx, &target1, "select * from test_table limit 1000", nil, 0, 0, nil) want = "operation not allowed in state NOT_SERVING" require.Error(t, err) assert.Contains(t, err.Error(), want) @@ -478,7 +478,7 @@ func TestTabletServerMasterToReplica(t *testing.T) { txid1, _, err := tsv.Begin(ctx, &target, nil) require.NoError(t, err) - _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, txid1, nil) + _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, txid1, 0, nil) require.NoError(t, err) err = tsv.Prepare(ctx, &target, txid1, "aa") require.NoError(t, err) @@ -793,7 +793,7 @@ func TestTabletServerCommitTransaction(t *testing.T) { if err != nil { t.Fatalf("call TabletServer.Begin failed: %v", err) } - if _, err := tsv.Execute(ctx, &target, executeSQL, nil, transactionID, nil); err != nil { + if _, err := tsv.Execute(ctx, &target, executeSQL, nil, transactionID, 0, nil); err != nil { t.Fatalf("failed to execute query: %s: %s", executeSQL, err) } if err := tsv.Commit(ctx, &target, transactionID); err != nil { @@ -851,7 +851,7 @@ func TestTabletServerRollback(t *testing.T) { if err != nil { t.Fatalf("call TabletServer.Begin failed: %v", err) } - if _, err := tsv.Execute(ctx, &target, executeSQL, nil, transactionID, nil); err != nil { + if _, err := tsv.Execute(ctx, &target, executeSQL, nil, transactionID, 0, nil); err != nil { t.Fatalf("failed to execute query: %s: %v", executeSQL, err) } if err := tsv.Rollback(ctx, &target, transactionID); err != nil { @@ -867,7 +867,7 @@ func TestTabletServerPrepare(t *testing.T) { target := querypb.Target{TabletType: topodatapb.TabletType_MASTER} transactionID, _, err := tsv.Begin(ctx, &target, nil) require.NoError(t, err) - _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, nil) + _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, 0, nil) require.NoError(t, err) defer tsv.RollbackPrepared(ctx, &target, "aa", 0) err = tsv.Prepare(ctx, &target, transactionID, "aa") @@ -882,7 +882,7 @@ func TestTabletServerCommitPrepared(t *testing.T) { target := querypb.Target{TabletType: topodatapb.TabletType_MASTER} transactionID, _, err := tsv.Begin(ctx, &target, nil) require.NoError(t, err) - _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, nil) + _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, 0, nil) require.NoError(t, err) err = tsv.Prepare(ctx, &target, transactionID, "aa") require.NoError(t, err) @@ -899,7 +899,7 @@ func TestTabletServerRollbackPrepared(t *testing.T) { target := querypb.Target{TabletType: topodatapb.TabletType_MASTER} transactionID, _, err := tsv.Begin(ctx, &target, nil) require.NoError(t, err) - _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, nil) + _, err = tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, transactionID, 0, nil) require.NoError(t, err) err = tsv.Prepare(ctx, &target, transactionID, "aa") require.NoError(t, err) @@ -1279,7 +1279,7 @@ func TestSerializeTransactionsSameRow(t *testing.T) { go func() { defer wg.Done() - _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, nil) + _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q1, err) } @@ -1294,7 +1294,7 @@ func TestSerializeTransactionsSameRow(t *testing.T) { defer wg.Done() <-tx1Started - _, tx2, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, nil) + _, tx2, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q2, err) } @@ -1314,7 +1314,7 @@ func TestSerializeTransactionsSameRow(t *testing.T) { defer wg.Done() <-tx1Started - _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, nil) + _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q3, err) } @@ -1351,7 +1351,7 @@ func TestDMLQueryWithoutWhereClause(t *testing.T) { db.AddQuery(q+" limit 10001", &sqltypes.Result{}) - _, txid, _, err := tsv.BeginExecute(ctx, &target, q, nil, nil) + _, txid, _, err := tsv.BeginExecute(ctx, &target, q, nil, 0, nil) require.NoError(t, err) err = tsv.Commit(ctx, &target, txid) require.NoError(t, err) @@ -1539,7 +1539,7 @@ func TestSerializeTransactionsSameRow_ConcurrentTransactions(t *testing.T) { go func() { defer wg.Done() - _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, nil) + _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q1, err) } @@ -1558,7 +1558,7 @@ func TestSerializeTransactionsSameRow_ConcurrentTransactions(t *testing.T) { // In that case, we would see less than 3 pending transactions. <-tx1Started - _, tx2, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, nil) + _, tx2, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q2, err) } @@ -1577,7 +1577,7 @@ func TestSerializeTransactionsSameRow_ConcurrentTransactions(t *testing.T) { // In that case, we would see less than 3 pending transactions. <-tx1Started - _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, nil) + _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q3, err) } @@ -1675,7 +1675,7 @@ func TestSerializeTransactionsSameRow_TooManyPendingRequests(t *testing.T) { go func() { defer wg.Done() - _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, nil) + _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q1, err) } @@ -1691,7 +1691,7 @@ func TestSerializeTransactionsSameRow_TooManyPendingRequests(t *testing.T) { defer close(tx2Failed) <-tx1Started - _, _, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, nil) + _, _, _, err := tsv.BeginExecute(ctx, &target, q2, bvTx2, 0, nil) if err == nil || vterrors.Code(err) != vtrpcpb.Code_RESOURCE_EXHAUSTED || err.Error() != "hot row protection: too many queued transactions (1 >= 1) for the same row (table + WHERE clause: 'test_table where pk = 1 and name = 1')" { t.Errorf("tx2 should have failed because there are too many pending requests: %v", err) } @@ -1858,7 +1858,7 @@ func TestSerializeTransactionsSameRow_RequestCanceled(t *testing.T) { go func() { defer wg.Done() - _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, nil) + _, tx1, _, err := tsv.BeginExecute(ctx, &target, q1, bvTx1, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q1, err) } @@ -1878,7 +1878,7 @@ func TestSerializeTransactionsSameRow_RequestCanceled(t *testing.T) { // Wait until tx1 has started to make the test deterministic. <-tx1Started - _, _, _, err := tsv.BeginExecute(ctxTx2, &target, q2, bvTx2, nil) + _, _, _, err := tsv.BeginExecute(ctxTx2, &target, q2, bvTx2, 0, nil) if err == nil || vterrors.Code(err) != vtrpcpb.Code_CANCELED || err.Error() != "context canceled" { t.Errorf("tx2 should have failed because the context was canceled: %v", err) } @@ -1895,7 +1895,7 @@ func TestSerializeTransactionsSameRow_RequestCanceled(t *testing.T) { t.Error(err) } - _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, nil) + _, tx3, _, err := tsv.BeginExecute(ctx, &target, q3, bvTx3, 0, nil) if err != nil { t.Errorf("failed to execute query: %s: %s", q3, err) } diff --git a/go/vt/vttablet/tabletserver/tx_executor_test.go b/go/vt/vttablet/tabletserver/tx_executor_test.go index b8c2c02aa8c..efd3a9b8868 100644 --- a/go/vt/vttablet/tabletserver/tx_executor_test.go +++ b/go/vt/vttablet/tabletserver/tx_executor_test.go @@ -541,7 +541,7 @@ func newNoTwopcExecutor(t *testing.T) (txe *TxExecutor, tsv *TabletServer, db *f func newTxForPrep(tsv *TabletServer) int64 { txid := newTransaction(tsv, nil) target := querypb.Target{TabletType: topodatapb.TabletType_MASTER} - _, err := tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, txid, nil) + _, err := tsv.Execute(ctx, &target, "update test_table set name = 2 where pk = 1", nil, txid, 0, nil) if err != nil { panic(err) } diff --git a/go/vtbench/client.go b/go/vtbench/client.go index dc29d3dc423..1bc36c78460 100644 --- a/go/vtbench/client.go +++ b/go/vtbench/client.go @@ -160,5 +160,5 @@ func (c *grpcVttabletConn) connect(ctx context.Context, cp ConnParams) error { } func (c *grpcVttabletConn) execute(ctx context.Context, query string, bindVars map[string]*querypb.BindVariable) (*sqltypes.Result, error) { - return c.qs.Execute(ctx, &c.target, query, bindVars, 0, nil) + return c.qs.Execute(ctx, &c.target, query, bindVars, 0, 0, nil) } diff --git a/proto/query.proto b/proto/query.proto index 2f67758154c..f9ed5aa25d7 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -404,6 +404,7 @@ message ExecuteRequest { BoundQuery query = 4; int64 transaction_id = 5; ExecuteOptions options = 6; + int64 reserved_id = 7; } // ExecuteResponse is the returned value from Execute @@ -591,6 +592,7 @@ message BeginExecuteRequest { Target target = 3; BoundQuery query = 4; ExecuteOptions options = 5; + int64 reserved_id = 6; } // BeginExecuteResponse is the returned value from BeginExecute @@ -663,6 +665,62 @@ message MessageAckResponse { QueryResult result = 1; } +// ReserveExecuteRequest is the payload to ReserveExecute +message ReserveExecuteRequest { + vtrpc.CallerID effective_caller_id = 1; + VTGateCallerID immediate_caller_id = 2; + Target target = 3; + BoundQuery query = 4; + int64 transaction_id = 5; + ExecuteOptions options = 6; + repeated string pre_queries = 7; +} + +// ReserveExecuteResponse is the returned value from ReserveExecute +message ReserveExecuteResponse { + vtrpc.RPCError error = 1; + QueryResult result = 2; + int64 reserved_id = 3; + topodata.TabletAlias tablet_alias = 4; +} + +// ReserveBeginExecuteRequest is the payload to ReserveBeginExecute +message ReserveBeginExecuteRequest { + vtrpc.CallerID effective_caller_id = 1; + VTGateCallerID immediate_caller_id = 2; + Target target = 3; + BoundQuery query = 4; + ExecuteOptions options = 5; + repeated string pre_queries = 6; +} + +// ReserveBeginExecuteResponse is the returned value from ReserveBeginExecute +message ReserveBeginExecuteResponse { + // error contains an application level error if necessary. Note the + // transaction_id may be set, even when an error is returned, if the begin + // worked but the execute failed. + vtrpc.RPCError error = 1; + QueryResult result = 2; + // The following fields might be non-zero even if an error is present. + int64 transaction_id = 3; + topodata.TabletAlias tablet_alias = 4; + int64 reserved_id = 5; +} + +// ReserveTransactionReleaseRequest is the payload to ReserveTransactionRelease +message ReserveTransactionReleaseRequest { + vtrpc.CallerID effective_caller_id = 1; + VTGateCallerID immediate_caller_id = 2; + Target target = 3; + int64 transaction_id = 4; + int64 reserved_id = 5; +} + +// ReserveTransactionReleaseResponse is the returned value from ReserveTransactionRelease +message ReserveTransactionReleaseResponse { + vtrpc.RPCError error = 1; +} + // StreamHealthRequest is the payload for StreamHealth message StreamHealthRequest { } diff --git a/proto/queryservice.proto b/proto/queryservice.proto index a1ccabdfe71..d7385ef6d19 100644 --- a/proto/queryservice.proto +++ b/proto/queryservice.proto @@ -85,6 +85,10 @@ service Query { // MessageAck acks messages for a table. rpc MessageAck(query.MessageAckRequest) returns (query.MessageAckResponse) {}; + rpc ReserveExecute(query.ReserveExecuteRequest) returns (query.ReserveExecuteResponse) {}; + rpc ReserveBeginExecute(query.ReserveBeginExecuteRequest) returns (query.ReserveBeginExecuteResponse) {}; + rpc ReserveTransactionRelease(query.ReserveTransactionReleaseRequest) returns (query.ReserveTransactionReleaseResponse) {}; + // StreamHealth runs a streaming RPC to the tablet, that returns the // current health of the tablet on a regular basis. rpc StreamHealth(query.StreamHealthRequest) returns (stream query.StreamHealthResponse) {}; diff --git a/proto/vtgate.proto b/proto/vtgate.proto index 32576b5741a..21ba0651573 100644 --- a/proto/vtgate.proto +++ b/proto/vtgate.proto @@ -73,15 +73,14 @@ message Session { query.Target target = 1; int64 transaction_id = 2; topodata.TabletAlias tablet_alias = 3; + // reserved connection if a dedicated connection is needed + int64 reserved_id = 4; } // shard_sessions keep track of per-shard transaction info. repeated ShardSession shard_sessions = 2; // single_db is deprecated. Use transaction_mode instead. - // The value specifies if the transaction should be restricted - // to a single shard. - // TODO(sougou): remove in 3.1 - bool single_db = 3; + reserved 3; // autocommit specifies if the session is in autocommit mode. // This is used only for V3.