diff --git a/go/vt/proto/automation/automation.pb.go b/go/vt/proto/automation/automation.pb.go index c37f785cb3d..a67ed13504d 100644 --- a/go/vt/proto/automation/automation.pb.go +++ b/go/vt/proto/automation/automation.pb.go @@ -22,9 +22,13 @@ It has these top-level messages: package automation import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type ClusterOperationState int32 diff --git a/go/vt/proto/automationservice/automationservice.pb.go b/go/vt/proto/automationservice/automationservice.pb.go index d08d57fcb39..96d94b0f558 100644 --- a/go/vt/proto/automationservice/automationservice.pb.go +++ b/go/vt/proto/automationservice/automationservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package automationservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import automation "github.com/youtube/vitess/go/vt/proto/automation" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for Automation service diff --git a/go/vt/proto/binlogdata/binlogdata.pb.go b/go/vt/proto/binlogdata/binlogdata.pb.go index 839afb187b9..52a9604e605 100644 --- a/go/vt/proto/binlogdata/binlogdata.pb.go +++ b/go/vt/proto/binlogdata/binlogdata.pb.go @@ -22,11 +22,15 @@ It has these top-level messages: package binlogdata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import query "github.com/youtube/vitess/go/vt/proto/query" import topodata "github.com/youtube/vitess/go/vt/proto/topodata" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type BinlogTransaction_Statement_Category int32 diff --git a/go/vt/proto/binlogservice/binlogservice.pb.go b/go/vt/proto/binlogservice/binlogservice.pb.go index b56ae033dd8..a0fbcd45526 100644 --- a/go/vt/proto/binlogservice/binlogservice.pb.go +++ b/go/vt/proto/binlogservice/binlogservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package binlogservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import binlogdata "github.com/youtube/vitess/go/vt/proto/binlogdata" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for UpdateStream service diff --git a/go/vt/proto/logutil/logutil.pb.go b/go/vt/proto/logutil/logutil.pb.go index a94e8bb16f1..e7a1dbc3e3f 100644 --- a/go/vt/proto/logutil/logutil.pb.go +++ b/go/vt/proto/logutil/logutil.pb.go @@ -15,9 +15,13 @@ It has these top-level messages: package logutil import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Level is the level of the log messages. type Level int32 diff --git a/go/vt/proto/mysqlctl/mysqlctl.pb.go b/go/vt/proto/mysqlctl/mysqlctl.pb.go index b90d8f33613..2938440c25a 100644 --- a/go/vt/proto/mysqlctl/mysqlctl.pb.go +++ b/go/vt/proto/mysqlctl/mysqlctl.pb.go @@ -19,18 +19,18 @@ It has these top-level messages: package mysqlctl import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type StartRequest struct { } @@ -75,6 +75,10 @@ func (m *RunMysqlUpgradeResponse) Reset() { *m = RunMysqlUpgradeResponse func (m *RunMysqlUpgradeResponse) String() string { return proto.CompactTextString(m) } func (*RunMysqlUpgradeResponse) ProtoMessage() {} +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + // Client API for MysqlCtl service type MysqlCtlClient interface { diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 45ab67f23ba..a86b7dd2292 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -40,11 +40,15 @@ It has these top-level messages: package query import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import topodata "github.com/youtube/vitess/go/vt/proto/topodata" import vtrpc "github.com/youtube/vitess/go/vt/proto/vtrpc" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type BindVariable_Type int32 diff --git a/go/vt/proto/queryservice/queryservice.pb.go b/go/vt/proto/queryservice/queryservice.pb.go index b2966b6351d..c4eaf7cbd7f 100644 --- a/go/vt/proto/queryservice/queryservice.pb.go +++ b/go/vt/proto/queryservice/queryservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package queryservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import query "github.com/youtube/vitess/go/vt/proto/query" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for Query service diff --git a/go/vt/proto/replicationdata/replicationdata.pb.go b/go/vt/proto/replicationdata/replicationdata.pb.go index 76bbe2ce9d3..a7672afcb5a 100644 --- a/go/vt/proto/replicationdata/replicationdata.pb.go +++ b/go/vt/proto/replicationdata/replicationdata.pb.go @@ -14,9 +14,13 @@ It has these top-level messages: package replicationdata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Status is the replication status for MySQL (returned by 'show slave status' // and parsed into a Position and fields). diff --git a/go/vt/proto/tableacl/tableacl.pb.go b/go/vt/proto/tableacl/tableacl.pb.go index af13dd2e457..29d2ce560fe 100644 --- a/go/vt/proto/tableacl/tableacl.pb.go +++ b/go/vt/proto/tableacl/tableacl.pb.go @@ -15,9 +15,13 @@ It has these top-level messages: package tableacl import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // TableGroupSpec defines ACLs for a group of tables. type TableGroupSpec struct { diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index 8340d0e7d62..37002aa1a37 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -100,6 +100,8 @@ It has these top-level messages: package tabletmanagerdata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import query "github.com/youtube/vitess/go/vt/proto/query" import topodata "github.com/youtube/vitess/go/vt/proto/topodata" import replicationdata "github.com/youtube/vitess/go/vt/proto/replicationdata" @@ -107,6 +109,8 @@ import logutil "github.com/youtube/vitess/go/vt/proto/logutil" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type TableDefinition struct { // the table name diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go index c2ff586c42f..31259eab8a9 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package tabletmanagerservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import tabletmanagerdata "github.com/youtube/vitess/go/vt/proto/tabletmanagerdata" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for TabletManager service diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index fc135214c6e..77194510bcd 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -24,9 +24,13 @@ It has these top-level messages: package topodata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // KeyspaceIdType describes the type of the sharding key for a // range-based sharded keyspace. diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index eb0f8bbcbf3..2facfa399c1 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -15,10 +15,14 @@ It has these top-level messages: package vtctldata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import logutil "github.com/youtube/vitess/go/vt/proto/logutil" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // ExecuteVtctlCommandRequest is the payload for ExecuteVtctlCommand. // timeouts are in nanoseconds. diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 33ecc6adeb7..d44a5a59f4c 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package vtctlservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import vtctldata "github.com/youtube/vitess/go/vt/proto/vtctldata" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for Vtctl service diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index 273b89a6dfc..5a3054c6afd 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -48,12 +48,16 @@ It has these top-level messages: package vtgate import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import query "github.com/youtube/vitess/go/vt/proto/query" import topodata "github.com/youtube/vitess/go/vt/proto/topodata" import vtrpc "github.com/youtube/vitess/go/vt/proto/vtrpc" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf type ExecuteEntityIdsRequest_EntityId_Type int32 diff --git a/go/vt/proto/vtgateservice/vtgateservice.pb.go b/go/vt/proto/vtgateservice/vtgateservice.pb.go index b17d0355204..4ef9a98cde3 100644 --- a/go/vt/proto/vtgateservice/vtgateservice.pb.go +++ b/go/vt/proto/vtgateservice/vtgateservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package vtgateservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import vtgate "github.com/youtube/vitess/go/vt/proto/vtgate" import ( @@ -21,49 +23,69 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for Vitess service type VitessClient interface { - // Execute executes tries to route the query to the right shard. - // (this is a vtgate v3 API, use carefully) + // Execute tries to route the query to the right shard. + // It depends on the query and bind variables to provide enough + // information in conjonction with the vindexes to route the query. + // API group: v3 API (alpha) Execute(ctx context.Context, in *vtgate.ExecuteRequest, opts ...grpc.CallOption) (*vtgate.ExecuteResponse, error) // ExecuteShards executes the query on the specified shards. + // API group: Custom Sharding ExecuteShards(ctx context.Context, in *vtgate.ExecuteShardsRequest, opts ...grpc.CallOption) (*vtgate.ExecuteShardsResponse, error) // ExecuteKeyspaceIds executes the query based on the specified keyspace ids. + // API group: Range Based Sharding ExecuteKeyspaceIds(ctx context.Context, in *vtgate.ExecuteKeyspaceIdsRequest, opts ...grpc.CallOption) (*vtgate.ExecuteKeyspaceIdsResponse, error) // ExecuteKeyRanges executes the query based on the specified key ranges. + // API group: Range Based Sharding ExecuteKeyRanges(ctx context.Context, in *vtgate.ExecuteKeyRangesRequest, opts ...grpc.CallOption) (*vtgate.ExecuteKeyRangesResponse, error) // ExecuteEntityIds executes the query based on the specified external id to keyspace id map. + // API group: Range Based Sharding ExecuteEntityIds(ctx context.Context, in *vtgate.ExecuteEntityIdsRequest, opts ...grpc.CallOption) (*vtgate.ExecuteEntityIdsResponse, error) // ExecuteBatchShards executes the list of queries on the specified shards. + // API group: Custom Sharding ExecuteBatchShards(ctx context.Context, in *vtgate.ExecuteBatchShardsRequest, opts ...grpc.CallOption) (*vtgate.ExecuteBatchShardsResponse, error) // ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids. + // API group: Range Based Sharding ExecuteBatchKeyspaceIds(ctx context.Context, in *vtgate.ExecuteBatchKeyspaceIdsRequest, opts ...grpc.CallOption) (*vtgate.ExecuteBatchKeyspaceIdsResponse, error) - // StreamExecute exectures a streaming query based on shards. - // (this is a vtgate v3 API, use carefully) + // StreamExecute executes a streaming query based on shards. + // It depends on the query and bind variables to provide enough + // information in conjonction with the vindexes to route the query. + // Use this method if the query returns a large number of rows. + // API group: v3 API (alpha) StreamExecute(ctx context.Context, in *vtgate.StreamExecuteRequest, opts ...grpc.CallOption) (Vitess_StreamExecuteClient, error) - // StreamExecuteShard exectures a streaming query based on shards. + // StreamExecuteShards executes a streaming query based on shards. // Use this method if the query returns a large number of rows. + // API group: Custom Sharding StreamExecuteShards(ctx context.Context, in *vtgate.StreamExecuteShardsRequest, opts ...grpc.CallOption) (Vitess_StreamExecuteShardsClient, error) - // StreamExecuteKeyspaceIds exectures a streaming query based on keyspace ids. + // StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids. // Use this method if the query returns a large number of rows. + // API group: Range Based Sharding StreamExecuteKeyspaceIds(ctx context.Context, in *vtgate.StreamExecuteKeyspaceIdsRequest, opts ...grpc.CallOption) (Vitess_StreamExecuteKeyspaceIdsClient, error) - // StreamExecuteKeyRanges exectures a streaming query based on key ranges. + // StreamExecuteKeyRanges executes a streaming query based on key ranges. // Use this method if the query returns a large number of rows. + // API group: Range Based Sharding StreamExecuteKeyRanges(ctx context.Context, in *vtgate.StreamExecuteKeyRangesRequest, opts ...grpc.CallOption) (Vitess_StreamExecuteKeyRangesClient, error) // Begin a transaction. + // API group: Transactions Begin(ctx context.Context, in *vtgate.BeginRequest, opts ...grpc.CallOption) (*vtgate.BeginResponse, error) // Commit a transaction. + // API group: Transactions Commit(ctx context.Context, in *vtgate.CommitRequest, opts ...grpc.CallOption) (*vtgate.CommitResponse, error) // Rollback a transaction. + // API group: Transactions Rollback(ctx context.Context, in *vtgate.RollbackRequest, opts ...grpc.CallOption) (*vtgate.RollbackResponse, error) // Split a query into non-overlapping sub queries + // API group: Map Reduce SplitQuery(ctx context.Context, in *vtgate.SplitQueryRequest, opts ...grpc.CallOption) (*vtgate.SplitQueryResponse, error) // GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate). // This method is provided as a convenient way for clients to take a @@ -72,6 +94,7 @@ type VitessClient interface { // information may change, use the Execute calls for that). // It is convenient for monitoring applications for instance, or if // using custom sharding. + // API group: Topology GetSrvKeyspace(ctx context.Context, in *vtgate.GetSrvKeyspaceRequest, opts ...grpc.CallOption) (*vtgate.GetSrvKeyspaceResponse, error) } @@ -322,40 +345,58 @@ func (c *vitessClient) GetSrvKeyspace(ctx context.Context, in *vtgate.GetSrvKeys // Server API for Vitess service type VitessServer interface { - // Execute executes tries to route the query to the right shard. - // (this is a vtgate v3 API, use carefully) + // Execute tries to route the query to the right shard. + // It depends on the query and bind variables to provide enough + // information in conjonction with the vindexes to route the query. + // API group: v3 API (alpha) Execute(context.Context, *vtgate.ExecuteRequest) (*vtgate.ExecuteResponse, error) // ExecuteShards executes the query on the specified shards. + // API group: Custom Sharding ExecuteShards(context.Context, *vtgate.ExecuteShardsRequest) (*vtgate.ExecuteShardsResponse, error) // ExecuteKeyspaceIds executes the query based on the specified keyspace ids. + // API group: Range Based Sharding ExecuteKeyspaceIds(context.Context, *vtgate.ExecuteKeyspaceIdsRequest) (*vtgate.ExecuteKeyspaceIdsResponse, error) // ExecuteKeyRanges executes the query based on the specified key ranges. + // API group: Range Based Sharding ExecuteKeyRanges(context.Context, *vtgate.ExecuteKeyRangesRequest) (*vtgate.ExecuteKeyRangesResponse, error) // ExecuteEntityIds executes the query based on the specified external id to keyspace id map. + // API group: Range Based Sharding ExecuteEntityIds(context.Context, *vtgate.ExecuteEntityIdsRequest) (*vtgate.ExecuteEntityIdsResponse, error) // ExecuteBatchShards executes the list of queries on the specified shards. + // API group: Custom Sharding ExecuteBatchShards(context.Context, *vtgate.ExecuteBatchShardsRequest) (*vtgate.ExecuteBatchShardsResponse, error) // ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids. + // API group: Range Based Sharding ExecuteBatchKeyspaceIds(context.Context, *vtgate.ExecuteBatchKeyspaceIdsRequest) (*vtgate.ExecuteBatchKeyspaceIdsResponse, error) - // StreamExecute exectures a streaming query based on shards. - // (this is a vtgate v3 API, use carefully) + // StreamExecute executes a streaming query based on shards. + // It depends on the query and bind variables to provide enough + // information in conjonction with the vindexes to route the query. + // Use this method if the query returns a large number of rows. + // API group: v3 API (alpha) StreamExecute(*vtgate.StreamExecuteRequest, Vitess_StreamExecuteServer) error - // StreamExecuteShard exectures a streaming query based on shards. + // StreamExecuteShards executes a streaming query based on shards. // Use this method if the query returns a large number of rows. + // API group: Custom Sharding StreamExecuteShards(*vtgate.StreamExecuteShardsRequest, Vitess_StreamExecuteShardsServer) error - // StreamExecuteKeyspaceIds exectures a streaming query based on keyspace ids. + // StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids. // Use this method if the query returns a large number of rows. + // API group: Range Based Sharding StreamExecuteKeyspaceIds(*vtgate.StreamExecuteKeyspaceIdsRequest, Vitess_StreamExecuteKeyspaceIdsServer) error - // StreamExecuteKeyRanges exectures a streaming query based on key ranges. + // StreamExecuteKeyRanges executes a streaming query based on key ranges. // Use this method if the query returns a large number of rows. + // API group: Range Based Sharding StreamExecuteKeyRanges(*vtgate.StreamExecuteKeyRangesRequest, Vitess_StreamExecuteKeyRangesServer) error // Begin a transaction. + // API group: Transactions Begin(context.Context, *vtgate.BeginRequest) (*vtgate.BeginResponse, error) // Commit a transaction. + // API group: Transactions Commit(context.Context, *vtgate.CommitRequest) (*vtgate.CommitResponse, error) // Rollback a transaction. + // API group: Transactions Rollback(context.Context, *vtgate.RollbackRequest) (*vtgate.RollbackResponse, error) // Split a query into non-overlapping sub queries + // API group: Map Reduce SplitQuery(context.Context, *vtgate.SplitQueryRequest) (*vtgate.SplitQueryResponse, error) // GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate). // This method is provided as a convenient way for clients to take a @@ -364,6 +405,7 @@ type VitessServer interface { // information may change, use the Execute calls for that). // It is convenient for monitoring applications for instance, or if // using custom sharding. + // API group: Topology GetSrvKeyspace(context.Context, *vtgate.GetSrvKeyspaceRequest) (*vtgate.GetSrvKeyspaceResponse, error) } diff --git a/go/vt/proto/vtrpc/vtrpc.pb.go b/go/vt/proto/vtrpc/vtrpc.pb.go index 500a88b8e5b..95b2ec401ec 100644 --- a/go/vt/proto/vtrpc/vtrpc.pb.go +++ b/go/vt/proto/vtrpc/vtrpc.pb.go @@ -15,9 +15,13 @@ It has these top-level messages: package vtrpc import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // ErrorCode is the enum values for Errors. Internally, errors should // be created with one of these codes. These will then be translated over the wire @@ -128,45 +132,6 @@ func (x ErrorCode) String() string { return proto.EnumName(ErrorCode_name, int32(x)) } -// ErrorCodeDeprecated is the enum values for Errors. These are deprecated errors, we -// should instead be using ErrorCode. -type ErrorCodeDeprecated int32 - -const ( - // NoError means there was no error, and the message should be ignored. - ErrorCodeDeprecated_NoError ErrorCodeDeprecated = 0 - // TabletError is the base VtTablet error. All VtTablet errors - // should be 4 digits, starting with 1. - ErrorCodeDeprecated_TabletError ErrorCodeDeprecated = 1000 - // UnknownTabletError is the code for an unknown error that came - // from VtTablet. - ErrorCodeDeprecated_UnknownTabletError ErrorCodeDeprecated = 1999 - // VtgateError is the base VTGate error code. All VTGate errors - // should be 4 digits, starting with 2. - ErrorCodeDeprecated_VtgateError ErrorCodeDeprecated = 2000 - // UnknownVtgateError is the code for an unknown error that came from VTGate. - ErrorCodeDeprecated_UnknownVtgateError ErrorCodeDeprecated = 2999 -) - -var ErrorCodeDeprecated_name = map[int32]string{ - 0: "NoError", - 1000: "TabletError", - 1999: "UnknownTabletError", - 2000: "VtgateError", - 2999: "UnknownVtgateError", -} -var ErrorCodeDeprecated_value = map[string]int32{ - "NoError": 0, - "TabletError": 1000, - "UnknownTabletError": 1999, - "VtgateError": 2000, - "UnknownVtgateError": 2999, -} - -func (x ErrorCodeDeprecated) String() string { - return proto.EnumName(ErrorCodeDeprecated_name, int32(x)) -} - // CallerID is passed along RPCs to identify the originating client // for a request. It is not meant to be secure, but only // informational. The client can put whatever info they want in these @@ -201,8 +166,8 @@ func (*CallerID) ProtoMessage() {} // We use this so the clients don't have to parse the error messages, // but instead can depend on the value of the code. type RPCError struct { - Code ErrorCodeDeprecated `protobuf:"varint,1,opt,name=code,enum=vtrpc.ErrorCodeDeprecated" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + Code ErrorCode `protobuf:"varint,1,opt,name=code,enum=vtrpc.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` } func (m *RPCError) Reset() { *m = RPCError{} } @@ -211,5 +176,4 @@ func (*RPCError) ProtoMessage() {} func init() { proto.RegisterEnum("vtrpc.ErrorCode", ErrorCode_name, ErrorCode_value) - proto.RegisterEnum("vtrpc.ErrorCodeDeprecated", ErrorCodeDeprecated_name, ErrorCodeDeprecated_value) } diff --git a/go/vt/proto/vtworkerdata/vtworkerdata.pb.go b/go/vt/proto/vtworkerdata/vtworkerdata.pb.go index 265c66eba1f..a6a6bb4a4e5 100644 --- a/go/vt/proto/vtworkerdata/vtworkerdata.pb.go +++ b/go/vt/proto/vtworkerdata/vtworkerdata.pb.go @@ -15,10 +15,14 @@ It has these top-level messages: package vtworkerdata import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import logutil "github.com/youtube/vitess/go/vt/proto/logutil" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // ExecuteVtworkerCommandRequest is the payload for ExecuteVtworkerCommand. type ExecuteVtworkerCommandRequest struct { diff --git a/go/vt/proto/vtworkerservice/vtworkerservice.pb.go b/go/vt/proto/vtworkerservice/vtworkerservice.pb.go index 0434258e3a7..abda626ead2 100644 --- a/go/vt/proto/vtworkerservice/vtworkerservice.pb.go +++ b/go/vt/proto/vtworkerservice/vtworkerservice.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: package vtworkerservice import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import vtworkerdata "github.com/youtube/vitess/go/vt/proto/vtworkerdata" import ( @@ -21,11 +23,13 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal +var _ context.Context +var _ grpc.ClientConn // Client API for Vtworker service diff --git a/go/vt/tabletserver/gorpctabletconn/conn.go b/go/vt/tabletserver/gorpctabletconn/conn.go index 12d39eb4ff2..75ef4d0af3d 100644 --- a/go/vt/tabletserver/gorpctabletconn/conn.go +++ b/go/vt/tabletserver/gorpctabletconn/conn.go @@ -638,13 +638,13 @@ func tabletError(err error) error { } func tabletErrorFromVitessError(ve *vterrors.VitessError) error { - // see if the range is in the tablet error range - if ve.Code >= vterrors.TabletError && ve.Code <= vterrors.UnknownTabletError { - return &tabletconn.ServerError{ - Code: int(ve.Code - vterrors.TabletError), - Err: fmt.Sprintf("vttablet: %v", ve.Error()), - } - } + // // see if the range is in the tablet error range + // if ve.Code >= vterrors.TabletError && ve.Code <= vterrors.UnknownTabletError { + // return &tabletconn.ServerError{ + // Code: int(ve.Code - vterrors.TabletError), + // Err: fmt.Sprintf("vttablet: %v", ve.Error()), + // } + // } return tabletconn.OperationalError(fmt.Sprintf("vttablet: %v", ve.Message)) } diff --git a/go/vt/tabletserver/grpcqueryservice/server.go b/go/vt/tabletserver/grpcqueryservice/server.go index 1f97fa7aa12..17b5aa8c8e5 100644 --- a/go/vt/tabletserver/grpcqueryservice/server.go +++ b/go/vt/tabletserver/grpcqueryservice/server.go @@ -8,7 +8,6 @@ import ( "sync" "google.golang.org/grpc" - "google.golang.org/grpc/codes" mproto "github.com/youtube/vitess/go/mysql/proto" "github.com/youtube/vitess/go/vt/callerid" @@ -17,6 +16,7 @@ import ( "github.com/youtube/vitess/go/vt/tabletserver" "github.com/youtube/vitess/go/vt/tabletserver/proto" "github.com/youtube/vitess/go/vt/tabletserver/queryservice" + "github.com/youtube/vitess/go/vt/vterrors" "golang.org/x/net/context" pb "github.com/youtube/vitess/go/vt/proto/query" @@ -38,7 +38,7 @@ func (q *query) GetSessionId(ctx context.Context, request *pb.GetSessionIdReques Keyspace: request.Keyspace, Shard: request.Shard, }, sessionInfo); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.GetSessionIdResponse{ @@ -60,7 +60,7 @@ func (q *query) Execute(ctx context.Context, request *pb.ExecuteRequest) (respon SessionId: request.SessionId, TransactionId: request.TransactionId, }, reply); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.ExecuteResponse{ Result: mproto.QueryResultToProto3(reply), @@ -81,7 +81,7 @@ func (q *query) ExecuteBatch(ctx context.Context, request *pb.ExecuteBatchReques AsTransaction: request.AsTransaction, TransactionId: request.TransactionId, }, reply); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.ExecuteBatchResponse{ Results: proto.QueryResultListToProto3(reply.List), @@ -104,7 +104,7 @@ func (q *query) StreamExecute(request *pb.StreamExecuteRequest, stream pbs.Query Result: mproto.QueryResultToProto3(reply), }) }); err != nil { - return grpc.Errorf(codes.Internal, "%v", err) + return vterrors.ToGRPCError(err) } return nil } @@ -120,7 +120,7 @@ func (q *query) Begin(ctx context.Context, request *pb.BeginRequest) (response * if err := q.server.Begin(ctx, request.Target, &proto.Session{ SessionId: request.SessionId, }, txInfo); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.BeginResponse{ @@ -139,7 +139,7 @@ func (q *query) Commit(ctx context.Context, request *pb.CommitRequest) (response SessionId: request.SessionId, TransactionId: request.TransactionId, }); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.CommitResponse{}, nil } @@ -155,7 +155,7 @@ func (q *query) Rollback(ctx context.Context, request *pb.RollbackRequest) (resp SessionId: request.SessionId, TransactionId: request.TransactionId, }); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.RollbackResponse{}, nil @@ -175,7 +175,7 @@ func (q *query) SplitQuery(ctx context.Context, request *pb.SplitQueryRequest) ( SplitCount: int(request.SplitCount), SessionID: request.SessionId, }, reply); err != nil { - return nil, grpc.Errorf(codes.Internal, "%v", err) + return nil, vterrors.ToGRPCError(err) } return &pb.SplitQueryResponse{ Queries: proto.QuerySplitsToProto3(reply.Queries), diff --git a/go/vt/tabletserver/tablet_error.go b/go/vt/tabletserver/tablet_error.go index 78b41c0095e..2c2d8ffc58e 100644 --- a/go/vt/tabletserver/tablet_error.go +++ b/go/vt/tabletserver/tablet_error.go @@ -18,7 +18,6 @@ import ( "github.com/youtube/vitess/go/vt/logutil" "github.com/youtube/vitess/go/vt/proto/vtrpc" "github.com/youtube/vitess/go/vt/tabletserver/proto" - "github.com/youtube/vitess/go/vt/vterrors" ) const ( @@ -258,8 +257,7 @@ func rpcErrFromTabletError(err error) *mproto.RPCError { terr, ok := err.(*TabletError) if ok { return &mproto.RPCError{ - // Transform TabletError code to VitessError code - Code: int64(terr.ErrorType) + vterrors.TabletError, + Code: int64(terr.ErrorCode), // Make sure the the VitessError message is identical to the TabletError // err, so that downstream consumers will see identical messages no matter // which server version they're using. @@ -269,7 +267,7 @@ func rpcErrFromTabletError(err error) *mproto.RPCError { // We don't know exactly what the passed in error was return &mproto.RPCError{ - Code: vterrors.UnknownTabletError, + Code: int64(vtrpc.ErrorCode_UNKNOWN_ERROR), Message: err.Error(), } } @@ -345,25 +343,3 @@ func AddTabletErrorToRollbackResponse(err error, reply *proto.RollbackResponse) } reply.Err = rpcErrFromTabletError(err) } - -// TabletErrorToRPCError transforms the provided error to a RPCError, -// if any. -func TabletErrorToRPCError(err error) *vtrpc.RPCError { - if err == nil { - return nil - } - if terr, ok := err.(*TabletError); ok { - return &vtrpc.RPCError{ - // Transform TabletError code to VitessError code - Code: vtrpc.ErrorCodeDeprecated(int64(terr.ErrorType) + vterrors.TabletError), - // Make sure the the VitessError message is identical to the TabletError - // err, so that downstream consumers will see identical messages no matter - // which endpoint they're using. - Message: terr.Error(), - } - } - return &vtrpc.RPCError{ - Code: vtrpc.ErrorCodeDeprecated_UnknownTabletError, - Message: err.Error(), - } -} diff --git a/go/vt/vterrors/vterrors.go b/go/vt/vterrors/vterrors.go index 70ec12a57a2..d27309a2c16 100644 --- a/go/vt/vterrors/vterrors.go +++ b/go/vt/vterrors/vterrors.go @@ -9,25 +9,18 @@ package vterrors import ( "fmt" - mproto "github.com/youtube/vitess/go/mysql/proto" - pb "github.com/youtube/vitess/go/vt/proto/vtrpc" -) + "google.golang.org/grpc" + "google.golang.org/grpc/codes" -const ( - // TabletError is the base VtTablet error. All VtTablet errors should be 4 digits, starting with 1. - TabletError = 1000 - // UnknownTabletError is the code for an unknown error that came from VtTablet. - UnknownTabletError = 1999 - // VtgateError is the base VTGate error code. All VTGate errors should be 4 digits, starting with 2. - VtgateError = 2000 - // UnknownVtgateError is the code for an unknown error that came from VTGate. - UnknownVtgateError = 2999 + mproto "github.com/youtube/vitess/go/mysql/proto" + "github.com/youtube/vitess/go/vt/proto/vtrpc" + "github.com/youtube/vitess/go/vt/tabletserver" ) // VitessError is the error type that we use internally for passing structured errors type VitessError struct { // Error code of the Vitess error - Code int64 + Code vtrpc.ErrorCode // Additional context string, distinct from the error message. For example, if // you wanted an error like "foo error: original error", the Message string // should be "foo error: " @@ -52,7 +45,7 @@ func (e *VitessError) AsString() string { } // FromError returns a VitessError with the supplied error code and wrapped error. -func FromError(code int64, err error) error { +func FromError(code vtrpc.ErrorCode, err error) error { return &VitessError{ Code: code, err: err, @@ -66,19 +59,19 @@ func FromRPCError(rpcErr *mproto.RPCError) error { return nil } return &VitessError{ - Code: rpcErr.Code, + Code: vtrpc.ErrorCode(rpcErr.Code), err: fmt.Errorf("%v", rpcErr.Message), } } // FromVtRPCError recovers a VitessError from a *vtrpc.RPCError (which is how VitessErrors // are transmitted across proto3 RPC boundaries). -func FromVtRPCError(rpcErr *pb.RPCError) *VitessError { +func FromVtRPCError(rpcErr *vtrpc.RPCError) *VitessError { if rpcErr == nil { return nil } return &VitessError{ - Code: int64(rpcErr.Code), + Code: rpcErr.Code, err: fmt.Errorf("%v", rpcErr.Message), } } @@ -96,3 +89,60 @@ func WithPrefix(prefix string, in error) error { Message: fmt.Sprintf("%s: %s", prefix, vtErr.Message), } } + +// errorCodeToGRPCCode maps a vtrpc.ErrorCode to a gRPC codes.Code +func errorCodeToGRPCCode(code vtrpc.ErrorCode) codes.Code { + switch code { + case vtrpc.ErrorCode_SUCCESS: + return codes.OK + case vtrpc.ErrorCode_CANCELLED: + return codes.Canceled + case vtrpc.ErrorCode_UNKNOWN_ERROR: + return codes.Unknown + case vtrpc.ErrorCode_BAD_INPUT: + return codes.InvalidArgument + case vtrpc.ErrorCode_DEADLINE_EXCEEDED: + return codes.DeadlineExceeded + case vtrpc.ErrorCode_INTEGRITY_ERROR: + return codes.AlreadyExists + case vtrpc.ErrorCode_PERMISSION_DENIED: + return codes.PermissionDenied + case vtrpc.ErrorCode_RESOURCE_EXHAUSTED: + return codes.ResourceExhausted + case vtrpc.ErrorCode_QUERY_NOT_SERVED: + return codes.FailedPrecondition + case vtrpc.ErrorCode_NOT_IN_TX: + return codes.Aborted + case vtrpc.ErrorCode_INTERNAL_ERROR: + return codes.Internal + case vtrpc.ErrorCode_TRANSIENT_ERROR: + return codes.Unavailable + case vtrpc.ErrorCode_UNAUTHENTICATED: + return codes.Unauthenticated + default: + return codes.Unknown + } +} + +// toGRPCCode will attempt to determine the best gRPC code for a particular error. +func toGRPCCode(err error) codes.Code { + if err == nil { + return codes.OK + } + if vtErr, ok := err.(*VitessError); ok { + return errorCodeToGRPCCode(vtErr.Code) + } + if tErr, ok := err.(*tabletserver.TabletError); ok { + return errorCodeToGRPCCode(tErr.ErrorCode) + } + // Returns the underlying grpc Code, or codes.Unknown if one doesn't exist + return grpc.Code(err) +} + +// ToGRPCError returns an error as a grpc error, with the appropriate error code +func ToGRPCError(err error) error { + if err == nil { + return nil + } + return grpc.Errorf(toGRPCCode(err), "%v", err) +} diff --git a/go/vt/vtgate/vtgate_error.go b/go/vt/vtgate/vtgate_error.go index 0df36ce06ef..7ae7a2c277c 100644 --- a/go/vt/vtgate/vtgate_error.go +++ b/go/vt/vtgate/vtgate_error.go @@ -16,11 +16,20 @@ func rpcErrFromVtGateError(err error) *mproto.RPCError { if err == nil { return nil } - // TODO(aaijazi): for now, we don't have any differentiation of VtGate errors. - // However, we should have them soon, so that clients don't have to parse the - // returned error string. + vtErr, ok := err.(*vterrors.VitessError) + if ok { + return &mproto.RPCError{ + Code: int64(vtErr.Code), + // Make sure the the RPCError message is identical to the VitessError + // err, so that downstream consumers will see identical messages no matter + // which server version they're using. + Message: vtErr.Error(), + } + } + + // We don't know exactly what the passed in error was return &mproto.RPCError{ - Code: vterrors.UnknownVtgateError, + Code: int64(vtrpc.ErrorCode_UNKNOWN_ERROR), Message: err.Error(), } } @@ -91,7 +100,7 @@ func VtGateErrorToVtRPCError(err error, errString string) *vtrpc.RPCError { message = errString } return &vtrpc.RPCError{ - Code: vtrpc.ErrorCodeDeprecated_UnknownVtgateError, + Code: vtrpc.ErrorCode_UNKNOWN_ERROR, Message: message, } } diff --git a/proto/vtrpc.proto b/proto/vtrpc.proto index af7b928890f..1138d3d2d28 100644 --- a/proto/vtrpc.proto +++ b/proto/vtrpc.proto @@ -117,33 +117,11 @@ enum ErrorCode { UNAUTHENTICATED = 12; } -// ErrorCodeDeprecated is the enum values for Errors. These are deprecated errors, we -// should instead be using ErrorCode. -enum ErrorCodeDeprecated { - // NoError means there was no error, and the message should be ignored. - NoError = 0; - - // TabletError is the base VtTablet error. All VtTablet errors - // should be 4 digits, starting with 1. - TabletError = 1000; - - // UnknownTabletError is the code for an unknown error that came - // from VtTablet. - UnknownTabletError = 1999; - - // VtgateError is the base VTGate error code. All VTGate errors - // should be 4 digits, starting with 2. - VtgateError = 2000; - - // UnknownVtgateError is the code for an unknown error that came from VTGate. - UnknownVtgateError = 2999; -} - // RPCError is an application-level error structure returned by // VtTablet (and passed along by VtGate if appropriate). // We use this so the clients don't have to parse the error messages, // but instead can depend on the value of the code. message RPCError { - ErrorCodeDeprecated code = 1; + ErrorCode code = 1; string message = 2; } diff --git a/py/vtproto/vtrpc_pb2.py b/py/vtproto/vtrpc_pb2.py index bc2d5d6e27e..dfb8adc5a52 100644 --- a/py/vtproto/vtrpc_pb2.py +++ b/py/vtproto/vtrpc_pb2.py @@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( name='vtrpc.proto', package='vtrpc', - serialized_pb=_b('\n\x0bvtrpc.proto\x12\x05vtrpc\"F\n\x08\x43\x61llerID\x12\x11\n\tprincipal\x18\x01 \x01(\t\x12\x11\n\tcomponent\x18\x02 \x01(\t\x12\x14\n\x0csubcomponent\x18\x03 \x01(\t\"E\n\x08RPCError\x12(\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1a.vtrpc.ErrorCodeDeprecated\x12\x0f\n\x07message\x18\x02 \x01(\t*\x87\x02\n\tErrorCode\x12\x0b\n\x07SUCCESS\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\x11\n\rUNKNOWN_ERROR\x10\x02\x12\r\n\tBAD_INPUT\x10\x03\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x04\x12\x13\n\x0fINTEGRITY_ERROR\x10\x05\x12\x15\n\x11PERMISSION_DENIED\x10\x06\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x07\x12\x14\n\x10QUERY_NOT_SERVED\x10\x08\x12\r\n\tNOT_IN_TX\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x13\n\x0fTRANSIENT_ERROR\x10\x0b\x12\x13\n\x0fUNAUTHENTICATED\x10\x0c*x\n\x13\x45rrorCodeDeprecated\x12\x0b\n\x07NoError\x10\x00\x12\x10\n\x0bTabletError\x10\xe8\x07\x12\x17\n\x12UnknownTabletError\x10\xcf\x0f\x12\x10\n\x0bVtgateError\x10\xd0\x0f\x12\x17\n\x12UnknownVtgateError\x10\xb7\x17\x42\x1a\n\x18\x63om.youtube.vitess.protob\x06proto3') + serialized_pb=_b('\n\x0bvtrpc.proto\x12\x05vtrpc\"F\n\x08\x43\x61llerID\x12\x11\n\tprincipal\x18\x01 \x01(\t\x12\x11\n\tcomponent\x18\x02 \x01(\t\x12\x14\n\x0csubcomponent\x18\x03 \x01(\t\";\n\x08RPCError\x12\x1e\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x10.vtrpc.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t*\x87\x02\n\tErrorCode\x12\x0b\n\x07SUCCESS\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\x11\n\rUNKNOWN_ERROR\x10\x02\x12\r\n\tBAD_INPUT\x10\x03\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x04\x12\x13\n\x0fINTEGRITY_ERROR\x10\x05\x12\x15\n\x11PERMISSION_DENIED\x10\x06\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x07\x12\x14\n\x10QUERY_NOT_SERVED\x10\x08\x12\r\n\tNOT_IN_TX\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x13\n\x0fTRANSIENT_ERROR\x10\x0b\x12\x13\n\x0fUNAUTHENTICATED\x10\x0c\x42\x1a\n\x18\x63om.youtube.vitess.protob\x06proto3') ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -84,47 +84,12 @@ ], containing_type=None, options=None, - serialized_start=166, - serialized_end=429, + serialized_start=156, + serialized_end=419, ) _sym_db.RegisterEnumDescriptor(_ERRORCODE) ErrorCode = enum_type_wrapper.EnumTypeWrapper(_ERRORCODE) -_ERRORCODEDEPRECATED = _descriptor.EnumDescriptor( - name='ErrorCodeDeprecated', - full_name='vtrpc.ErrorCodeDeprecated', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='NoError', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='TabletError', index=1, number=1000, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UnknownTabletError', index=2, number=1999, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='VtgateError', index=3, number=2000, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UnknownVtgateError', index=4, number=2999, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=431, - serialized_end=551, -) -_sym_db.RegisterEnumDescriptor(_ERRORCODEDEPRECATED) - -ErrorCodeDeprecated = enum_type_wrapper.EnumTypeWrapper(_ERRORCODEDEPRECATED) SUCCESS = 0 CANCELLED = 1 UNKNOWN_ERROR = 2 @@ -138,11 +103,6 @@ INTERNAL_ERROR = 10 TRANSIENT_ERROR = 11 UNAUTHENTICATED = 12 -NoError = 0 -TabletError = 1000 -UnknownTabletError = 1999 -VtgateError = 2000 -UnknownVtgateError = 2999 @@ -223,14 +183,13 @@ oneofs=[ ], serialized_start=94, - serialized_end=163, + serialized_end=153, ) -_RPCERROR.fields_by_name['code'].enum_type = _ERRORCODEDEPRECATED +_RPCERROR.fields_by_name['code'].enum_type = _ERRORCODE DESCRIPTOR.message_types_by_name['CallerID'] = _CALLERID DESCRIPTOR.message_types_by_name['RPCError'] = _RPCERROR DESCRIPTOR.enum_types_by_name['ErrorCode'] = _ERRORCODE -DESCRIPTOR.enum_types_by_name['ErrorCodeDeprecated'] = _ERRORCODEDEPRECATED CallerID = _reflection.GeneratedProtocolMessageType('CallerID', (_message.Message,), dict( DESCRIPTOR = _CALLERID,