From a483c92c37b37ee0ffef98d38e843ad9a220f5d8 Mon Sep 17 00:00:00 2001 From: Alain Jobart Date: Wed, 5 Aug 2015 14:49:58 -0700 Subject: [PATCH] Removing error in the app-level responses for queryservice / proto3. --- go/vt/proto/query/query.pb.go | 76 +----- go/vt/tabletserver/grpcqueryservice/server.go | 72 +++--- go/vt/tabletserver/grpctabletconn/conn.go | 49 +--- .../tabletconntest/tabletconntest.go | 222 +----------------- proto/query.proto | 26 +- py/vtproto/query_pb2.py | 160 ++++--------- 6 files changed, 97 insertions(+), 508 deletions(-) diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 4bf07e52fc..5b39b60ba3 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -398,21 +398,13 @@ func (m *GetSessionIdRequest) GetImmediateCallerId() *VTGateCallerID { // GetSessionIdResponse is the returned value from GetSessionId type GetSessionIdResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - SessionId int64 `protobuf:"varint,2,opt,name=session_id" json:"session_id,omitempty"` + SessionId int64 `protobuf:"varint,1,opt,name=session_id" json:"session_id,omitempty"` } func (m *GetSessionIdResponse) Reset() { *m = GetSessionIdResponse{} } func (m *GetSessionIdResponse) String() string { return proto.CompactTextString(m) } func (*GetSessionIdResponse) ProtoMessage() {} -func (m *GetSessionIdResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - // ExecuteRequest is the payload to Execute type ExecuteRequest struct { EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"` @@ -457,21 +449,13 @@ func (m *ExecuteRequest) GetQuery() *BoundQuery { // ExecuteResponse is the returned value from Execute type ExecuteResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - Result *QueryResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` } func (m *ExecuteResponse) Reset() { *m = ExecuteResponse{} } func (m *ExecuteResponse) String() string { return proto.CompactTextString(m) } func (*ExecuteResponse) ProtoMessage() {} -func (m *ExecuteResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - func (m *ExecuteResponse) GetResult() *QueryResult { if m != nil { return m.Result @@ -524,21 +508,13 @@ func (m *ExecuteBatchRequest) GetQueries() []*BoundQuery { // ExecuteBatchResponse is the returned value from ExecuteBatch type ExecuteBatchResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - Results []*QueryResult `protobuf:"bytes,2,rep,name=results" json:"results,omitempty"` + Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` } func (m *ExecuteBatchResponse) Reset() { *m = ExecuteBatchResponse{} } func (m *ExecuteBatchResponse) String() string { return proto.CompactTextString(m) } func (*ExecuteBatchResponse) ProtoMessage() {} -func (m *ExecuteBatchResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - func (m *ExecuteBatchResponse) GetResults() []*QueryResult { if m != nil { return m.Results @@ -589,21 +565,13 @@ func (m *StreamExecuteRequest) GetQuery() *BoundQuery { // StreamExecuteResponse is the returned value from StreamExecute type StreamExecuteResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - Result *QueryResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` } func (m *StreamExecuteResponse) Reset() { *m = StreamExecuteResponse{} } func (m *StreamExecuteResponse) String() string { return proto.CompactTextString(m) } func (*StreamExecuteResponse) ProtoMessage() {} -func (m *StreamExecuteResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - func (m *StreamExecuteResponse) GetResult() *QueryResult { if m != nil { return m.Result @@ -646,21 +614,13 @@ func (m *BeginRequest) GetTarget() *Target { // BeginResponse is the returned value from Begin type BeginResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - TransactionId int64 `protobuf:"varint,2,opt,name=transaction_id" json:"transaction_id,omitempty"` + TransactionId int64 `protobuf:"varint,1,opt,name=transaction_id" json:"transaction_id,omitempty"` } func (m *BeginResponse) Reset() { *m = BeginResponse{} } func (m *BeginResponse) String() string { return proto.CompactTextString(m) } func (*BeginResponse) ProtoMessage() {} -func (m *BeginResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - // CommitRequest is the payload to Commit type CommitRequest struct { EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"` @@ -697,20 +657,12 @@ func (m *CommitRequest) GetTarget() *Target { // CommitResponse is the returned value from Commit type CommitResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` } func (m *CommitResponse) Reset() { *m = CommitResponse{} } func (m *CommitResponse) String() string { return proto.CompactTextString(m) } func (*CommitResponse) ProtoMessage() {} -func (m *CommitResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - // RollbackRequest is the payload to Rollback type RollbackRequest struct { EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"` @@ -747,20 +699,12 @@ func (m *RollbackRequest) GetTarget() *Target { // RollbackResponse is the returned value from Rollback type RollbackResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` } func (m *RollbackResponse) Reset() { *m = RollbackResponse{} } func (m *RollbackResponse) String() string { return proto.CompactTextString(m) } func (*RollbackResponse) ProtoMessage() {} -func (m *RollbackResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - // SplitQueryRequest is the payload for SplitQuery type SplitQueryRequest struct { EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"` @@ -826,21 +770,13 @@ func (m *QuerySplit) GetQuery() *BoundQuery { // SplitQueryResponse is returned by SplitQuery and represents all the queries // to execute in order to get the entire data set. type SplitQueryResponse struct { - Error *vtrpc.RPCError `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - Queries []*QuerySplit `protobuf:"bytes,2,rep,name=queries" json:"queries,omitempty"` + Queries []*QuerySplit `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` } func (m *SplitQueryResponse) Reset() { *m = SplitQueryResponse{} } func (m *SplitQueryResponse) String() string { return proto.CompactTextString(m) } func (*SplitQueryResponse) ProtoMessage() {} -func (m *SplitQueryResponse) GetError() *vtrpc.RPCError { - if m != nil { - return m.Error - } - return nil -} - func (m *SplitQueryResponse) GetQueries() []*QuerySplit { if m != nil { return m.Queries diff --git a/go/vt/tabletserver/grpcqueryservice/server.go b/go/vt/tabletserver/grpcqueryservice/server.go index eb8d5a51ca..bad227e468 100644 --- a/go/vt/tabletserver/grpcqueryservice/server.go +++ b/go/vt/tabletserver/grpcqueryservice/server.go @@ -33,14 +33,15 @@ func (q *query) GetSessionId(ctx context.Context, request *pb.GetSessionIdReques defer q.server.HandlePanic(&err) sessionInfo := new(proto.SessionInfo) - gsiErr := q.server.GetSessionId(&proto.SessionParams{ + if err := q.server.GetSessionId(&proto.SessionParams{ Keyspace: request.Keyspace, Shard: request.Shard, - }, sessionInfo) + }, sessionInfo); err != nil { + return nil, err + } return &pb.GetSessionIdResponse{ SessionId: sessionInfo.SessionId, - Error: tabletserver.TabletErrorToRPCError(gsiErr), }, nil } @@ -52,16 +53,13 @@ func (q *query) Execute(ctx context.Context, request *pb.ExecuteRequest) (respon request.GetImmediateCallerId(), ) reply := new(mproto.QueryResult) - execErr := q.server.Execute(ctx, request.Target, &proto.Query{ + if err := q.server.Execute(ctx, request.Target, &proto.Query{ Sql: string(request.Query.Sql), BindVariables: proto.Proto3ToBindVariables(request.Query.BindVariables), SessionId: request.SessionId, TransactionId: request.TransactionId, - }, reply) - if execErr != nil { - return &pb.ExecuteResponse{ - Error: tabletserver.TabletErrorToRPCError(execErr), - }, nil + }, reply); err != nil { + return nil, err } return &pb.ExecuteResponse{ Result: mproto.QueryResultToProto3(reply), @@ -76,16 +74,13 @@ func (q *query) ExecuteBatch(ctx context.Context, request *pb.ExecuteBatchReques request.GetImmediateCallerId(), ) reply := new(proto.QueryResultList) - execErr := q.server.ExecuteBatch(ctx, request.Target, &proto.QueryList{ + if err := q.server.ExecuteBatch(ctx, request.Target, &proto.QueryList{ Queries: proto.Proto3ToBoundQueryList(request.Queries), SessionId: request.SessionId, AsTransaction: request.AsTransaction, TransactionId: request.TransactionId, - }, reply) - if execErr != nil { - return &pb.ExecuteBatchResponse{ - Error: tabletserver.TabletErrorToRPCError(execErr), - }, nil + }, reply); err != nil { + return nil, err } return &pb.ExecuteBatchResponse{ Results: proto.QueryResultListToProto3(reply.List), @@ -99,7 +94,7 @@ func (q *query) StreamExecute(request *pb.StreamExecuteRequest, stream pbs.Query request.GetEffectiveCallerId(), request.GetImmediateCallerId(), ) - seErr := q.server.StreamExecute(ctx, request.Target, &proto.Query{ + return q.server.StreamExecute(ctx, request.Target, &proto.Query{ Sql: string(request.Query.Sql), BindVariables: proto.Proto3ToBindVariables(request.Query.BindVariables), SessionId: request.SessionId, @@ -108,15 +103,6 @@ func (q *query) StreamExecute(request *pb.StreamExecuteRequest, stream pbs.Query Result: mproto.QueryResultToProto3(reply), }) }) - if seErr != nil { - response := &pb.StreamExecuteResponse{ - Error: tabletserver.TabletErrorToRPCError(seErr), - } - if err := stream.Send(response); err != nil { - return err - } - } - return nil } // Begin is part of the queryservice.QueryServer interface @@ -127,12 +113,10 @@ func (q *query) Begin(ctx context.Context, request *pb.BeginRequest) (response * request.GetImmediateCallerId(), ) txInfo := new(proto.TransactionInfo) - if beginErr := q.server.Begin(ctx, request.Target, &proto.Session{ + if err := q.server.Begin(ctx, request.Target, &proto.Session{ SessionId: request.SessionId, - }, txInfo); beginErr != nil { - return &pb.BeginResponse{ - Error: tabletserver.TabletErrorToRPCError(beginErr), - }, nil + }, txInfo); err != nil { + return nil, err } return &pb.BeginResponse{ @@ -147,13 +131,13 @@ func (q *query) Commit(ctx context.Context, request *pb.CommitRequest) (response request.GetEffectiveCallerId(), request.GetImmediateCallerId(), ) - commitErr := q.server.Commit(ctx, request.Target, &proto.Session{ + if err := q.server.Commit(ctx, request.Target, &proto.Session{ SessionId: request.SessionId, TransactionId: request.TransactionId, - }) - return &pb.CommitResponse{ - Error: tabletserver.TabletErrorToRPCError(commitErr), - }, nil + }); err != nil { + return nil, err + } + return &pb.CommitResponse{}, nil } // Rollback is part of the queryservice.QueryServer interface @@ -163,14 +147,14 @@ func (q *query) Rollback(ctx context.Context, request *pb.RollbackRequest) (resp request.GetEffectiveCallerId(), request.GetImmediateCallerId(), ) - rollbackErr := q.server.Rollback(ctx, request.Target, &proto.Session{ + if err := q.server.Rollback(ctx, request.Target, &proto.Session{ SessionId: request.SessionId, TransactionId: request.TransactionId, - }) + }); err != nil { + return nil, err + } - return &pb.RollbackResponse{ - Error: tabletserver.TabletErrorToRPCError(rollbackErr), - }, nil + return &pb.RollbackResponse{}, nil } // SplitQuery is part of the queryservice.QueryServer interface @@ -181,15 +165,13 @@ func (q *query) SplitQuery(ctx context.Context, request *pb.SplitQueryRequest) ( request.GetImmediateCallerId(), ) reply := &proto.SplitQueryResult{} - if sqErr := q.server.SplitQuery(ctx, request.Target, &proto.SplitQueryRequest{ + if err := q.server.SplitQuery(ctx, request.Target, &proto.SplitQueryRequest{ Query: *proto.Proto3ToBoundQuery(request.Query), SplitColumn: request.SplitColumn, SplitCount: int(request.SplitCount), SessionID: request.SessionId, - }, reply); sqErr != nil { - return &pb.SplitQueryResponse{ - Error: tabletserver.TabletErrorToRPCError(sqErr), - }, nil + }, reply); err != nil { + return nil, err } return &pb.SplitQueryResponse{ Queries: proto.QuerySplitsToProto3(reply.Queries), diff --git a/go/vt/tabletserver/grpctabletconn/conn.go b/go/vt/tabletserver/grpctabletconn/conn.go index b6f2fb1347..495c4ca8e5 100644 --- a/go/vt/tabletserver/grpctabletconn/conn.go +++ b/go/vt/tabletserver/grpctabletconn/conn.go @@ -14,14 +14,12 @@ import ( "github.com/youtube/vitess/go/netutil" tproto "github.com/youtube/vitess/go/vt/tabletserver/proto" "github.com/youtube/vitess/go/vt/tabletserver/tabletconn" - "github.com/youtube/vitess/go/vt/vterrors" "golang.org/x/net/context" "google.golang.org/grpc" pb "github.com/youtube/vitess/go/vt/proto/query" pbs "github.com/youtube/vitess/go/vt/proto/queryservice" pbt "github.com/youtube/vitess/go/vt/proto/topodata" - pbv "github.com/youtube/vitess/go/vt/proto/vtrpc" ) const protocolName = "grpc" @@ -68,10 +66,6 @@ func DialTablet(ctx context.Context, endPoint *pbt.EndPoint, keyspace, shard str cc.Close() return nil, err } - if gsir.Error != nil { - cc.Close() - return nil, tabletErrorFromRPCError(gsir.Error) - } result.sessionID = gsir.SessionId } else { // we use target @@ -102,9 +96,6 @@ func (conn *gRPCQueryClient) Execute(ctx context.Context, query string, bindVars if err != nil { return nil, tabletErrorFromGRPC(err) } - if er.Error != nil { - return nil, tabletErrorFromRPCError(er.Error) - } return mproto.Proto3ToQueryResult(er.Result), nil } @@ -134,9 +125,6 @@ func (conn *gRPCQueryClient) ExecuteBatch(ctx context.Context, queries []tproto. if err != nil { return nil, tabletErrorFromGRPC(err) } - if ebr.Error != nil { - return nil, tabletErrorFromRPCError(ebr.Error) - } return tproto.Proto3ToQueryResultList(ebr.Results), nil } @@ -173,11 +161,6 @@ func (conn *gRPCQueryClient) StreamExecute(ctx context.Context, query string, bi close(sr) return } - if ser.Error != nil { - finalError = tabletErrorFromRPCError(ser.Error) - close(sr) - return - } sr <- mproto.Proto3ToQueryResult(ser.Result) } }() @@ -206,9 +189,6 @@ func (conn *gRPCQueryClient) Begin(ctx context.Context) (transactionID int64, er if err != nil { return 0, tabletErrorFromGRPC(err) } - if br.Error != nil { - return 0, tabletErrorFromRPCError(br.Error) - } return br.TransactionId, nil } @@ -229,13 +209,10 @@ func (conn *gRPCQueryClient) Commit(ctx context.Context, transactionID int64) er TransactionId: transactionID, SessionId: conn.sessionID, } - cr, err := conn.c.Commit(ctx, req) + _, err := conn.c.Commit(ctx, req) if err != nil { return tabletErrorFromGRPC(err) } - if cr.Error != nil { - return tabletErrorFromRPCError(cr.Error) - } return nil } @@ -256,13 +233,10 @@ func (conn *gRPCQueryClient) Rollback(ctx context.Context, transactionID int64) TransactionId: transactionID, SessionId: conn.sessionID, } - rr, err := conn.c.Rollback(ctx, req) + _, err := conn.c.Rollback(ctx, req) if err != nil { return tabletErrorFromGRPC(err) } - if rr.Error != nil { - return tabletErrorFromRPCError(rr.Error) - } return nil } @@ -290,9 +264,6 @@ func (conn *gRPCQueryClient) SplitQuery(ctx context.Context, query tproto.BoundQ if err != nil { return nil, tabletErrorFromGRPC(err) } - if sqr.Error != nil { - return nil, tabletErrorFromRPCError(sqr.Error) - } return tproto.Proto3ToQuerySplits(sqr.Queries), nil } @@ -371,19 +342,3 @@ func (conn *gRPCQueryClient) EndPoint() *pbt.EndPoint { func tabletErrorFromGRPC(err error) error { return tabletconn.OperationalError(fmt.Sprintf("vttablet: %v", err)) } - -// tabletErrorFromRPCError reconstructs a tablet error from the -// RPCError, using the RPCError code. -func tabletErrorFromRPCError(rpcErr *pbv.RPCError) error { - ve := vterrors.FromVtRPCError(rpcErr) - - // see if the range is in the tablet error range - if ve.Code >= int64(pbv.ErrorCode_TabletError) && ve.Code <= int64(pbv.ErrorCode_UnknownTabletError) { - return &tabletconn.ServerError{ - Code: int(ve.Code - int64(pbv.ErrorCode_TabletError)), - Err: fmt.Sprintf("vttablet: %v", ve.Error()), - } - } - - return tabletconn.OperationalError(fmt.Sprintf("vttablet: %v", ve.Message)) -} diff --git a/go/vt/tabletserver/tabletconntest/tabletconntest.go b/go/vt/tabletserver/tabletconntest/tabletconntest.go index cb9288e7f2..7885f71be8 100644 --- a/go/vt/tabletserver/tabletconntest/tabletconntest.go +++ b/go/vt/tabletserver/tabletconntest/tabletconntest.go @@ -15,7 +15,6 @@ import ( mproto "github.com/youtube/vitess/go/mysql/proto" "github.com/youtube/vitess/go/sqltypes" - "github.com/youtube/vitess/go/vt/tabletserver" "github.com/youtube/vitess/go/vt/tabletserver/proto" "github.com/youtube/vitess/go/vt/tabletserver/tabletconn" "golang.org/x/net/context" @@ -27,9 +26,9 @@ import ( // FakeQueryService has the server side of this fake type FakeQueryService struct { t *testing.T - hasError bool panics bool streamExecutePanicsEarly bool + panicWait chan struct{} } // HandlePanic is part of the queryservice.QueryService interface @@ -52,28 +51,6 @@ const testAsTransaction bool = true const testSessionID int64 = 5678 -var testTabletError = tabletserver.NewTabletError(tabletserver.ErrFail, "generic error") - -const expectedErrMatch string = "error: generic error" - -// Verifies the returned error has the properties that we expect. -func verifyError(t *testing.T, err error, method string) { - if err == nil { - t.Errorf("%s was expecting an error, didn't get one", method) - return - } - if se, ok := err.(*tabletconn.ServerError); ok { - if se.Code != tabletconn.ERR_NORMAL { - t.Errorf("Unexpected error code from %s: got %v, wanted %v", method, se.Code, tabletconn.ERR_NORMAL) - } - } else { - t.Errorf("Unexpected error type from %s: got %v, wanted tabletconn.ServerError", method, reflect.TypeOf(err)) - } - if !strings.Contains(err.Error(), expectedErrMatch) { - t.Errorf("Unexpected error from %s: got %v, wanted err containing %v", method, err, expectedErrMatch) - } -} - // GetSessionId is part of the queryservice.QueryService interface func (f *FakeQueryService) GetSessionId(sessionParams *proto.SessionParams, sessionInfo *proto.SessionInfo) error { if sessionParams.Keyspace != TestKeyspace { @@ -88,9 +65,6 @@ func (f *FakeQueryService) GetSessionId(sessionParams *proto.SessionParams, sess // Begin is part of the queryservice.QueryService interface func (f *FakeQueryService) Begin(ctx context.Context, target *pb.Target, session *proto.Session, txInfo *proto.TransactionInfo) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -118,13 +92,6 @@ func testBegin(t *testing.T, conn tabletconn.TabletConn) { } } -func testBeginError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testBeginError") - ctx := context.Background() - _, err := conn.Begin(ctx) - verifyError(t, err, "Begin") -} - func testBeginPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testBeginPanics") ctx := context.Background() @@ -145,13 +112,6 @@ func testBegin2(t *testing.T, conn tabletconn.TabletConn) { } } -func testBegin2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testBegin2Error") - ctx := context.Background() - _, err := conn.Begin2(ctx) - verifyError(t, err, "Begin2") -} - func testBegin2Panics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testBegin2Panics") ctx := context.Background() @@ -162,9 +122,6 @@ func testBegin2Panics(t *testing.T, conn tabletconn.TabletConn) { // Commit is part of the queryservice.QueryService interface func (f *FakeQueryService) Commit(ctx context.Context, target *pb.Target, session *proto.Session) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -188,13 +145,6 @@ func testCommit(t *testing.T, conn tabletconn.TabletConn) { } } -func testCommitError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testCommitError") - ctx := context.Background() - err := conn.Commit(ctx, commitTransactionID) - verifyError(t, err, "Commit") -} - func testCommitPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testCommitPanics") ctx := context.Background() @@ -212,13 +162,6 @@ func testCommit2(t *testing.T, conn tabletconn.TabletConn) { } } -func testCommit2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testCommit2Error") - ctx := context.Background() - err := conn.Commit2(ctx, commitTransactionID) - verifyError(t, err, "Commit2") -} - func testCommit2Panics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testCommit2Panics") ctx := context.Background() @@ -229,9 +172,6 @@ func testCommit2Panics(t *testing.T, conn tabletconn.TabletConn) { // Rollback is part of the queryservice.QueryService interface func (f *FakeQueryService) Rollback(ctx context.Context, target *pb.Target, session *proto.Session) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -255,13 +195,6 @@ func testRollback(t *testing.T, conn tabletconn.TabletConn) { } } -func testRollbackError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testRollbackError") - ctx := context.Background() - err := conn.Rollback(ctx, commitTransactionID) - verifyError(t, err, "Rollback") -} - func testRollbackPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testRollbackPanics") ctx := context.Background() @@ -279,13 +212,6 @@ func testRollback2(t *testing.T, conn tabletconn.TabletConn) { } } -func testRollback2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testRollback2Error") - ctx := context.Background() - err := conn.Rollback2(ctx, commitTransactionID) - verifyError(t, err, "Rollback2") -} - func testRollback2Panics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testRollback2Panics") ctx := context.Background() @@ -296,9 +222,6 @@ func testRollback2Panics(t *testing.T, conn tabletconn.TabletConn) { // Execute is part of the queryservice.QueryService interface func (f *FakeQueryService) Execute(ctx context.Context, target *pb.Target, query *proto.Query, reply *mproto.QueryResult) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -375,20 +298,6 @@ func testExecute2(t *testing.T, conn tabletconn.TabletConn) { } } -func testExecuteError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testExecuteError") - ctx := context.Background() - _, err := conn.Execute(ctx, executeQuery, executeBindVars, executeTransactionID) - verifyError(t, err, "Execute") -} - -func testExecute2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testExecute2Error") - ctx := context.Background() - _, err := conn.Execute2(ctx, executeQuery, executeBindVars, executeTransactionID) - verifyError(t, err, "Execute") -} - func testExecutePanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testExecutePanics") ctx := context.Background() @@ -405,9 +314,6 @@ func testExecute2Panics(t *testing.T, conn tabletconn.TabletConn) { } } -var panicWait chan struct{} -var errorWait chan struct{} - // StreamExecute is part of the queryservice.QueryService interface func (f *FakeQueryService) StreamExecute(ctx context.Context, target *pb.Target, query *proto.Query, sendReply func(*mproto.QueryResult) error) error { if f.panics && f.streamExecutePanicsEarly { @@ -427,15 +333,10 @@ func (f *FakeQueryService) StreamExecute(ctx context.Context, target *pb.Target, } if f.panics && !f.streamExecutePanicsEarly { // wait until the client gets the response, then panics - <-panicWait + <-f.panicWait + f.panicWait = make(chan struct{}) // for next test panic(fmt.Errorf("test-triggered panic late")) } - if f.hasError { - // wait until the client has the response, since all streaming implementation may not - // send previous messages if an error has been triggered. - <-errorWait - return testTabletError - } if err := sendReply(&streamExecuteQueryResult2); err != nil { f.t.Errorf("sendReply2 failed: %v", err) } @@ -512,36 +413,6 @@ func testStreamExecute(t *testing.T, conn tabletconn.TabletConn) { } } -func testStreamExecuteError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testStreamExecuteError") - ctx := context.Background() - stream, errFunc, err := conn.StreamExecute(ctx, streamExecuteQuery, streamExecuteBindVars, streamExecuteTransactionID) - if err != nil { - t.Fatalf("StreamExecute failed: %v", err) - } - qr, ok := <-stream - if !ok { - t.Fatalf("StreamExecute failed: cannot read result1") - } - if len(qr.Rows) == 0 { - qr.Rows = nil - } - if !reflect.DeepEqual(*qr, streamExecuteQueryResult1) { - t.Errorf("Unexpected result1 from StreamExecute: got %v wanted %v", qr, streamExecuteQueryResult1) - } - // signal to the server that the first result has been received - close(errorWait) - // After 1 result, we expect to get an error (no more results). - qr, ok = <-stream - if ok { - t.Fatalf("StreamExecute channel wasn't closed") - } - err = errFunc() - verifyError(t, err, "StreamExecute") - // reset state for the test - errorWait = make(chan struct{}) -} - func testStreamExecutePanics(t *testing.T, conn tabletconn.TabletConn, fake *FakeQueryService) { t.Log("testStreamExecutePanics") // early panic is before sending the Fields, that is returned @@ -581,15 +452,13 @@ func testStreamExecutePanics(t *testing.T, conn tabletconn.TabletConn, fake *Fak if !reflect.DeepEqual(*qr, streamExecuteQueryResult1) { t.Errorf("Unexpected result1 from StreamExecute: got %v wanted %v", qr, streamExecuteQueryResult1) } - close(panicWait) + close(fake.panicWait) if _, ok := <-stream; ok { t.Fatalf("StreamExecute returned more results") } if err := errFunc(); err == nil || !strings.Contains(err.Error(), "caught test panic") { t.Fatalf("unexpected panic error: %v", err) } - // Make a new panicWait channel, to reset the state to the beginning of the test - panicWait = make(chan struct{}) } func testStreamExecute2(t *testing.T, conn tabletconn.TabletConn) { @@ -628,36 +497,6 @@ func testStreamExecute2(t *testing.T, conn tabletconn.TabletConn) { } } -func testStreamExecute2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testStreamExecute2Error") - ctx := context.Background() - stream, errFunc, err := conn.StreamExecute2(ctx, streamExecuteQuery, streamExecuteBindVars, streamExecuteTransactionID) - if err != nil { - t.Fatalf("StreamExecute2 failed: %v", err) - } - qr, ok := <-stream - if !ok { - t.Fatalf("StreamExecute2 failed: cannot read result1") - } - if len(qr.Rows) == 0 { - qr.Rows = nil - } - if !reflect.DeepEqual(*qr, streamExecuteQueryResult1) { - t.Errorf("Unexpected result1 from StreamExecute2: got %v wanted %v", qr, streamExecuteQueryResult1) - } - // signal to the server that the first result has been received - close(errorWait) - // After 1 result, we expect to get an error (no more results). - qr, ok = <-stream - if ok { - t.Fatalf("StreamExecute2 channel wasn't closed") - } - err = errFunc() - verifyError(t, err, "StreamExecute2") - // reset state for the test - errorWait = make(chan struct{}) -} - func testStreamExecute2Panics(t *testing.T, conn tabletconn.TabletConn, fake *FakeQueryService) { t.Log("testStreamExecute2Panics") // early panic is before sending the Fields, that is returned @@ -697,22 +536,17 @@ func testStreamExecute2Panics(t *testing.T, conn tabletconn.TabletConn, fake *Fa if !reflect.DeepEqual(*qr, streamExecuteQueryResult1) { t.Errorf("Unexpected result1 from StreamExecute2: got %v wanted %v", qr, streamExecuteQueryResult1) } - close(panicWait) + close(fake.panicWait) if _, ok := <-stream; ok { t.Fatalf("StreamExecute2 returned more results") } if err := errFunc(); err == nil || !strings.Contains(err.Error(), "caught test panic") { t.Fatalf("unexpected panic error: %v", err) } - // Make a new panicWait channel, to reset the state to the beginning of the test - panicWait = make(chan struct{}) } // ExecuteBatch is part of the queryservice.QueryService interface func (f *FakeQueryService) ExecuteBatch(ctx context.Context, target *pb.Target, queryList *proto.QueryList, reply *proto.QueryResultList) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -800,13 +634,6 @@ func testExecuteBatch(t *testing.T, conn tabletconn.TabletConn) { } } -func testExecuteBatchError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testBatchExecuteError") - ctx := context.Background() - _, err := conn.ExecuteBatch(ctx, executeBatchQueries, true, executeBatchTransactionID) - verifyError(t, err, "ExecuteBatch") -} - func testExecuteBatchPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testExecuteBatchPanics") ctx := context.Background() @@ -827,13 +654,6 @@ func testExecuteBatch2(t *testing.T, conn tabletconn.TabletConn) { } } -func testExecuteBatch2Error(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testBatchExecute2Error") - ctx := context.Background() - _, err := conn.ExecuteBatch2(ctx, executeBatchQueries, true, executeBatchTransactionID) - verifyError(t, err, "ExecuteBatch") -} - func testExecuteBatch2Panics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testExecuteBatch2Panics") ctx := context.Background() @@ -844,9 +664,6 @@ func testExecuteBatch2Panics(t *testing.T, conn tabletconn.TabletConn) { // SplitQuery is part of the queryservice.QueryService interface func (f *FakeQueryService) SplitQuery(ctx context.Context, target *pb.Target, req *proto.SplitQueryRequest, reply *proto.SplitQueryResult) error { - if f.hasError { - return testTabletError - } if f.panics { panic(fmt.Errorf("test-triggered panic")) } @@ -898,13 +715,6 @@ func testSplitQuery(t *testing.T, conn tabletconn.TabletConn) { } } -func testSplitQueryError(t *testing.T, conn tabletconn.TabletConn) { - t.Log("testSplitQueryError") - ctx := context.Background() - _, err := conn.SplitQuery(ctx, splitQueryBoundQuery, splitQuerySplitColumn, splitQuerySplitCount) - verifyError(t, err, "SplitQuery") -} - func testSplitQueryPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testSplitQueryPanics") ctx := context.Background() @@ -1005,14 +815,11 @@ func testStreamHealthPanics(t *testing.T, conn tabletconn.TabletConn) { // CreateFakeServer returns the fake server for the tests func CreateFakeServer(t *testing.T) *FakeQueryService { - // Make the synchronization channels on init, so there's no state shared between servers - panicWait = make(chan struct{}) - errorWait = make(chan struct{}) - return &FakeQueryService{ t: t, panics: false, streamExecutePanicsEarly: false, + panicWait: make(chan struct{}), } } @@ -1045,23 +852,6 @@ func TestSuite(t *testing.T, protocol string, endPoint *pbt.EndPoint, fake *Fake testSplitQuery(t, conn) testStreamHealth(t, conn) - // fake should return an error, make sure errors are handled properly - fake.hasError = true - testBeginError(t, conn) - testBegin2Error(t, conn) - testCommitError(t, conn) - testCommit2Error(t, conn) - testRollbackError(t, conn) - testRollback2Error(t, conn) - testExecuteError(t, conn) - testExecute2Error(t, conn) - testStreamExecuteError(t, conn) - testStreamExecute2Error(t, conn) - testExecuteBatchError(t, conn) - testExecuteBatch2Error(t, conn) - testSplitQueryError(t, conn) - fake.hasError = false - // force panics, make sure they're caught fake.panics = true testBeginPanics(t, conn) diff --git a/proto/query.proto b/proto/query.proto index 93d04c3c42..3a6a89f614 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -159,8 +159,7 @@ message GetSessionIdRequest { // GetSessionIdResponse is the returned value from GetSessionId message GetSessionIdResponse { - vtrpc.RPCError error = 1; - int64 session_id = 2; + int64 session_id = 1; } // ExecuteRequest is the payload to Execute @@ -175,8 +174,7 @@ message ExecuteRequest { // ExecuteResponse is the returned value from Execute message ExecuteResponse { - vtrpc.RPCError error = 1; - QueryResult result = 2; + QueryResult result = 1; } // ExecuteBatchRequest is the payload to ExecuteBatch @@ -192,8 +190,7 @@ message ExecuteBatchRequest { // ExecuteBatchResponse is the returned value from ExecuteBatch message ExecuteBatchResponse { - vtrpc.RPCError error = 1; - repeated QueryResult results = 2; + repeated QueryResult results = 1; } // StreamExecuteRequest is the payload to StreamExecute @@ -207,8 +204,7 @@ message StreamExecuteRequest { // StreamExecuteResponse is the returned value from StreamExecute message StreamExecuteResponse { - vtrpc.RPCError error = 1; - QueryResult result = 2; + QueryResult result = 1; } // BeginRequest is the payload to Begin @@ -221,8 +217,7 @@ message BeginRequest { // BeginResponse is the returned value from Begin message BeginResponse { - vtrpc.RPCError error = 1; - int64 transaction_id = 2; + int64 transaction_id = 1; } // CommitRequest is the payload to Commit @@ -235,9 +230,7 @@ message CommitRequest { } // CommitResponse is the returned value from Commit -message CommitResponse { - vtrpc.RPCError error = 1; -} +message CommitResponse {} // RollbackRequest is the payload to Rollback message RollbackRequest { @@ -249,9 +242,7 @@ message RollbackRequest { } // RollbackResponse is the returned value from Rollback -message RollbackResponse { - vtrpc.RPCError error = 1; -} +message RollbackResponse {} // SplitQueryRequest is the payload for SplitQuery message SplitQueryRequest { @@ -276,8 +267,7 @@ message QuerySplit { // SplitQueryResponse is returned by SplitQuery and represents all the queries // to execute in order to get the entire data set. message SplitQueryResponse { - vtrpc.RPCError error = 1; - repeated QuerySplit queries = 2; + repeated QuerySplit queries = 1; } // StreamHealthRequest is the payload for StreamHealth diff --git a/py/vtproto/query_pb2.py b/py/vtproto/query_pb2.py index ffd6b706df..9af1f5be52 100644 --- a/py/vtproto/query_pb2.py +++ b/py/vtproto/query_pb2.py @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( name='query.proto', package='query', syntax='proto3', - serialized_pb=_b('\n\x0bquery.proto\x12\x05query\x1a\x0etopodata.proto\x1a\x0bvtrpc.proto\"T\n\x06Target\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12)\n\x0btablet_type\x18\x03 \x01(\x0e\x32\x14.topodata.TabletType\"\"\n\x0eVTGateCallerID\x12\x10\n\x08username\x18\x01 \x01(\t\"\x92\x03\n\x0c\x42indVariable\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.query.BindVariable.Type\x12\x13\n\x0bvalue_bytes\x18\x02 \x01(\x0c\x12\x11\n\tvalue_int\x18\x03 \x01(\x03\x12\x12\n\nvalue_uint\x18\x04 \x01(\x04\x12\x13\n\x0bvalue_float\x18\x05 \x01(\x01\x12\x18\n\x10value_bytes_list\x18\x06 \x03(\x0c\x12\x16\n\x0evalue_int_list\x18\x07 \x03(\x03\x12\x17\n\x0fvalue_uint_list\x18\x08 \x03(\x04\x12\x18\n\x10value_float_list\x18\t \x03(\x01\"\xa3\x01\n\x04Type\x12\r\n\tTYPE_NULL\x10\x00\x12\x0e\n\nTYPE_BYTES\x10\x01\x12\x0c\n\x08TYPE_INT\x10\x02\x12\r\n\tTYPE_UINT\x10\x03\x12\x0e\n\nTYPE_FLOAT\x10\x04\x12\x13\n\x0fTYPE_BYTES_LIST\x10\x05\x12\x11\n\rTYPE_INT_LIST\x10\x06\x12\x12\n\x0eTYPE_UINT_LIST\x10\x07\x12\x13\n\x0fTYPE_FLOAT_LIST\x10\x08\"\xa2\x01\n\nBoundQuery\x12\x0b\n\x03sql\x18\x01 \x01(\x0c\x12<\n\x0e\x62ind_variables\x18\x02 \x03(\x0b\x32$.query.BoundQuery.BindVariablesEntry\x1aI\n\x12\x42indVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.query.BindVariable:\x02\x38\x01\"\xa1\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1f\n\x04type\x18\x02 \x01(\x0e\x32\x11.query.Field.Type\x12\r\n\x05\x66lags\x18\x03 \x01(\x03\"\xe1\x03\n\x04Type\x12\x10\n\x0cTYPE_DECIMAL\x10\x00\x12\r\n\tTYPE_TINY\x10\x01\x12\x0e\n\nTYPE_SHORT\x10\x02\x12\r\n\tTYPE_LONG\x10\x03\x12\x0e\n\nTYPE_FLOAT\x10\x04\x12\x0f\n\x0bTYPE_DOUBLE\x10\x05\x12\r\n\tTYPE_NULL\x10\x06\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x07\x12\x11\n\rTYPE_LONGLONG\x10\x08\x12\x0e\n\nTYPE_INT24\x10\t\x12\r\n\tTYPE_DATE\x10\n\x12\r\n\tTYPE_TIME\x10\x0b\x12\x11\n\rTYPE_DATETIME\x10\x0c\x12\r\n\tTYPE_YEAR\x10\r\x12\x10\n\x0cTYPE_NEWDATE\x10\x0e\x12\x10\n\x0cTYPE_VARCHAR\x10\x0f\x12\x0c\n\x08TYPE_BIT\x10\x10\x12\x14\n\x0fTYPE_NEWDECIMAL\x10\xf6\x01\x12\x0e\n\tTYPE_ENUM\x10\xf7\x01\x12\r\n\x08TYPE_SET\x10\xf8\x01\x12\x13\n\x0eTYPE_TINY_BLOB\x10\xf9\x01\x12\x15\n\x10TYPE_MEDIUM_BLOB\x10\xfa\x01\x12\x13\n\x0eTYPE_LONG_BLOB\x10\xfb\x01\x12\x0e\n\tTYPE_BLOB\x10\xfc\x01\x12\x14\n\x0fTYPE_VAR_STRING\x10\xfd\x01\x12\x10\n\x0bTYPE_STRING\x10\xfe\x01\x12\x12\n\rTYPE_GEOMETRY\x10\xff\x01\"\xf5\x02\n\x04\x46lag\x12\x15\n\x11VT_ZEROVALUE_FLAG\x10\x00\x12\x14\n\x10VT_NOT_NULL_FLAG\x10\x01\x12\x13\n\x0fVT_PRI_KEY_FLAG\x10\x02\x12\x16\n\x12VT_UNIQUE_KEY_FLAG\x10\x04\x12\x18\n\x14VT_MULTIPLE_KEY_FLAG\x10\x08\x12\x10\n\x0cVT_BLOB_FLAG\x10\x10\x12\x14\n\x10VT_UNSIGNED_FLAG\x10 \x12\x14\n\x10VT_ZEROFILL_FLAG\x10@\x12\x13\n\x0eVT_BINARY_FLAG\x10\x80\x01\x12\x11\n\x0cVT_ENUM_FLAG\x10\x80\x02\x12\x1b\n\x16VT_AUTO_INCREMENT_FLAG\x10\x80\x04\x12\x16\n\x11VT_TIMESTAMP_FLAG\x10\x80\x08\x12\x10\n\x0bVT_SET_FLAG\x10\x80\x10\x12\x1d\n\x18VT_NO_DEFAULT_VALUE_FLAG\x10\x80 \x12\x1a\n\x15VT_ON_UPDATE_NOW_FLAG\x10\x80@\x12\x11\n\x0bVT_NUM_FLAG\x10\x80\x80\x02\"\x15\n\x03Row\x12\x0e\n\x06values\x18\x01 \x03(\x0c\"o\n\x0bQueryResult\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x15\n\rrows_affected\x18\x02 \x01(\x04\x12\x11\n\tinsert_id\x18\x03 \x01(\x04\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row\"\x98\x01\n\x13GetSessionIdRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x10\n\x08keyspace\x18\x03 \x01(\t\x12\r\n\x05shard\x18\x04 \x01(\t\"J\n\x14GetSessionIdResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12\x12\n\nsession_id\x18\x02 \x01(\x03\"\xdf\x01\n\x0e\x45xecuteRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x16\n\x0etransaction_id\x18\x05 \x01(\x03\x12\x12\n\nsession_id\x18\x06 \x01(\x03\"U\n\x0f\x45xecuteResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12\"\n\x06result\x18\x02 \x01(\x0b\x32\x12.query.QueryResult\"\xfe\x01\n\x13\x45xecuteBatchRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\"\n\x07queries\x18\x04 \x03(\x0b\x32\x11.query.BoundQuery\x12\x16\n\x0e\x61s_transaction\x18\x05 \x01(\x08\x12\x16\n\x0etransaction_id\x18\x06 \x01(\x03\x12\x12\n\nsession_id\x18\x07 \x01(\x03\"[\n\x14\x45xecuteBatchResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12#\n\x07results\x18\x02 \x03(\x0b\x32\x12.query.QueryResult\"\xcd\x01\n\x14StreamExecuteRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x12\n\nsession_id\x18\x05 \x01(\x03\"[\n\x15StreamExecuteResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12\"\n\x06result\x18\x02 \x01(\x0b\x32\x12.query.QueryResult\"\xa3\x01\n\x0c\x42\x65ginRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x12\n\nsession_id\x18\x04 \x01(\x03\"G\n\rBeginResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12\x16\n\x0etransaction_id\x18\x02 \x01(\x03\"\xbc\x01\n\rCommitRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x16\n\x0etransaction_id\x18\x04 \x01(\x03\x12\x12\n\nsession_id\x18\x05 \x01(\x03\"0\n\x0e\x43ommitResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\"\xbe\x01\n\x0fRollbackRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x16\n\x0etransaction_id\x18\x04 \x01(\x03\x12\x12\n\nsession_id\x18\x05 \x01(\x03\"2\n\x10RollbackResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\"\xf5\x01\n\x11SplitQueryRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x14\n\x0csplit_column\x18\x05 \x01(\t\x12\x13\n\x0bsplit_count\x18\x06 \x01(\x03\x12\x12\n\nsession_id\x18\x07 \x01(\x03\"A\n\nQuerySplit\x12 \n\x05query\x18\x01 \x01(\x0b\x32\x11.query.BoundQuery\x12\x11\n\trow_count\x18\x02 \x01(\x03\"X\n\x12SplitQueryResponse\x12\x1e\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x0f.vtrpc.RPCError\x12\"\n\x07queries\x18\x02 \x03(\x0b\x32\x11.query.QuerySplit\"\x15\n\x13StreamHealthRequest\"W\n\rRealtimeStats\x12\x14\n\x0chealth_error\x18\x01 \x01(\t\x12\x1d\n\x15seconds_behind_master\x18\x02 \x01(\r\x12\x11\n\tcpu_usage\x18\x03 \x01(\x01\"\x93\x01\n\x14StreamHealthResponse\x12\x1d\n\x06target\x18\x01 \x01(\x0b\x32\r.query.Target\x12.\n&tablet_externally_reparented_timestamp\x18\x02 \x01(\x03\x12,\n\x0erealtime_stats\x18\x03 \x01(\x0b\x32\x14.query.RealtimeStatsB\x1a\n\x18\x63om.youtube.vitess.protob\x06proto3') + serialized_pb=_b('\n\x0bquery.proto\x12\x05query\x1a\x0etopodata.proto\x1a\x0bvtrpc.proto\"T\n\x06Target\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12)\n\x0btablet_type\x18\x03 \x01(\x0e\x32\x14.topodata.TabletType\"\"\n\x0eVTGateCallerID\x12\x10\n\x08username\x18\x01 \x01(\t\"\x92\x03\n\x0c\x42indVariable\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.query.BindVariable.Type\x12\x13\n\x0bvalue_bytes\x18\x02 \x01(\x0c\x12\x11\n\tvalue_int\x18\x03 \x01(\x03\x12\x12\n\nvalue_uint\x18\x04 \x01(\x04\x12\x13\n\x0bvalue_float\x18\x05 \x01(\x01\x12\x18\n\x10value_bytes_list\x18\x06 \x03(\x0c\x12\x16\n\x0evalue_int_list\x18\x07 \x03(\x03\x12\x17\n\x0fvalue_uint_list\x18\x08 \x03(\x04\x12\x18\n\x10value_float_list\x18\t \x03(\x01\"\xa3\x01\n\x04Type\x12\r\n\tTYPE_NULL\x10\x00\x12\x0e\n\nTYPE_BYTES\x10\x01\x12\x0c\n\x08TYPE_INT\x10\x02\x12\r\n\tTYPE_UINT\x10\x03\x12\x0e\n\nTYPE_FLOAT\x10\x04\x12\x13\n\x0fTYPE_BYTES_LIST\x10\x05\x12\x11\n\rTYPE_INT_LIST\x10\x06\x12\x12\n\x0eTYPE_UINT_LIST\x10\x07\x12\x13\n\x0fTYPE_FLOAT_LIST\x10\x08\"\xa2\x01\n\nBoundQuery\x12\x0b\n\x03sql\x18\x01 \x01(\x0c\x12<\n\x0e\x62ind_variables\x18\x02 \x03(\x0b\x32$.query.BoundQuery.BindVariablesEntry\x1aI\n\x12\x42indVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.query.BindVariable:\x02\x38\x01\"\xa1\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1f\n\x04type\x18\x02 \x01(\x0e\x32\x11.query.Field.Type\x12\r\n\x05\x66lags\x18\x03 \x01(\x03\"\xe1\x03\n\x04Type\x12\x10\n\x0cTYPE_DECIMAL\x10\x00\x12\r\n\tTYPE_TINY\x10\x01\x12\x0e\n\nTYPE_SHORT\x10\x02\x12\r\n\tTYPE_LONG\x10\x03\x12\x0e\n\nTYPE_FLOAT\x10\x04\x12\x0f\n\x0bTYPE_DOUBLE\x10\x05\x12\r\n\tTYPE_NULL\x10\x06\x12\x12\n\x0eTYPE_TIMESTAMP\x10\x07\x12\x11\n\rTYPE_LONGLONG\x10\x08\x12\x0e\n\nTYPE_INT24\x10\t\x12\r\n\tTYPE_DATE\x10\n\x12\r\n\tTYPE_TIME\x10\x0b\x12\x11\n\rTYPE_DATETIME\x10\x0c\x12\r\n\tTYPE_YEAR\x10\r\x12\x10\n\x0cTYPE_NEWDATE\x10\x0e\x12\x10\n\x0cTYPE_VARCHAR\x10\x0f\x12\x0c\n\x08TYPE_BIT\x10\x10\x12\x14\n\x0fTYPE_NEWDECIMAL\x10\xf6\x01\x12\x0e\n\tTYPE_ENUM\x10\xf7\x01\x12\r\n\x08TYPE_SET\x10\xf8\x01\x12\x13\n\x0eTYPE_TINY_BLOB\x10\xf9\x01\x12\x15\n\x10TYPE_MEDIUM_BLOB\x10\xfa\x01\x12\x13\n\x0eTYPE_LONG_BLOB\x10\xfb\x01\x12\x0e\n\tTYPE_BLOB\x10\xfc\x01\x12\x14\n\x0fTYPE_VAR_STRING\x10\xfd\x01\x12\x10\n\x0bTYPE_STRING\x10\xfe\x01\x12\x12\n\rTYPE_GEOMETRY\x10\xff\x01\"\xf5\x02\n\x04\x46lag\x12\x15\n\x11VT_ZEROVALUE_FLAG\x10\x00\x12\x14\n\x10VT_NOT_NULL_FLAG\x10\x01\x12\x13\n\x0fVT_PRI_KEY_FLAG\x10\x02\x12\x16\n\x12VT_UNIQUE_KEY_FLAG\x10\x04\x12\x18\n\x14VT_MULTIPLE_KEY_FLAG\x10\x08\x12\x10\n\x0cVT_BLOB_FLAG\x10\x10\x12\x14\n\x10VT_UNSIGNED_FLAG\x10 \x12\x14\n\x10VT_ZEROFILL_FLAG\x10@\x12\x13\n\x0eVT_BINARY_FLAG\x10\x80\x01\x12\x11\n\x0cVT_ENUM_FLAG\x10\x80\x02\x12\x1b\n\x16VT_AUTO_INCREMENT_FLAG\x10\x80\x04\x12\x16\n\x11VT_TIMESTAMP_FLAG\x10\x80\x08\x12\x10\n\x0bVT_SET_FLAG\x10\x80\x10\x12\x1d\n\x18VT_NO_DEFAULT_VALUE_FLAG\x10\x80 \x12\x1a\n\x15VT_ON_UPDATE_NOW_FLAG\x10\x80@\x12\x11\n\x0bVT_NUM_FLAG\x10\x80\x80\x02\"\x15\n\x03Row\x12\x0e\n\x06values\x18\x01 \x03(\x0c\"o\n\x0bQueryResult\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x15\n\rrows_affected\x18\x02 \x01(\x04\x12\x11\n\tinsert_id\x18\x03 \x01(\x04\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row\"\x98\x01\n\x13GetSessionIdRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x10\n\x08keyspace\x18\x03 \x01(\t\x12\r\n\x05shard\x18\x04 \x01(\t\"*\n\x14GetSessionIdResponse\x12\x12\n\nsession_id\x18\x01 \x01(\x03\"\xdf\x01\n\x0e\x45xecuteRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x16\n\x0etransaction_id\x18\x05 \x01(\x03\x12\x12\n\nsession_id\x18\x06 \x01(\x03\"5\n\x0f\x45xecuteResponse\x12\"\n\x06result\x18\x01 \x01(\x0b\x32\x12.query.QueryResult\"\xfe\x01\n\x13\x45xecuteBatchRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\"\n\x07queries\x18\x04 \x03(\x0b\x32\x11.query.BoundQuery\x12\x16\n\x0e\x61s_transaction\x18\x05 \x01(\x08\x12\x16\n\x0etransaction_id\x18\x06 \x01(\x03\x12\x12\n\nsession_id\x18\x07 \x01(\x03\";\n\x14\x45xecuteBatchResponse\x12#\n\x07results\x18\x01 \x03(\x0b\x32\x12.query.QueryResult\"\xcd\x01\n\x14StreamExecuteRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x12\n\nsession_id\x18\x05 \x01(\x03\";\n\x15StreamExecuteResponse\x12\"\n\x06result\x18\x01 \x01(\x0b\x32\x12.query.QueryResult\"\xa3\x01\n\x0c\x42\x65ginRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x12\n\nsession_id\x18\x04 \x01(\x03\"\'\n\rBeginResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\x03\"\xbc\x01\n\rCommitRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x16\n\x0etransaction_id\x18\x04 \x01(\x03\x12\x12\n\nsession_id\x18\x05 \x01(\x03\"\x10\n\x0e\x43ommitResponse\"\xbe\x01\n\x0fRollbackRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x16\n\x0etransaction_id\x18\x04 \x01(\x03\x12\x12\n\nsession_id\x18\x05 \x01(\x03\"\x12\n\x10RollbackResponse\"\xf5\x01\n\x11SplitQueryRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12 \n\x05query\x18\x04 \x01(\x0b\x32\x11.query.BoundQuery\x12\x14\n\x0csplit_column\x18\x05 \x01(\t\x12\x13\n\x0bsplit_count\x18\x06 \x01(\x03\x12\x12\n\nsession_id\x18\x07 \x01(\x03\"A\n\nQuerySplit\x12 \n\x05query\x18\x01 \x01(\x0b\x32\x11.query.BoundQuery\x12\x11\n\trow_count\x18\x02 \x01(\x03\"8\n\x12SplitQueryResponse\x12\"\n\x07queries\x18\x01 \x03(\x0b\x32\x11.query.QuerySplit\"\x15\n\x13StreamHealthRequest\"W\n\rRealtimeStats\x12\x14\n\x0chealth_error\x18\x01 \x01(\t\x12\x1d\n\x15seconds_behind_master\x18\x02 \x01(\r\x12\x11\n\tcpu_usage\x18\x03 \x01(\x01\"\x93\x01\n\x14StreamHealthResponse\x12\x1d\n\x06target\x18\x01 \x01(\x0b\x32\r.query.Target\x12.\n&tablet_externally_reparented_timestamp\x18\x02 \x01(\x03\x12,\n\x0erealtime_stats\x18\x03 \x01(\x0b\x32\x14.query.RealtimeStatsB\x1a\n\x18\x63om.youtube.vitess.protob\x06proto3') , dependencies=[topodata__pb2.DESCRIPTOR,vtrpc__pb2.DESCRIPTOR,]) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -708,15 +708,8 @@ _GETSESSIONIDRESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.GetSessionIdResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='session_id', full_name='query.GetSessionIdResponse.session_id', index=1, - number=2, type=3, cpp_type=2, label=1, + name='session_id', full_name='query.GetSessionIdResponse.session_id', index=0, + number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -734,7 +727,7 @@ _GETSESSIONIDRESPONSE = _descriptor.Descriptor( oneofs=[ ], serialized_start=1966, - serialized_end=2040, + serialized_end=2008, ) @@ -799,8 +792,8 @@ _EXECUTEREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2043, - serialized_end=2266, + serialized_start=2011, + serialized_end=2234, ) @@ -812,19 +805,12 @@ _EXECUTERESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.ExecuteResponse.error', index=0, + name='result', full_name='query.ExecuteResponse.result', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='result', full_name='query.ExecuteResponse.result', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], @@ -837,8 +823,8 @@ _EXECUTERESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2268, - serialized_end=2353, + serialized_start=2236, + serialized_end=2289, ) @@ -910,8 +896,8 @@ _EXECUTEBATCHREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2356, - serialized_end=2610, + serialized_start=2292, + serialized_end=2546, ) @@ -923,15 +909,8 @@ _EXECUTEBATCHRESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.ExecuteBatchResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='results', full_name='query.ExecuteBatchResponse.results', index=1, - number=2, type=11, cpp_type=10, label=3, + name='results', full_name='query.ExecuteBatchResponse.results', index=0, + number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -948,8 +927,8 @@ _EXECUTEBATCHRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2612, - serialized_end=2703, + serialized_start=2548, + serialized_end=2607, ) @@ -1007,8 +986,8 @@ _STREAMEXECUTEREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2706, - serialized_end=2911, + serialized_start=2610, + serialized_end=2815, ) @@ -1020,19 +999,12 @@ _STREAMEXECUTERESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.StreamExecuteResponse.error', index=0, + name='result', full_name='query.StreamExecuteResponse.result', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='result', full_name='query.StreamExecuteResponse.result', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], @@ -1045,8 +1017,8 @@ _STREAMEXECUTERESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2913, - serialized_end=3004, + serialized_start=2817, + serialized_end=2876, ) @@ -1097,8 +1069,8 @@ _BEGINREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3007, - serialized_end=3170, + serialized_start=2879, + serialized_end=3042, ) @@ -1110,15 +1082,8 @@ _BEGINRESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.BeginResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='transaction_id', full_name='query.BeginResponse.transaction_id', index=1, - number=2, type=3, cpp_type=2, label=1, + name='transaction_id', full_name='query.BeginResponse.transaction_id', index=0, + number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1135,8 +1100,8 @@ _BEGINRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3172, - serialized_end=3243, + serialized_start=3044, + serialized_end=3083, ) @@ -1194,8 +1159,8 @@ _COMMITREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3246, - serialized_end=3434, + serialized_start=3086, + serialized_end=3274, ) @@ -1206,13 +1171,6 @@ _COMMITRESPONSE = _descriptor.Descriptor( file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( - name='error', full_name='query.CommitResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], @@ -1225,8 +1183,8 @@ _COMMITRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3436, - serialized_end=3484, + serialized_start=3276, + serialized_end=3292, ) @@ -1284,8 +1242,8 @@ _ROLLBACKREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3487, - serialized_end=3677, + serialized_start=3295, + serialized_end=3485, ) @@ -1296,13 +1254,6 @@ _ROLLBACKRESPONSE = _descriptor.Descriptor( file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( - name='error', full_name='query.RollbackResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], @@ -1315,8 +1266,8 @@ _ROLLBACKRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3679, - serialized_end=3729, + serialized_start=3487, + serialized_end=3505, ) @@ -1388,8 +1339,8 @@ _SPLITQUERYREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3732, - serialized_end=3977, + serialized_start=3508, + serialized_end=3753, ) @@ -1426,8 +1377,8 @@ _QUERYSPLIT = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3979, - serialized_end=4044, + serialized_start=3755, + serialized_end=3820, ) @@ -1439,15 +1390,8 @@ _SPLITQUERYRESPONSE = _descriptor.Descriptor( containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='error', full_name='query.SplitQueryResponse.error', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='queries', full_name='query.SplitQueryResponse.queries', index=1, - number=2, type=11, cpp_type=10, label=3, + name='queries', full_name='query.SplitQueryResponse.queries', index=0, + number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1464,8 +1408,8 @@ _SPLITQUERYRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=4046, - serialized_end=4134, + serialized_start=3822, + serialized_end=3878, ) @@ -1488,8 +1432,8 @@ _STREAMHEALTHREQUEST = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=4136, - serialized_end=4157, + serialized_start=3880, + serialized_end=3901, ) @@ -1533,8 +1477,8 @@ _REALTIMESTATS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=4159, - serialized_end=4246, + serialized_start=3903, + serialized_end=3990, ) @@ -1578,8 +1522,8 @@ _STREAMHEALTHRESPONSE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=4249, - serialized_end=4396, + serialized_start=3993, + serialized_end=4140, ) _TARGET.fields_by_name['tablet_type'].enum_type = topodata__pb2._TABLETTYPE @@ -1595,43 +1539,35 @@ _QUERYRESULT.fields_by_name['fields'].message_type = _FIELD _QUERYRESULT.fields_by_name['rows'].message_type = _ROW _GETSESSIONIDREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _GETSESSIONIDREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID -_GETSESSIONIDRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _EXECUTEREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _EXECUTEREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _EXECUTEREQUEST.fields_by_name['target'].message_type = _TARGET _EXECUTEREQUEST.fields_by_name['query'].message_type = _BOUNDQUERY -_EXECUTERESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _EXECUTERESPONSE.fields_by_name['result'].message_type = _QUERYRESULT _EXECUTEBATCHREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _EXECUTEBATCHREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _EXECUTEBATCHREQUEST.fields_by_name['target'].message_type = _TARGET _EXECUTEBATCHREQUEST.fields_by_name['queries'].message_type = _BOUNDQUERY -_EXECUTEBATCHRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _EXECUTEBATCHRESPONSE.fields_by_name['results'].message_type = _QUERYRESULT _STREAMEXECUTEREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _STREAMEXECUTEREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _STREAMEXECUTEREQUEST.fields_by_name['target'].message_type = _TARGET _STREAMEXECUTEREQUEST.fields_by_name['query'].message_type = _BOUNDQUERY -_STREAMEXECUTERESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _STREAMEXECUTERESPONSE.fields_by_name['result'].message_type = _QUERYRESULT _BEGINREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _BEGINREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _BEGINREQUEST.fields_by_name['target'].message_type = _TARGET -_BEGINRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _COMMITREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _COMMITREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _COMMITREQUEST.fields_by_name['target'].message_type = _TARGET -_COMMITRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _ROLLBACKREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _ROLLBACKREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _ROLLBACKREQUEST.fields_by_name['target'].message_type = _TARGET -_ROLLBACKRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _SPLITQUERYREQUEST.fields_by_name['effective_caller_id'].message_type = vtrpc__pb2._CALLERID _SPLITQUERYREQUEST.fields_by_name['immediate_caller_id'].message_type = _VTGATECALLERID _SPLITQUERYREQUEST.fields_by_name['target'].message_type = _TARGET _SPLITQUERYREQUEST.fields_by_name['query'].message_type = _BOUNDQUERY _QUERYSPLIT.fields_by_name['query'].message_type = _BOUNDQUERY -_SPLITQUERYRESPONSE.fields_by_name['error'].message_type = vtrpc__pb2._RPCERROR _SPLITQUERYRESPONSE.fields_by_name['queries'].message_type = _QUERYSPLIT _STREAMHEALTHRESPONSE.fields_by_name['target'].message_type = _TARGET _STREAMHEALTHRESPONSE.fields_by_name['realtime_stats'].message_type = _REALTIMESTATS