diff --git a/dm/master/server.go b/dm/master/server.go index 7ed726ae10..ad5ea4c556 100644 --- a/dm/master/server.go +++ b/dm/master/server.go @@ -342,7 +342,7 @@ func (s *Server) StartTask(ctx context.Context, req *pb.StartTaskRequest) (*pb.S wg.Add(1) go s.ap.Emit(ctx, 0, func(args ...interface{}) { defer wg.Done() - cli, worker, stCfgToml, taskName, err := s.taskConfigArgsExtractor(args...) + cli, worker, stCfgToml, _, err := s.taskConfigArgsExtractor(args...) if err != nil { workerRespCh <- errorCommonWorkerResponse(err.Error(), worker) return @@ -353,9 +353,14 @@ func (s *Server) StartTask(ctx context.Context, req *pb.StartTaskRequest) (*pb.S StartSubTask: &pb.StartSubTaskRequest{Task: stCfgToml}, } resp, err := cli.SendRequest(ctx, request, s.cfg.RPCTimeout) - workerResp := s.handleOperationResult(ctx, cli, taskName, worker, err, resp) - workerResp.Meta.Worker = worker - workerRespCh <- workerResp.Meta + if err != nil { + resp = &workerrpc.Response{ + Type: workerrpc.CmdStartSubTask, + StartSubTask: errorCommonWorkerResponse(err.Error(), worker), + } + } + resp.StartSubTask.Worker = worker + workerRespCh <- resp.StartSubTask }, func(args ...interface{}) { defer wg.Done() _, worker, _, _, err := s.taskConfigArgsExtractor(args...) @@ -420,8 +425,10 @@ func (s *Server) OperateTask(ctx context.Context, req *pb.OperateTaskRequest) (* handleErr := func(err error, worker string) { log.L().Error("response error", zap.Error(err)) workerResp := &pb.OperateSubTaskResponse{ - Meta: errorCommonWorkerResponse(err.Error(), worker), - Op: req.Op, + Op: req.Op, + Result: false, + Worker: worker, + Msg: err.Error(), } workerRespCh <- workerResp } @@ -445,10 +452,18 @@ func (s *Server) OperateTask(ctx context.Context, req *pb.OperateTaskRequest) (* return } resp, err := cli.SendRequest(ctx, subReq, s.cfg.RPCTimeout) - workerResp := s.handleOperationResult(ctx, cli, req.Name, worker1, err, resp) - workerResp.Op = req.Op - workerResp.Meta.Worker = worker1 - workerRespCh <- workerResp + if err != nil { + resp = &workerrpc.Response{ + Type: workerrpc.CmdOperateSubTask, + OperateSubTask: &pb.OperateSubTaskResponse{ + Op: req.Op, + Result: false, + Msg: err.Error(), + }, + } + } + resp.OperateSubTask.Worker = worker1 + workerRespCh <- resp.OperateSubTask }, func(args ...interface{}) { defer wg.Done() _, worker1, err := s.workerArgsExtractor(args...) @@ -465,9 +480,9 @@ func (s *Server) OperateTask(ctx context.Context, req *pb.OperateTaskRequest) (* workerRespMap := make(map[string]*pb.OperateSubTaskResponse, len(workers)) for len(workerRespCh) > 0 { workerResp := <-workerRespCh - workerRespMap[workerResp.Meta.Worker] = workerResp - if len(workerResp.Meta.Msg) == 0 { // no error occurred - validWorkers = append(validWorkers, workerResp.Meta.Worker) + workerRespMap[workerResp.Worker] = workerResp + if len(workerResp.Msg) == 0 { // no error occurred + validWorkers = append(validWorkers, workerResp.Worker) } } @@ -527,7 +542,7 @@ func (s *Server) UpdateTask(ctx context.Context, req *pb.UpdateTaskRequest) (*pb wg.Add(1) go s.ap.Emit(ctx, 0, func(args ...interface{}) { defer wg.Done() - cli, worker, stCfgToml, taskName, err := s.taskConfigArgsExtractor(args...) + cli, worker, stCfgToml, _, err := s.taskConfigArgsExtractor(args...) if err != nil { workerRespCh <- errorCommonWorkerResponse(err.Error(), worker) return @@ -537,9 +552,14 @@ func (s *Server) UpdateTask(ctx context.Context, req *pb.UpdateTaskRequest) (*pb UpdateSubTask: &pb.UpdateSubTaskRequest{Task: stCfgToml}, } resp, err := cli.SendRequest(ctx, request, s.cfg.RPCTimeout) - workerResp := s.handleOperationResult(ctx, cli, taskName, worker, err, resp) - workerResp.Meta.Worker = worker - workerRespCh <- workerResp.Meta + if err != nil { + resp = &workerrpc.Response{ + Type: workerrpc.CmdUpdateSubTask, + UpdateSubTask: errorCommonWorkerResponse(err.Error(), worker), + } + } + resp.UpdateSubTask.Worker = worker + workerRespCh <- resp.UpdateSubTask }, func(args ...interface{}) { defer wg.Done() _, worker, _, _, err := s.taskConfigArgsExtractor(args...) @@ -927,11 +947,7 @@ func (s *Server) SwitchWorkerRelayMaster(ctx context.Context, req *pb.SwitchWork handleErr := func(err error, worker string) { log.L().Error("response error", zap.Error(err)) - resp := &pb.CommonWorkerResponse{ - Result: false, - Msg: errors.ErrorStack(err), - Worker: worker, - } + resp := errorCommonWorkerResponse(errors.ErrorStack(err), worker) workerRespCh <- resp } @@ -1961,75 +1977,9 @@ func (s *Server) generateSubTask(ctx context.Context, task string) (*config.Task } var ( - maxRetryNum = 30 - retryInterval = time.Second + maxRetryNum = 30 ) -func (s *Server) waitOperationOk(ctx context.Context, cli workerrpc.Client, taskName, workerID string, opLogID int64) error { - req := &workerrpc.Request{ - Type: workerrpc.CmdQueryTaskOperation, - QueryTaskOperation: &pb.QueryTaskOperationRequest{ - Name: taskName, - LogID: opLogID, - }, - } - - for num := 0; num < maxRetryNum; num++ { - resp, err := cli.SendRequest(ctx, req, s.cfg.RPCTimeout) - var queryResp *pb.QueryTaskOperationResponse - if err != nil { - log.L().Error("fail to query task operation", zap.String("task", taskName), zap.String("worker", workerID), zap.Int64("operation log ID", opLogID), log.ShortError(err)) - } else { - queryResp = resp.QueryTaskOperation - respLog := queryResp.Log - if respLog == nil { - return terror.ErrMasterOperNotFound.Generate(opLogID, taskName, workerID) - } else if respLog.Success { - return nil - } else if len(respLog.Message) != 0 { - return terror.ErrMasterOperRespNotSuccess.Generate(opLogID, taskName, workerID, respLog.Message) - } - log.L().Info("wait op log result", zap.String("task", taskName), zap.String("worker", workerID), zap.Int64("operation log ID", opLogID), zap.Stringer("result", resp.QueryTaskOperation)) - } - - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(retryInterval): - } - } - - return terror.ErrMasterOperRequestTimeout.Generate(workerID) -} - -func (s *Server) handleOperationResult(ctx context.Context, cli workerrpc.Client, taskName, workerID string, err error, resp *workerrpc.Response) *pb.OperateSubTaskResponse { - if err != nil { - return &pb.OperateSubTaskResponse{ - Meta: errorCommonWorkerResponse(errors.ErrorStack(err), ""), - } - } - response := &pb.OperateSubTaskResponse{} - switch resp.Type { - case workerrpc.CmdStartSubTask: - response = resp.StartSubTask - case workerrpc.CmdOperateSubTask: - response = resp.OperateSubTask - case workerrpc.CmdUpdateSubTask: - response = resp.UpdateSubTask - default: - // this should not happen - response.Meta = errorCommonWorkerResponse(fmt.Sprintf("invalid operate task type %v", resp.Type), "") - return response - } - - err = s.waitOperationOk(ctx, cli, taskName, workerID, response.LogID) - if err != nil { - response.Meta = errorCommonWorkerResponse(errors.ErrorStack(err), "") - } - - return response -} - // taskConfigArgsExtractor extracts SubTaskConfig from args and returns its relevant // grpc client, worker id (host:port), subtask config in toml, task name and error func (s *Server) taskConfigArgsExtractor(args ...interface{}) (workerrpc.Client, string, string, string, error) { diff --git a/dm/master/server_test.go b/dm/master/server_test.go index 0edaa46fa0..33b88b69a5 100644 --- a/dm/master/server_test.go +++ b/dm/master/server_test.go @@ -205,7 +205,6 @@ func testMockWorkerConfig(c *check.C, server *Server, ctrl *gomock.Controller, p func testMockStartTask(c *check.C, server *Server, ctrl *gomock.Controller, workerCfg map[string]*config.SubTaskConfig, rpcSuccess bool) { for idx, deploy := range server.cfg.Deploy { mockWorkerClient := pbmock.NewMockWorkerClient(ctrl) - logID := int64(idx + 1) dbCfg := &config.DBConfig{ Host: "127.0.0.1", @@ -235,10 +234,9 @@ func testMockStartTask(c *check.C, server *Server, ctrl *gomock.Controller, work rets := make([]interface{}, 0, 2) if rpcSuccess { rets = []interface{}{ - &pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: deploy.Worker}, - Op: pb.TaskOp_Start, - LogID: logID, + &pb.CommonWorkerResponse{ + Result: true, + Worker: deploy.Worker, }, nil, } @@ -253,19 +251,6 @@ func testMockStartTask(c *check.C, server *Server, ctrl *gomock.Controller, work &pb.StartSubTaskRequest{Task: stCfgToml}, ).Return(rets...) - if rpcSuccess { - mockWorkerClient.EXPECT().QueryTaskOperation( - gomock.Any(), - &pb.QueryTaskOperationRequest{ - Name: stCfg.Name, - LogID: logID, - }, - ).Return(&pb.QueryTaskOperationResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: deploy.Worker}, - Log: &pb.TaskLog{Id: logID, Ts: time.Now().Unix(), Success: true}, - }, nil).MaxTimes(maxRetryNum) - } - server.workerClients[deploy.Worker] = newMockRPCClient(mockWorkerClient) } } @@ -588,13 +573,12 @@ func (t *testMaster) TestOperateTask(c *check.C) { c.Assert(resp.Workers, check.HasLen, 2) for _, subtaskResp := range resp.Workers { c.Assert(subtaskResp.Op, check.Equals, pauseOp) - c.Assert(subtaskResp.Meta.Msg, check.Matches, ".* relevant worker-client not found") + c.Assert(subtaskResp.Msg, check.Matches, ".* relevant worker-client not found") } // test pause task successfully - for idx, deploy := range server.cfg.Deploy { + for _, deploy := range server.cfg.Deploy { mockWorkerClient := pbmock.NewMockWorkerClient(ctrl) - logID := int64(idx + 1) mockWorkerClient.EXPECT().OperateSubTask( gomock.Any(), &pb.OperateSubTaskRequest{ @@ -602,20 +586,8 @@ func (t *testMaster) TestOperateTask(c *check.C) { Name: taskName, }, ).Return(&pb.OperateSubTaskResponse{ - Op: pauseOp, - LogID: logID, - Meta: &pb.CommonWorkerResponse{Result: true}, - }, nil) - - mockWorkerClient.EXPECT().QueryTaskOperation( - gomock.Any(), - &pb.QueryTaskOperationRequest{ - Name: taskName, - LogID: logID, - }, - ).Return(&pb.QueryTaskOperationResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: deploy.Worker}, - Log: &pb.TaskLog{Id: logID, Ts: time.Now().Unix(), Success: true}, + Op: pauseOp, + Result: true, }, nil) server.workerClients[deploy.Worker] = newMockRPCClient(mockWorkerClient) @@ -630,7 +602,7 @@ func (t *testMaster) TestOperateTask(c *check.C) { c.Assert(resp.Workers, check.HasLen, 2) for _, subtaskResp := range resp.Workers { c.Assert(subtaskResp.Op, check.Equals, pauseOp) - c.Assert(subtaskResp.Meta.Result, check.IsTrue) + c.Assert(subtaskResp.Result, check.IsTrue) } // test operate sub task to worker returns error @@ -655,12 +627,11 @@ func (t *testMaster) TestOperateTask(c *check.C) { c.Assert(resp.Workers, check.HasLen, 2) for _, subtaskResp := range resp.Workers { c.Assert(subtaskResp.Op, check.Equals, pauseOp) - c.Assert(subtaskResp.Meta.Msg, check.Matches, errGRPCFailedReg) + c.Assert(subtaskResp.Msg, check.Matches, errGRPCFailedReg) } // test stop task successfully, remove partial workers mockWorkerClient := pbmock.NewMockWorkerClient(ctrl) - logID := int64(42) mockWorkerClient.EXPECT().OperateSubTask( gomock.Any(), &pb.OperateSubTaskRequest{ @@ -668,20 +639,10 @@ func (t *testMaster) TestOperateTask(c *check.C) { Name: taskName, }, ).Return(&pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{Result: true}, - LogID: logID, - Op: pb.TaskOp_Stop, - }, nil) - mockWorkerClient.EXPECT().QueryTaskOperation( - gomock.Any(), - &pb.QueryTaskOperationRequest{ - Name: taskName, - LogID: logID, - }, - ).Return(&pb.QueryTaskOperationResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: workers[0]}, - Log: &pb.TaskLog{Id: logID, Ts: time.Now().Unix(), Success: true}, + Op: pb.TaskOp_Stop, + Result: true, }, nil) + server.workerClients[workers[0]] = newMockRPCClient(mockWorkerClient) resp, err = server.OperateTask(context.Background(), &pb.OperateTaskRequest{ Op: pb.TaskOp_Stop, @@ -691,15 +652,14 @@ func (t *testMaster) TestOperateTask(c *check.C) { c.Assert(err, check.IsNil) c.Assert(resp.Result, check.IsTrue) c.Assert(resp.Workers, check.HasLen, 1) - c.Assert(resp.Workers[0].Meta.Result, check.IsTrue) + c.Assert(resp.Workers[0].Result, check.IsTrue) c.Assert(server.taskWorkers, check.HasKey, taskName) c.Assert(server.taskWorkers[taskName], check.DeepEquals, []string{workers[1]}) // test stop task successfully, remove all workers server.taskWorkers[taskName] = workers - for idx, deploy := range server.cfg.Deploy { + for _, deploy := range server.cfg.Deploy { mockWorkerClient := pbmock.NewMockWorkerClient(ctrl) - logID := int64(idx + 100) mockWorkerClient.EXPECT().OperateSubTask( gomock.Any(), &pb.OperateSubTaskRequest{ @@ -707,20 +667,10 @@ func (t *testMaster) TestOperateTask(c *check.C) { Name: taskName, }, ).Return(&pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{Result: true}, - Op: pb.TaskOp_Stop, - LogID: logID, - }, nil) - mockWorkerClient.EXPECT().QueryTaskOperation( - gomock.Any(), - &pb.QueryTaskOperationRequest{ - Name: taskName, - LogID: logID, - }, - ).Return(&pb.QueryTaskOperationResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: workers[0]}, - Log: &pb.TaskLog{Id: logID, Ts: time.Now().Unix(), Success: true}, + Op: pb.TaskOp_Stop, + Result: true, }, nil) + server.workerClients[deploy.Worker] = newMockRPCClient(mockWorkerClient) } resp, err = server.OperateTask(context.Background(), &pb.OperateTaskRequest{ @@ -732,7 +682,7 @@ func (t *testMaster) TestOperateTask(c *check.C) { c.Assert(resp.Workers, check.HasLen, 2) for _, subtaskResp := range resp.Workers { c.Assert(subtaskResp.Op, check.Equals, pb.TaskOp_Stop) - c.Assert(subtaskResp.Meta.Result, check.IsTrue) + c.Assert(subtaskResp.Result, check.IsTrue) } c.Assert(len(server.taskWorkers), check.Equals, 0) } @@ -761,7 +711,6 @@ func (t *testMaster) TestUpdateTask(c *check.C) { mockUpdateTask := func(rpcSuccess bool) { for idx, deploy := range server.cfg.Deploy { mockWorkerClient := pbmock.NewMockWorkerClient(ctrl) - logID := int64(idx + 1) dbCfg := &config.DBConfig{ Host: "127.0.0.1", @@ -791,10 +740,9 @@ func (t *testMaster) TestUpdateTask(c *check.C) { rets := make([]interface{}, 0, 2) if rpcSuccess { rets = []interface{}{ - &pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: deploy.Worker}, - Op: pb.TaskOp_Start, - LogID: logID, + &pb.CommonWorkerResponse{ + Result: true, + Worker: deploy.Worker, }, nil, } @@ -809,19 +757,6 @@ func (t *testMaster) TestUpdateTask(c *check.C) { &pb.UpdateSubTaskRequest{Task: stCfgToml}, ).Return(rets...) - if rpcSuccess { - mockWorkerClient.EXPECT().QueryTaskOperation( - gomock.Any(), - &pb.QueryTaskOperationRequest{ - Name: stCfg.Name, - LogID: logID, - }, - ).Return(&pb.QueryTaskOperationResponse{ - Meta: &pb.CommonWorkerResponse{Result: true, Worker: deploy.Worker}, - Log: &pb.TaskLog{Id: logID, Ts: time.Now().Unix(), Success: true}, - }, nil) - } - server.workerClients[deploy.Worker] = newMockRPCClient(mockWorkerClient) } } diff --git a/dm/master/workerrpc/interface.go b/dm/master/workerrpc/interface.go index a0607a2793..ee127f2f13 100644 --- a/dm/master/workerrpc/interface.go +++ b/dm/master/workerrpc/interface.go @@ -55,10 +55,9 @@ type Request struct { OperateSubTask *pb.OperateSubTaskRequest UpdateSubTask *pb.UpdateSubTaskRequest - QueryStatus *pb.QueryStatusRequest - QueryError *pb.QueryErrorRequest - QueryTaskOperation *pb.QueryTaskOperationRequest - QueryWorkerConfig *pb.QueryWorkerConfigRequest + QueryStatus *pb.QueryStatusRequest + QueryError *pb.QueryErrorRequest + QueryWorkerConfig *pb.QueryWorkerConfigRequest HandleSubTaskSQLs *pb.HandleSubTaskSQLsRequest ExecDDL *pb.ExecDDLRequest @@ -75,14 +74,13 @@ type Request struct { type Response struct { Type CmdType - StartSubTask *pb.OperateSubTaskResponse + StartSubTask *pb.CommonWorkerResponse OperateSubTask *pb.OperateSubTaskResponse - UpdateSubTask *pb.OperateSubTaskResponse + UpdateSubTask *pb.CommonWorkerResponse - QueryStatus *pb.QueryStatusResponse - QueryError *pb.QueryErrorResponse - QueryTaskOperation *pb.QueryTaskOperationResponse - QueryWorkerConfig *pb.QueryWorkerConfigResponse + QueryStatus *pb.QueryStatusResponse + QueryError *pb.QueryErrorResponse + QueryWorkerConfig *pb.QueryWorkerConfigResponse HandleSubTaskSQLs *pb.CommonWorkerResponse ExecDDL *pb.CommonWorkerResponse diff --git a/dm/master/workerrpc/rawgrpc.go b/dm/master/workerrpc/rawgrpc.go index 13b81e28f9..3be5552e80 100644 --- a/dm/master/workerrpc/rawgrpc.go +++ b/dm/master/workerrpc/rawgrpc.go @@ -95,8 +95,6 @@ func callRPC(ctx context.Context, client pb.WorkerClient, req *Request) (*Respon resp.QueryStatus, err = client.QueryStatus(ctx, req.QueryStatus) case CmdQueryError: resp.QueryError, err = client.QueryError(ctx, req.QueryError) - case CmdQueryTaskOperation: - resp.QueryTaskOperation, err = client.QueryTaskOperation(ctx, req.QueryTaskOperation) case CmdQueryWorkerConfig: resp.QueryWorkerConfig, err = client.QueryWorkerConfig(ctx, req.QueryWorkerConfig) case CmdHandleSubTaskSQLs: diff --git a/dm/pb/dmmaster.pb.go b/dm/pb/dmmaster.pb.go index 11e9696f7d..1bf52b19a3 100644 --- a/dm/pb/dmmaster.pb.go +++ b/dm/pb/dmmaster.pb.go @@ -4,17 +4,19 @@ package pb import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" + "fmt" proto "github.com/gogo/protobuf/proto" + + math "math" + _ "google.golang.org/genproto/googleapis/api/annotations" + + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + + io "io" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type MigrateWorkerRelayRequest struct { BinlogName string `protobuf:"bytes,1,opt,name=BinlogName,proto3" json:"BinlogName,omitempty"` @@ -38,7 +40,7 @@ func (m *MigrateWorkerRelayRequest) Reset() { *m = MigrateWorkerRelayReq func (m *MigrateWorkerRelayRequest) String() string { return proto.CompactTextString(m) } func (*MigrateWorkerRelayRequest) ProtoMessage() {} func (*MigrateWorkerRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{0} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{0} } func (m *MigrateWorkerRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -48,15 +50,15 @@ func (m *MigrateWorkerRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_MigrateWorkerRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *MigrateWorkerRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MigrateWorkerRelayRequest.Merge(m, src) +func (dst *MigrateWorkerRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrateWorkerRelayRequest.Merge(dst, src) } func (m *MigrateWorkerRelayRequest) XXX_Size() int { return m.Size() @@ -97,7 +99,7 @@ func (m *UpdateWorkerRelayConfigRequest) Reset() { *m = UpdateWorkerRela func (m *UpdateWorkerRelayConfigRequest) String() string { return proto.CompactTextString(m) } func (*UpdateWorkerRelayConfigRequest) ProtoMessage() {} func (*UpdateWorkerRelayConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{1} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{1} } func (m *UpdateWorkerRelayConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,15 +109,15 @@ func (m *UpdateWorkerRelayConfigRequest) XXX_Marshal(b []byte, deterministic boo return xxx_messageInfo_UpdateWorkerRelayConfigRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateWorkerRelayConfigRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateWorkerRelayConfigRequest.Merge(m, src) +func (dst *UpdateWorkerRelayConfigRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateWorkerRelayConfigRequest.Merge(dst, src) } func (m *UpdateWorkerRelayConfigRequest) XXX_Size() int { return m.Size() @@ -142,14 +144,14 @@ func (m *UpdateWorkerRelayConfigRequest) GetWorker() string { type StartTaskRequest struct { Task string `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *StartTaskRequest) Reset() { *m = StartTaskRequest{} } func (m *StartTaskRequest) String() string { return proto.CompactTextString(m) } func (*StartTaskRequest) ProtoMessage() {} func (*StartTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{2} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{2} } func (m *StartTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,15 +161,15 @@ func (m *StartTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_StartTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *StartTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartTaskRequest.Merge(m, src) +func (dst *StartTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartTaskRequest.Merge(dst, src) } func (m *StartTaskRequest) XXX_Size() int { return m.Size() @@ -195,14 +197,14 @@ func (m *StartTaskRequest) GetWorkers() []string { type StartTaskResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *StartTaskResponse) Reset() { *m = StartTaskResponse{} } func (m *StartTaskResponse) String() string { return proto.CompactTextString(m) } func (*StartTaskResponse) ProtoMessage() {} func (*StartTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{3} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{3} } func (m *StartTaskResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -212,15 +214,15 @@ func (m *StartTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_StartTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *StartTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartTaskResponse.Merge(m, src) +func (dst *StartTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartTaskResponse.Merge(dst, src) } func (m *StartTaskResponse) XXX_Size() int { return m.Size() @@ -260,7 +262,7 @@ func (m *UpdateMasterConfigRequest) Reset() { *m = UpdateMasterConfigReq func (m *UpdateMasterConfigRequest) String() string { return proto.CompactTextString(m) } func (*UpdateMasterConfigRequest) ProtoMessage() {} func (*UpdateMasterConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{4} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{4} } func (m *UpdateMasterConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,15 +272,15 @@ func (m *UpdateMasterConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_UpdateMasterConfigRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateMasterConfigRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateMasterConfigRequest.Merge(m, src) +func (dst *UpdateMasterConfigRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateMasterConfigRequest.Merge(dst, src) } func (m *UpdateMasterConfigRequest) XXX_Size() int { return m.Size() @@ -299,14 +301,14 @@ func (m *UpdateMasterConfigRequest) GetConfig() string { type UpdateMasterConfigResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*QueryStatusResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*QueryStatusResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *UpdateMasterConfigResponse) Reset() { *m = UpdateMasterConfigResponse{} } func (m *UpdateMasterConfigResponse) String() string { return proto.CompactTextString(m) } func (*UpdateMasterConfigResponse) ProtoMessage() {} func (*UpdateMasterConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{5} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{5} } func (m *UpdateMasterConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -316,15 +318,15 @@ func (m *UpdateMasterConfigResponse) XXX_Marshal(b []byte, deterministic bool) ( return xxx_messageInfo_UpdateMasterConfigResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateMasterConfigResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateMasterConfigResponse.Merge(m, src) +func (dst *UpdateMasterConfigResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateMasterConfigResponse.Merge(dst, src) } func (m *UpdateMasterConfigResponse) XXX_Size() int { return m.Size() @@ -359,14 +361,14 @@ func (m *UpdateMasterConfigResponse) GetWorkers() []*QueryStatusResponse { type OperateTaskRequest struct { Op TaskOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.TaskOp" json:"op,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Workers []string `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *OperateTaskRequest) Reset() { *m = OperateTaskRequest{} } func (m *OperateTaskRequest) String() string { return proto.CompactTextString(m) } func (*OperateTaskRequest) ProtoMessage() {} func (*OperateTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{6} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{6} } func (m *OperateTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -376,15 +378,15 @@ func (m *OperateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_OperateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateTaskRequest.Merge(m, src) +func (dst *OperateTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateTaskRequest.Merge(dst, src) } func (m *OperateTaskRequest) XXX_Size() int { return m.Size() @@ -420,14 +422,14 @@ type OperateTaskResponse struct { Op TaskOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.TaskOp" json:"op,omitempty"` Result bool `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*OperateSubTaskResponse `protobuf:"bytes,4,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*OperateSubTaskResponse `protobuf:"bytes,4,rep,name=workers" json:"workers,omitempty"` } func (m *OperateTaskResponse) Reset() { *m = OperateTaskResponse{} } func (m *OperateTaskResponse) String() string { return proto.CompactTextString(m) } func (*OperateTaskResponse) ProtoMessage() {} func (*OperateTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{7} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{7} } func (m *OperateTaskResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,15 +439,15 @@ func (m *OperateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_OperateTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateTaskResponse.Merge(m, src) +func (dst *OperateTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateTaskResponse.Merge(dst, src) } func (m *OperateTaskResponse) XXX_Size() int { return m.Size() @@ -491,14 +493,14 @@ func (m *OperateTaskResponse) GetWorkers() []*OperateSubTaskResponse { // workers need to do update, empty for all workers in processing the task type UpdateTaskRequest struct { Task string `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} } func (m *UpdateTaskRequest) String() string { return proto.CompactTextString(m) } func (*UpdateTaskRequest) ProtoMessage() {} func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{8} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{8} } func (m *UpdateTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -508,15 +510,15 @@ func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateTaskRequest.Merge(m, src) +func (dst *UpdateTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateTaskRequest.Merge(dst, src) } func (m *UpdateTaskRequest) XXX_Size() int { return m.Size() @@ -544,14 +546,14 @@ func (m *UpdateTaskRequest) GetWorkers() []string { type UpdateTaskResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *UpdateTaskResponse) Reset() { *m = UpdateTaskResponse{} } func (m *UpdateTaskResponse) String() string { return proto.CompactTextString(m) } func (*UpdateTaskResponse) ProtoMessage() {} func (*UpdateTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{9} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{9} } func (m *UpdateTaskResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -561,15 +563,15 @@ func (m *UpdateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_UpdateTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateTaskResponse.Merge(m, src) +func (dst *UpdateTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateTaskResponse.Merge(dst, src) } func (m *UpdateTaskResponse) XXX_Size() int { return m.Size() @@ -603,14 +605,14 @@ func (m *UpdateTaskResponse) GetWorkers() []*CommonWorkerResponse { type QueryStatusListRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *QueryStatusListRequest) Reset() { *m = QueryStatusListRequest{} } func (m *QueryStatusListRequest) String() string { return proto.CompactTextString(m) } func (*QueryStatusListRequest) ProtoMessage() {} func (*QueryStatusListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{10} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{10} } func (m *QueryStatusListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,15 +622,15 @@ func (m *QueryStatusListRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_QueryStatusListRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryStatusListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStatusListRequest.Merge(m, src) +func (dst *QueryStatusListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatusListRequest.Merge(dst, src) } func (m *QueryStatusListRequest) XXX_Size() int { return m.Size() @@ -656,14 +658,14 @@ func (m *QueryStatusListRequest) GetWorkers() []string { type QueryStatusListResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*QueryStatusResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*QueryStatusResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *QueryStatusListResponse) Reset() { *m = QueryStatusListResponse{} } func (m *QueryStatusListResponse) String() string { return proto.CompactTextString(m) } func (*QueryStatusListResponse) ProtoMessage() {} func (*QueryStatusListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{11} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{11} } func (m *QueryStatusListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -673,15 +675,15 @@ func (m *QueryStatusListResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_QueryStatusListResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryStatusListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStatusListResponse.Merge(m, src) +func (dst *QueryStatusListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatusListResponse.Merge(dst, src) } func (m *QueryStatusListResponse) XXX_Size() int { return m.Size() @@ -715,14 +717,14 @@ func (m *QueryStatusListResponse) GetWorkers() []*QueryStatusResponse { type QueryErrorListRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *QueryErrorListRequest) Reset() { *m = QueryErrorListRequest{} } func (m *QueryErrorListRequest) String() string { return proto.CompactTextString(m) } func (*QueryErrorListRequest) ProtoMessage() {} func (*QueryErrorListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{12} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{12} } func (m *QueryErrorListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,15 +734,15 @@ func (m *QueryErrorListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_QueryErrorListRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryErrorListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryErrorListRequest.Merge(m, src) +func (dst *QueryErrorListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryErrorListRequest.Merge(dst, src) } func (m *QueryErrorListRequest) XXX_Size() int { return m.Size() @@ -768,14 +770,14 @@ func (m *QueryErrorListRequest) GetWorkers() []string { type QueryErrorListResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*QueryErrorResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*QueryErrorResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *QueryErrorListResponse) Reset() { *m = QueryErrorListResponse{} } func (m *QueryErrorListResponse) String() string { return proto.CompactTextString(m) } func (*QueryErrorListResponse) ProtoMessage() {} func (*QueryErrorListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{13} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{13} } func (m *QueryErrorListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -785,15 +787,15 @@ func (m *QueryErrorListResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_QueryErrorListResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryErrorListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryErrorListResponse.Merge(m, src) +func (dst *QueryErrorListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryErrorListResponse.Merge(dst, src) } func (m *QueryErrorListResponse) XXX_Size() int { return m.Size() @@ -832,14 +834,14 @@ func (m *QueryErrorListResponse) GetWorkers() []*QueryErrorResponse { // if specify task and workers both, and workers not doing the task , it will return empty DDL locks type ShowDDLLocksRequest struct { Task string `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *ShowDDLLocksRequest) Reset() { *m = ShowDDLLocksRequest{} } func (m *ShowDDLLocksRequest) String() string { return proto.CompactTextString(m) } func (*ShowDDLLocksRequest) ProtoMessage() {} func (*ShowDDLLocksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{14} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{14} } func (m *ShowDDLLocksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -849,15 +851,15 @@ func (m *ShowDDLLocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ShowDDLLocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ShowDDLLocksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShowDDLLocksRequest.Merge(m, src) +func (dst *ShowDDLLocksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShowDDLLocksRequest.Merge(dst, src) } func (m *ShowDDLLocksRequest) XXX_Size() int { return m.Size() @@ -894,16 +896,16 @@ type DDLLock struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Task string `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - DDLs []string `protobuf:"bytes,4,rep,name=DDLs,proto3" json:"DDLs,omitempty"` - Synced []string `protobuf:"bytes,5,rep,name=synced,proto3" json:"synced,omitempty"` - Unsynced []string `protobuf:"bytes,6,rep,name=unsynced,proto3" json:"unsynced,omitempty"` + DDLs []string `protobuf:"bytes,4,rep,name=DDLs" json:"DDLs,omitempty"` + Synced []string `protobuf:"bytes,5,rep,name=synced" json:"synced,omitempty"` + Unsynced []string `protobuf:"bytes,6,rep,name=unsynced" json:"unsynced,omitempty"` } func (m *DDLLock) Reset() { *m = DDLLock{} } func (m *DDLLock) String() string { return proto.CompactTextString(m) } func (*DDLLock) ProtoMessage() {} func (*DDLLock) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{15} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{15} } func (m *DDLLock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -913,15 +915,15 @@ func (m *DDLLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DDLLock.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DDLLock) XXX_Merge(src proto.Message) { - xxx_messageInfo_DDLLock.Merge(m, src) +func (dst *DDLLock) XXX_Merge(src proto.Message) { + xxx_messageInfo_DDLLock.Merge(dst, src) } func (m *DDLLock) XXX_Size() int { return m.Size() @@ -977,14 +979,14 @@ func (m *DDLLock) GetUnsynced() []string { type ShowDDLLocksResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Locks []*DDLLock `protobuf:"bytes,3,rep,name=locks,proto3" json:"locks,omitempty"` + Locks []*DDLLock `protobuf:"bytes,3,rep,name=locks" json:"locks,omitempty"` } func (m *ShowDDLLocksResponse) Reset() { *m = ShowDDLLocksResponse{} } func (m *ShowDDLLocksResponse) String() string { return proto.CompactTextString(m) } func (*ShowDDLLocksResponse) ProtoMessage() {} func (*ShowDDLLocksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{16} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{16} } func (m *ShowDDLLocksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -994,15 +996,15 @@ func (m *ShowDDLLocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ShowDDLLocksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ShowDDLLocksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShowDDLLocksResponse.Merge(m, src) +func (dst *ShowDDLLocksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShowDDLLocksResponse.Merge(dst, src) } func (m *ShowDDLLocksResponse) XXX_Size() int { return m.Size() @@ -1043,7 +1045,7 @@ func (m *ShowDDLLocksResponse) GetLocks() []*DDLLock { type UnlockDDLLockRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ReplaceOwner string `protobuf:"bytes,2,opt,name=replaceOwner,proto3" json:"replaceOwner,omitempty"` - Workers []string `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` ForceRemove bool `protobuf:"varint,4,opt,name=forceRemove,proto3" json:"forceRemove,omitempty"` } @@ -1051,7 +1053,7 @@ func (m *UnlockDDLLockRequest) Reset() { *m = UnlockDDLLockRequest{} } func (m *UnlockDDLLockRequest) String() string { return proto.CompactTextString(m) } func (*UnlockDDLLockRequest) ProtoMessage() {} func (*UnlockDDLLockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{17} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{17} } func (m *UnlockDDLLockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1061,15 +1063,15 @@ func (m *UnlockDDLLockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_UnlockDDLLockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UnlockDDLLockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnlockDDLLockRequest.Merge(m, src) +func (dst *UnlockDDLLockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockDDLLockRequest.Merge(dst, src) } func (m *UnlockDDLLockRequest) XXX_Size() int { return m.Size() @@ -1111,14 +1113,14 @@ func (m *UnlockDDLLockRequest) GetForceRemove() bool { type UnlockDDLLockResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *UnlockDDLLockResponse) Reset() { *m = UnlockDDLLockResponse{} } func (m *UnlockDDLLockResponse) String() string { return proto.CompactTextString(m) } func (*UnlockDDLLockResponse) ProtoMessage() {} func (*UnlockDDLLockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{18} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{18} } func (m *UnlockDDLLockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1128,15 +1130,15 @@ func (m *UnlockDDLLockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_UnlockDDLLockResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UnlockDDLLockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnlockDDLLockResponse.Merge(m, src) +func (dst *UnlockDDLLockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockDDLLockResponse.Merge(dst, src) } func (m *UnlockDDLLockResponse) XXX_Size() int { return m.Size() @@ -1176,7 +1178,7 @@ func (m *UnlockDDLLockResponse) GetWorkers() []*CommonWorkerResponse { // skipDDL: skip DDL which is blocking // execDDL and skipDDL can not specify both at the same time, but can specify neither type BreakWorkerDDLLockRequest struct { - Workers []string `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,1,rep,name=workers" json:"workers,omitempty"` Task string `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` RemoveLockID string `protobuf:"bytes,3,opt,name=removeLockID,proto3" json:"removeLockID,omitempty"` ExecDDL bool `protobuf:"varint,4,opt,name=execDDL,proto3" json:"execDDL,omitempty"` @@ -1187,7 +1189,7 @@ func (m *BreakWorkerDDLLockRequest) Reset() { *m = BreakWorkerDDLLockReq func (m *BreakWorkerDDLLockRequest) String() string { return proto.CompactTextString(m) } func (*BreakWorkerDDLLockRequest) ProtoMessage() {} func (*BreakWorkerDDLLockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{19} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{19} } func (m *BreakWorkerDDLLockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1197,15 +1199,15 @@ func (m *BreakWorkerDDLLockRequest) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_BreakWorkerDDLLockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BreakWorkerDDLLockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BreakWorkerDDLLockRequest.Merge(m, src) +func (dst *BreakWorkerDDLLockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BreakWorkerDDLLockRequest.Merge(dst, src) } func (m *BreakWorkerDDLLockRequest) XXX_Size() int { return m.Size() @@ -1254,14 +1256,14 @@ func (m *BreakWorkerDDLLockRequest) GetSkipDDL() bool { type BreakWorkerDDLLockResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *BreakWorkerDDLLockResponse) Reset() { *m = BreakWorkerDDLLockResponse{} } func (m *BreakWorkerDDLLockResponse) String() string { return proto.CompactTextString(m) } func (*BreakWorkerDDLLockResponse) ProtoMessage() {} func (*BreakWorkerDDLLockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{20} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{20} } func (m *BreakWorkerDDLLockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1271,15 +1273,15 @@ func (m *BreakWorkerDDLLockResponse) XXX_Marshal(b []byte, deterministic bool) ( return xxx_messageInfo_BreakWorkerDDLLockResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BreakWorkerDDLLockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BreakWorkerDDLLockResponse.Merge(m, src) +func (dst *BreakWorkerDDLLockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BreakWorkerDDLLockResponse.Merge(dst, src) } func (m *BreakWorkerDDLLockResponse) XXX_Size() int { return m.Size() @@ -1314,14 +1316,14 @@ func (m *BreakWorkerDDLLockResponse) GetWorkers() []*CommonWorkerResponse { // SwitchWorkerRelayMasterRequest represents a request for some dm-workers to switch relay unit's master server // workers: relay unit in these dm-workers need to switch master server type SwitchWorkerRelayMasterRequest struct { - Workers []string `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,1,rep,name=workers" json:"workers,omitempty"` } func (m *SwitchWorkerRelayMasterRequest) Reset() { *m = SwitchWorkerRelayMasterRequest{} } func (m *SwitchWorkerRelayMasterRequest) String() string { return proto.CompactTextString(m) } func (*SwitchWorkerRelayMasterRequest) ProtoMessage() {} func (*SwitchWorkerRelayMasterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{21} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{21} } func (m *SwitchWorkerRelayMasterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1331,15 +1333,15 @@ func (m *SwitchWorkerRelayMasterRequest) XXX_Marshal(b []byte, deterministic boo return xxx_messageInfo_SwitchWorkerRelayMasterRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SwitchWorkerRelayMasterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwitchWorkerRelayMasterRequest.Merge(m, src) +func (dst *SwitchWorkerRelayMasterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwitchWorkerRelayMasterRequest.Merge(dst, src) } func (m *SwitchWorkerRelayMasterRequest) XXX_Size() int { return m.Size() @@ -1360,14 +1362,14 @@ func (m *SwitchWorkerRelayMasterRequest) GetWorkers() []string { type SwitchWorkerRelayMasterResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *SwitchWorkerRelayMasterResponse) Reset() { *m = SwitchWorkerRelayMasterResponse{} } func (m *SwitchWorkerRelayMasterResponse) String() string { return proto.CompactTextString(m) } func (*SwitchWorkerRelayMasterResponse) ProtoMessage() {} func (*SwitchWorkerRelayMasterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{22} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{22} } func (m *SwitchWorkerRelayMasterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1377,15 +1379,15 @@ func (m *SwitchWorkerRelayMasterResponse) XXX_Marshal(b []byte, deterministic bo return xxx_messageInfo_SwitchWorkerRelayMasterResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SwitchWorkerRelayMasterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwitchWorkerRelayMasterResponse.Merge(m, src) +func (dst *SwitchWorkerRelayMasterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwitchWorkerRelayMasterResponse.Merge(dst, src) } func (m *SwitchWorkerRelayMasterResponse) XXX_Size() int { return m.Size() @@ -1420,14 +1422,14 @@ func (m *SwitchWorkerRelayMasterResponse) GetWorkers() []*CommonWorkerResponse { // OperateWorkerRelayRequest represents a request for some dm-workers to operate relay unit type OperateWorkerRelayRequest struct { Op RelayOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.RelayOp" json:"op,omitempty"` - Workers []string `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *OperateWorkerRelayRequest) Reset() { *m = OperateWorkerRelayRequest{} } func (m *OperateWorkerRelayRequest) String() string { return proto.CompactTextString(m) } func (*OperateWorkerRelayRequest) ProtoMessage() {} func (*OperateWorkerRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{23} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{23} } func (m *OperateWorkerRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1437,15 +1439,15 @@ func (m *OperateWorkerRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_OperateWorkerRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateWorkerRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateWorkerRelayRequest.Merge(m, src) +func (dst *OperateWorkerRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateWorkerRelayRequest.Merge(dst, src) } func (m *OperateWorkerRelayRequest) XXX_Size() int { return m.Size() @@ -1474,14 +1476,14 @@ type OperateWorkerRelayResponse struct { Op RelayOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.RelayOp" json:"op,omitempty"` Result bool `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*OperateRelayResponse `protobuf:"bytes,4,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*OperateRelayResponse `protobuf:"bytes,4,rep,name=workers" json:"workers,omitempty"` } func (m *OperateWorkerRelayResponse) Reset() { *m = OperateWorkerRelayResponse{} } func (m *OperateWorkerRelayResponse) String() string { return proto.CompactTextString(m) } func (*OperateWorkerRelayResponse) ProtoMessage() {} func (*OperateWorkerRelayResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{24} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{24} } func (m *OperateWorkerRelayResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1491,15 +1493,15 @@ func (m *OperateWorkerRelayResponse) XXX_Marshal(b []byte, deterministic bool) ( return xxx_messageInfo_OperateWorkerRelayResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateWorkerRelayResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateWorkerRelayResponse.Merge(m, src) +func (dst *OperateWorkerRelayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateWorkerRelayResponse.Merge(dst, src) } func (m *OperateWorkerRelayResponse) XXX_Size() int { return m.Size() @@ -1545,7 +1547,7 @@ func (m *RefreshWorkerTasksRequest) Reset() { *m = RefreshWorkerTasksReq func (m *RefreshWorkerTasksRequest) String() string { return proto.CompactTextString(m) } func (*RefreshWorkerTasksRequest) ProtoMessage() {} func (*RefreshWorkerTasksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{25} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{25} } func (m *RefreshWorkerTasksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1555,15 +1557,15 @@ func (m *RefreshWorkerTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_RefreshWorkerTasksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RefreshWorkerTasksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RefreshWorkerTasksRequest.Merge(m, src) +func (dst *RefreshWorkerTasksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshWorkerTasksRequest.Merge(dst, src) } func (m *RefreshWorkerTasksRequest) XXX_Size() int { return m.Size() @@ -1583,7 +1585,7 @@ func (m *RefreshWorkerTasksMsg) Reset() { *m = RefreshWorkerTasksMsg{} } func (m *RefreshWorkerTasksMsg) String() string { return proto.CompactTextString(m) } func (*RefreshWorkerTasksMsg) ProtoMessage() {} func (*RefreshWorkerTasksMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{26} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{26} } func (m *RefreshWorkerTasksMsg) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1593,15 +1595,15 @@ func (m *RefreshWorkerTasksMsg) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_RefreshWorkerTasksMsg.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RefreshWorkerTasksMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_RefreshWorkerTasksMsg.Merge(m, src) +func (dst *RefreshWorkerTasksMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshWorkerTasksMsg.Merge(dst, src) } func (m *RefreshWorkerTasksMsg) XXX_Size() int { return m.Size() @@ -1628,14 +1630,14 @@ func (m *RefreshWorkerTasksMsg) GetMsg() string { type RefreshWorkerTasksResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` - Workers []*RefreshWorkerTasksMsg `protobuf:"bytes,2,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*RefreshWorkerTasksMsg `protobuf:"bytes,2,rep,name=workers" json:"workers,omitempty"` } func (m *RefreshWorkerTasksResponse) Reset() { *m = RefreshWorkerTasksResponse{} } func (m *RefreshWorkerTasksResponse) String() string { return proto.CompactTextString(m) } func (*RefreshWorkerTasksResponse) ProtoMessage() {} func (*RefreshWorkerTasksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{27} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{27} } func (m *RefreshWorkerTasksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1645,15 +1647,15 @@ func (m *RefreshWorkerTasksResponse) XXX_Marshal(b []byte, deterministic bool) ( return xxx_messageInfo_RefreshWorkerTasksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RefreshWorkerTasksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RefreshWorkerTasksResponse.Merge(m, src) +func (dst *RefreshWorkerTasksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshWorkerTasksResponse.Merge(dst, src) } func (m *RefreshWorkerTasksResponse) XXX_Size() int { return m.Size() @@ -1681,7 +1683,7 @@ func (m *RefreshWorkerTasksResponse) GetWorkers() []*RefreshWorkerTasksMsg { type HandleSQLsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Op SQLOp `protobuf:"varint,2,opt,name=op,proto3,enum=pb.SQLOp" json:"op,omitempty"` - Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + Args []string `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"` BinlogPos string `protobuf:"bytes,4,opt,name=binlogPos,proto3" json:"binlogPos,omitempty"` Worker string `protobuf:"bytes,5,opt,name=worker,proto3" json:"worker,omitempty"` SqlPattern string `protobuf:"bytes,6,opt,name=sqlPattern,proto3" json:"sqlPattern,omitempty"` @@ -1692,7 +1694,7 @@ func (m *HandleSQLsRequest) Reset() { *m = HandleSQLsRequest{} } func (m *HandleSQLsRequest) String() string { return proto.CompactTextString(m) } func (*HandleSQLsRequest) ProtoMessage() {} func (*HandleSQLsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{28} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{28} } func (m *HandleSQLsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1702,15 +1704,15 @@ func (m *HandleSQLsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_HandleSQLsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *HandleSQLsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleSQLsRequest.Merge(m, src) +func (dst *HandleSQLsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HandleSQLsRequest.Merge(dst, src) } func (m *HandleSQLsRequest) XXX_Size() int { return m.Size() @@ -1773,14 +1775,14 @@ func (m *HandleSQLsRequest) GetSharding() bool { type HandleSQLsResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *HandleSQLsResponse) Reset() { *m = HandleSQLsResponse{} } func (m *HandleSQLsResponse) String() string { return proto.CompactTextString(m) } func (*HandleSQLsResponse) ProtoMessage() {} func (*HandleSQLsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{29} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{29} } func (m *HandleSQLsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1790,15 +1792,15 @@ func (m *HandleSQLsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_HandleSQLsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *HandleSQLsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleSQLsResponse.Merge(m, src) +func (dst *HandleSQLsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HandleSQLsResponse.Merge(dst, src) } func (m *HandleSQLsResponse) XXX_Size() int { return m.Size() @@ -1837,7 +1839,7 @@ func (m *HandleSQLsResponse) GetWorkers() []*CommonWorkerResponse { // filename: whether purge relay log files before this filename // subDir: specify relay sub directory for @filename type PurgeWorkerRelayRequest struct { - Workers []string `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []string `protobuf:"bytes,1,rep,name=workers" json:"workers,omitempty"` Inactive bool `protobuf:"varint,2,opt,name=inactive,proto3" json:"inactive,omitempty"` Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` Filename string `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"` @@ -1848,7 +1850,7 @@ func (m *PurgeWorkerRelayRequest) Reset() { *m = PurgeWorkerRelayRequest func (m *PurgeWorkerRelayRequest) String() string { return proto.CompactTextString(m) } func (*PurgeWorkerRelayRequest) ProtoMessage() {} func (*PurgeWorkerRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{30} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{30} } func (m *PurgeWorkerRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1858,15 +1860,15 @@ func (m *PurgeWorkerRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_PurgeWorkerRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *PurgeWorkerRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PurgeWorkerRelayRequest.Merge(m, src) +func (dst *PurgeWorkerRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PurgeWorkerRelayRequest.Merge(dst, src) } func (m *PurgeWorkerRelayRequest) XXX_Size() int { return m.Size() @@ -1915,14 +1917,14 @@ func (m *PurgeWorkerRelayRequest) GetSubDir() string { type PurgeWorkerRelayResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers,proto3" json:"workers,omitempty"` + Workers []*CommonWorkerResponse `protobuf:"bytes,3,rep,name=workers" json:"workers,omitempty"` } func (m *PurgeWorkerRelayResponse) Reset() { *m = PurgeWorkerRelayResponse{} } func (m *PurgeWorkerRelayResponse) String() string { return proto.CompactTextString(m) } func (*PurgeWorkerRelayResponse) ProtoMessage() {} func (*PurgeWorkerRelayResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{31} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{31} } func (m *PurgeWorkerRelayResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1932,15 +1934,15 @@ func (m *PurgeWorkerRelayResponse) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_PurgeWorkerRelayResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *PurgeWorkerRelayResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PurgeWorkerRelayResponse.Merge(m, src) +func (dst *PurgeWorkerRelayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PurgeWorkerRelayResponse.Merge(dst, src) } func (m *PurgeWorkerRelayResponse) XXX_Size() int { return m.Size() @@ -1980,7 +1982,7 @@ func (m *CheckTaskRequest) Reset() { *m = CheckTaskRequest{} } func (m *CheckTaskRequest) String() string { return proto.CompactTextString(m) } func (*CheckTaskRequest) ProtoMessage() {} func (*CheckTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{32} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{32} } func (m *CheckTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1990,15 +1992,15 @@ func (m *CheckTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_CheckTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CheckTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckTaskRequest.Merge(m, src) +func (dst *CheckTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CheckTaskRequest.Merge(dst, src) } func (m *CheckTaskRequest) XXX_Size() int { return m.Size() @@ -2025,7 +2027,7 @@ func (m *CheckTaskResponse) Reset() { *m = CheckTaskResponse{} } func (m *CheckTaskResponse) String() string { return proto.CompactTextString(m) } func (*CheckTaskResponse) ProtoMessage() {} func (*CheckTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{33} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{33} } func (m *CheckTaskResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2035,15 +2037,15 @@ func (m *CheckTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CheckTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CheckTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckTaskResponse.Merge(m, src) +func (dst *CheckTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CheckTaskResponse.Merge(dst, src) } func (m *CheckTaskResponse) XXX_Size() int { return m.Size() @@ -2077,7 +2079,7 @@ func (m *RegisterWorkerRequest) Reset() { *m = RegisterWorkerRequest{} } func (m *RegisterWorkerRequest) String() string { return proto.CompactTextString(m) } func (*RegisterWorkerRequest) ProtoMessage() {} func (*RegisterWorkerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{34} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{34} } func (m *RegisterWorkerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2087,15 +2089,15 @@ func (m *RegisterWorkerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_RegisterWorkerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RegisterWorkerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisterWorkerRequest.Merge(m, src) +func (dst *RegisterWorkerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisterWorkerRequest.Merge(dst, src) } func (m *RegisterWorkerRequest) XXX_Size() int { return m.Size() @@ -2129,7 +2131,7 @@ func (m *RegisterWorkerResponse) Reset() { *m = RegisterWorkerResponse{} func (m *RegisterWorkerResponse) String() string { return proto.CompactTextString(m) } func (*RegisterWorkerResponse) ProtoMessage() {} func (*RegisterWorkerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f9bef11f2a341f03, []int{35} + return fileDescriptor_dmmaster_632e41001d9f6d87, []int{35} } func (m *RegisterWorkerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2139,15 +2141,15 @@ func (m *RegisterWorkerResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_RegisterWorkerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RegisterWorkerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisterWorkerResponse.Merge(m, src) +func (dst *RegisterWorkerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisterWorkerResponse.Merge(dst, src) } func (m *RegisterWorkerResponse) XXX_Size() int { return m.Size() @@ -2211,101 +2213,6 @@ func init() { proto.RegisterType((*RegisterWorkerResponse)(nil), "pb.RegisterWorkerResponse") } -func init() { proto.RegisterFile("dmmaster.proto", fileDescriptor_f9bef11f2a341f03) } - -var fileDescriptor_f9bef11f2a341f03 = []byte{ - // 1411 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0xdb, 0x46, - 0x13, 0x16, 0x25, 0x5b, 0x89, 0x46, 0x89, 0x61, 0x6f, 0x6c, 0x89, 0xa2, 0x1d, 0xc6, 0x2f, 0xdf, - 0x22, 0x30, 0x7a, 0x88, 0x1b, 0xa5, 0xa7, 0x00, 0x01, 0x1a, 0x5b, 0x09, 0x6a, 0x40, 0xa9, 0x1d, - 0xaa, 0x41, 0x91, 0x4b, 0x01, 0x4a, 0x5a, 0xcb, 0x84, 0x24, 0x92, 0xe6, 0x52, 0x76, 0xdc, 0xa2, - 0x28, 0xd0, 0x43, 0x2f, 0xbd, 0xb4, 0xe8, 0x21, 0xe7, 0xfe, 0x9b, 0x1c, 0x03, 0x14, 0x05, 0x7a, - 0x2c, 0x92, 0xfe, 0x90, 0x62, 0x3f, 0x48, 0x2e, 0xbf, 0x94, 0xd8, 0x07, 0xdd, 0xb8, 0x3b, 0xe4, - 0x33, 0xcf, 0xcc, 0x0e, 0x67, 0x1e, 0x12, 0x56, 0x86, 0xd3, 0xa9, 0x45, 0x02, 0xec, 0xdf, 0xf3, - 0x7c, 0x37, 0x70, 0x51, 0xd9, 0xeb, 0x6b, 0x2b, 0xc3, 0xe9, 0xb9, 0xeb, 0x8f, 0xc3, 0x3d, 0x6d, - 0x6b, 0xe4, 0xba, 0xa3, 0x09, 0xde, 0xb5, 0x3c, 0x7b, 0xd7, 0x72, 0x1c, 0x37, 0xb0, 0x02, 0xdb, - 0x75, 0x08, 0xb7, 0x1a, 0xa7, 0xd0, 0x7a, 0x66, 0x8f, 0x7c, 0x2b, 0xc0, 0xdf, 0xb0, 0x87, 0x4c, - 0x3c, 0xb1, 0x2e, 0x4c, 0x7c, 0x3a, 0xc3, 0x24, 0x40, 0x3a, 0xc0, 0x9e, 0xed, 0x4c, 0xdc, 0xd1, - 0x57, 0xd6, 0x14, 0xab, 0xca, 0xb6, 0xb2, 0x53, 0x33, 0xa5, 0x1d, 0xb4, 0x05, 0x35, 0xbe, 0x3a, - 0x72, 0x89, 0x5a, 0xde, 0x56, 0x76, 0x6e, 0x9a, 0xf1, 0x06, 0x6a, 0x40, 0x95, 0x13, 0x51, 0x2b, - 0xec, 0x49, 0xb1, 0x32, 0x8e, 0x40, 0x7f, 0xe1, 0x0d, 0x93, 0x1e, 0xf7, 0x5d, 0xe7, 0xd8, 0x1e, - 0x85, 0x7e, 0x1b, 0x50, 0x1d, 0xb0, 0x0d, 0xe1, 0x53, 0xac, 0x24, 0xc4, 0x72, 0x02, 0xf1, 0x0b, - 0x58, 0xed, 0x05, 0x96, 0x1f, 0x7c, 0x6d, 0x91, 0x71, 0x88, 0x81, 0x60, 0x29, 0xb0, 0xc8, 0x58, - 0x20, 0xb0, 0x6b, 0xa4, 0xc2, 0x35, 0xfe, 0x04, 0x65, 0x5b, 0xd9, 0xa9, 0x99, 0xe1, 0xd2, 0x38, - 0x85, 0x35, 0x09, 0x81, 0x78, 0xae, 0x43, 0x30, 0x75, 0xe7, 0x63, 0x32, 0x9b, 0x04, 0x0c, 0xe4, - 0xba, 0x29, 0x56, 0x68, 0x15, 0x2a, 0x53, 0x32, 0x12, 0x1c, 0xe8, 0x25, 0x6a, 0xc7, 0xc0, 0x95, - 0xed, 0xca, 0x4e, 0xbd, 0xad, 0xde, 0xf3, 0xfa, 0xf7, 0xf6, 0xdd, 0xe9, 0xd4, 0x75, 0xc2, 0x28, - 0x39, 0x68, 0xec, 0xf2, 0x01, 0xb4, 0x78, 0x1a, 0x9e, 0xb1, 0x13, 0xfc, 0xa8, 0x0c, 0x18, 0x17, - 0xa0, 0xe5, 0x3d, 0x74, 0x69, 0xc2, 0xf7, 0xd3, 0x84, 0x9b, 0x94, 0xf0, 0xf3, 0x19, 0xf6, 0x2f, - 0x7a, 0x81, 0x15, 0xcc, 0x48, 0x96, 0xef, 0xb7, 0x80, 0x0e, 0x3d, 0x4c, 0x2b, 0x45, 0x4e, 0xb3, - 0x06, 0x65, 0xd7, 0x63, 0xee, 0x56, 0xda, 0x40, 0x31, 0xa8, 0xf1, 0xd0, 0x33, 0xcb, 0xae, 0x47, - 0x8f, 0xc0, 0xa1, 0x85, 0xc3, 0xfd, 0xb2, 0x6b, 0xf9, 0x08, 0x2a, 0xc9, 0x23, 0xf8, 0x4d, 0x81, - 0x5b, 0x09, 0x07, 0x22, 0xa8, 0x79, 0x1e, 0xe2, 0x80, 0xcb, 0x79, 0x01, 0x57, 0xe2, 0x80, 0x3f, - 0x8f, 0xfd, 0x2e, 0xb1, 0x80, 0x35, 0x0a, 0x25, 0xfc, 0xf5, 0x66, 0x7d, 0xd9, 0x65, 0xcc, 0xe9, - 0x31, 0xac, 0xf1, 0x74, 0x5f, 0xbd, 0xb2, 0x7c, 0x40, 0x32, 0xc4, 0x42, 0x4a, 0xeb, 0x29, 0x34, - 0xa4, 0xa3, 0xec, 0xda, 0x24, 0x90, 0xb8, 0x3b, 0xf1, 0xbb, 0x9c, 0x39, 0x92, 0x14, 0xf7, 0x33, - 0x68, 0x66, 0x70, 0x16, 0x51, 0x6a, 0x4f, 0x60, 0x83, 0xd9, 0x9f, 0xf8, 0xbe, 0xeb, 0x5f, 0x9d, - 0x7e, 0x20, 0xd2, 0x20, 0xc1, 0x5c, 0x9a, 0xfd, 0x67, 0x69, 0xf6, 0x8d, 0x88, 0x3d, 0x83, 0xcd, - 0x92, 0xdf, 0x87, 0x5b, 0xbd, 0x13, 0xf7, 0xbc, 0xd3, 0xe9, 0x76, 0xdd, 0xc1, 0x98, 0x5c, 0xad, - 0x6a, 0x7e, 0x51, 0xe0, 0x9a, 0x40, 0x40, 0x2b, 0x50, 0x3e, 0xe8, 0x88, 0xe7, 0xca, 0x07, 0x9d, - 0x08, 0xa9, 0x2c, 0x21, 0xad, 0xc3, 0xb2, 0x7b, 0xee, 0x44, 0xad, 0x96, 0x2f, 0xe8, 0x9d, 0x9d, - 0x4e, 0x97, 0x57, 0x7c, 0xcd, 0x64, 0xd7, 0x34, 0x74, 0x72, 0xe1, 0x0c, 0xf0, 0x50, 0x5d, 0x66, - 0xbb, 0x62, 0x85, 0x34, 0xb8, 0x3e, 0x73, 0x84, 0xa5, 0xca, 0x2c, 0xd1, 0xda, 0x18, 0xc0, 0x7a, - 0x32, 0xa4, 0x4b, 0xa7, 0xf1, 0x7f, 0xb0, 0x3c, 0xa1, 0x8f, 0x8a, 0x24, 0xd6, 0x69, 0x12, 0x05, - 0x9c, 0xc9, 0x2d, 0xc6, 0xcf, 0x0a, 0xac, 0xbf, 0x70, 0xe8, 0x75, 0x68, 0x10, 0x99, 0x4b, 0xc7, - 0x6f, 0xc0, 0x0d, 0x1f, 0x7b, 0x13, 0x6b, 0x80, 0x0f, 0x59, 0xc8, 0xdc, 0x4d, 0x62, 0xaf, 0xb8, - 0xcd, 0xa0, 0x6d, 0xa8, 0x1f, 0xbb, 0xfe, 0x00, 0x9b, 0x78, 0xea, 0x9e, 0x61, 0x75, 0x89, 0x11, - 0x97, 0xb7, 0x8c, 0x19, 0x6c, 0xa4, 0x78, 0x2c, 0xe4, 0xa5, 0xfd, 0x43, 0x81, 0xd6, 0x9e, 0x8f, - 0xad, 0x31, 0xbf, 0x21, 0x95, 0x04, 0x29, 0x20, 0x25, 0x19, 0x50, 0x5e, 0x39, 0xb0, 0x14, 0xd1, - 0x60, 0x28, 0xc4, 0x41, 0x47, 0x54, 0x45, 0x62, 0x8f, 0x22, 0xe2, 0x57, 0x78, 0xd0, 0xe9, 0x74, - 0x45, 0x12, 0xc2, 0x25, 0xb5, 0x90, 0xb1, 0xed, 0x51, 0xcb, 0x32, 0xb7, 0x88, 0xa5, 0xf1, 0x1d, - 0x68, 0x79, 0x14, 0x17, 0x92, 0x9f, 0x87, 0xa0, 0xf7, 0xce, 0xed, 0x60, 0x70, 0x22, 0xc9, 0x06, - 0x3e, 0x05, 0x3f, 0x98, 0x23, 0xe3, 0x47, 0xb8, 0x53, 0xf8, 0xec, 0x42, 0xc8, 0x9b, 0xd0, 0x12, - 0xb3, 0x26, 0x47, 0x66, 0x6d, 0x4a, 0x13, 0x8e, 0xbd, 0x19, 0xcc, 0x2a, 0x46, 0x5c, 0x71, 0x8f, - 0x78, 0xad, 0x80, 0x96, 0x07, 0x2a, 0x02, 0x9a, 0x8b, 0xfa, 0xf1, 0x83, 0xb3, 0x9d, 0x1e, 0x9c, - 0xaa, 0x34, 0x38, 0x13, 0x1e, 0x63, 0x66, 0x9b, 0xd0, 0x32, 0xf1, 0xb1, 0x8f, 0x89, 0xc8, 0x37, - 0x1d, 0x7d, 0x61, 0x23, 0x34, 0x1e, 0xc3, 0x46, 0xd6, 0xf8, 0x8c, 0xc8, 0xea, 0x4e, 0x91, 0xd5, - 0x5d, 0xf6, 0x04, 0x0c, 0x1b, 0xb4, 0x3c, 0xfc, 0x0f, 0x9c, 0xe4, 0x83, 0x64, 0x26, 0xeb, 0xed, - 0x16, 0xcf, 0x4a, 0x0e, 0x97, 0x38, 0x94, 0x37, 0x0a, 0xac, 0x7d, 0x69, 0x39, 0xc3, 0x09, 0xee, - 0x3d, 0xef, 0x92, 0x79, 0x73, 0xa8, 0xc5, 0xf2, 0x5d, 0x66, 0xf9, 0xae, 0x51, 0xe4, 0xde, 0xf3, - 0x6e, 0x2c, 0x84, 0x2c, 0x7f, 0x14, 0xb6, 0x22, 0x76, 0x4d, 0xb5, 0x73, 0x3f, 0xd2, 0xce, 0x4b, - 0x0c, 0x27, 0xde, 0x90, 0x72, 0xb1, 0x9c, 0xc8, 0x85, 0x0e, 0x40, 0x4e, 0x27, 0x47, 0x56, 0x10, - 0x60, 0xdf, 0x51, 0xab, 0x5c, 0x91, 0xc7, 0x3b, 0xb4, 0x8b, 0x93, 0x13, 0xcb, 0x1f, 0xda, 0xce, - 0x48, 0xbd, 0xc6, 0xa2, 0x8f, 0xd6, 0x54, 0x89, 0xc8, 0x91, 0x2c, 0xa4, 0xee, 0x5f, 0x2b, 0xd0, - 0x3c, 0x9a, 0xf9, 0xa3, 0xbc, 0xb2, 0x2f, 0x6e, 0x69, 0x1a, 0x5c, 0xb7, 0x1d, 0x6b, 0x10, 0xd8, - 0x67, 0x58, 0xd4, 0x67, 0xb4, 0x66, 0xed, 0xce, 0x9e, 0x62, 0x56, 0xa2, 0x15, 0x93, 0x5d, 0xd3, - 0xfb, 0x8f, 0xed, 0x09, 0x66, 0x47, 0xc2, 0x53, 0x19, 0xad, 0xd9, 0xbc, 0x9b, 0xf5, 0x3b, 0x76, - 0x94, 0x49, 0xbe, 0x32, 0x5e, 0x81, 0x9a, 0x25, 0xb6, 0x90, 0x9c, 0xdc, 0x85, 0xd5, 0xfd, 0x13, - 0x3c, 0x18, 0x7f, 0x40, 0x53, 0x1a, 0x8f, 0x60, 0x4d, 0xba, 0xef, 0xb2, 0xd4, 0xa8, 0x88, 0x32, - 0xf1, 0xc8, 0xa6, 0x4d, 0x2e, 0x64, 0x32, 0x57, 0x44, 0x59, 0xc3, 0xa1, 0x8f, 0x09, 0x11, 0x10, - 0xe1, 0xd2, 0xd8, 0x83, 0x46, 0x1a, 0xe6, 0xb2, 0x54, 0xda, 0x7f, 0xd5, 0xa1, 0xca, 0xdb, 0x2d, - 0x7a, 0x09, 0xb5, 0xe8, 0x43, 0x0b, 0xad, 0xb3, 0xd7, 0x24, 0xf5, 0xe5, 0xa6, 0x6d, 0xa4, 0x76, - 0xb9, 0x3b, 0xe3, 0xce, 0x4f, 0x7f, 0xfe, 0xfb, 0x7b, 0xb9, 0x65, 0xac, 0xd3, 0x2f, 0x59, 0xb2, - 0x7b, 0x76, 0xdf, 0x9a, 0x78, 0x27, 0xd6, 0xfd, 0x5d, 0x9a, 0x2b, 0xf2, 0x50, 0xf9, 0x14, 0x1d, - 0x43, 0x5d, 0xfa, 0x7e, 0x40, 0x0d, 0xa9, 0x4f, 0xc9, 0xf0, 0xcd, 0xcc, 0xbe, 0x70, 0x70, 0x97, - 0x39, 0xd8, 0xd6, 0x36, 0xf3, 0x1c, 0xec, 0x7e, 0x4f, 0xf3, 0xf4, 0x03, 0xf5, 0xf3, 0x08, 0x20, - 0x56, 0xf4, 0x88, 0xb1, 0xcd, 0x7c, 0x24, 0x68, 0x8d, 0xf4, 0xb6, 0x70, 0x52, 0x42, 0x13, 0xa8, - 0x4b, 0xe2, 0x17, 0x69, 0x29, 0x35, 0x2c, 0xc9, 0x5d, 0x6d, 0x33, 0xd7, 0x26, 0x90, 0x3e, 0x61, - 0x74, 0x75, 0xb4, 0x95, 0xa2, 0x4b, 0xd8, 0xad, 0x82, 0x2f, 0x7a, 0x02, 0x10, 0x8b, 0x55, 0xd4, - 0x4a, 0x8a, 0x57, 0xd9, 0x97, 0x96, 0x67, 0x8a, 0x48, 0xef, 0xc3, 0x0d, 0x59, 0x01, 0x22, 0x96, - 0xc4, 0x1c, 0x99, 0xab, 0xa9, 0x59, 0x43, 0x04, 0xf2, 0x14, 0x6e, 0x26, 0x84, 0x15, 0x62, 0x37, - 0xe7, 0x69, 0x3e, 0xad, 0x95, 0x63, 0x89, 0x70, 0x5e, 0x84, 0x9f, 0x54, 0xf2, 0x47, 0x30, 0xba, - 0x1d, 0x67, 0x3c, 0xe7, 0x8b, 0x5a, 0xd3, 0x8b, 0xcc, 0x11, 0xec, 0x4b, 0x68, 0x16, 0xfc, 0x97, - 0x40, 0x46, 0xfc, 0x70, 0xd1, 0x4f, 0x0b, 0xad, 0xf0, 0xcd, 0xe7, 0x8c, 0xb3, 0xba, 0x89, 0x33, - 0x2e, 0x94, 0x7c, 0x9c, 0x71, 0xb1, 0xdc, 0x32, 0x4a, 0xb4, 0x12, 0xe3, 0x8e, 0xce, 0x2b, 0x31, - 0x33, 0xab, 0x78, 0x25, 0x66, 0x1b, 0xbf, 0x51, 0x42, 0x43, 0x68, 0x16, 0xa8, 0x22, 0x1e, 0xf0, - 0x7c, 0xb9, 0xa5, 0xfd, 0x7f, 0xee, 0x3d, 0x52, 0x5a, 0x1b, 0x59, 0x95, 0xc2, 0x5e, 0x9d, 0xdb, - 0xd2, 0x9b, 0x98, 0x9d, 0x0f, 0x3c, 0xfe, 0x62, 0x81, 0x63, 0x94, 0xd0, 0x21, 0xac, 0xa6, 0x7b, - 0x38, 0x62, 0xef, 0x4c, 0xc1, 0xc8, 0xd1, 0xb6, 0xf2, 0x8d, 0xf2, 0x39, 0x65, 0xf5, 0x00, 0xe7, - 0x59, 0x28, 0x68, 0x38, 0xcf, 0x62, 0x3d, 0xc2, 0x78, 0xa2, 0xec, 0x4f, 0x36, 0x0e, 0x5b, 0xf8, - 0xf3, 0x6d, 0x6e, 0x3d, 0x3d, 0x84, 0x5a, 0x34, 0x1a, 0x78, 0x17, 0x4d, 0x4f, 0x14, 0xde, 0x45, - 0x33, 0xf3, 0xc3, 0x28, 0xa1, 0x03, 0x58, 0x49, 0x36, 0x74, 0x24, 0x74, 0x50, 0xce, 0xac, 0xe0, - 0x5d, 0x21, 0xbf, 0xff, 0x1b, 0xa5, 0x3d, 0xf5, 0xcd, 0x3b, 0x5d, 0x79, 0xfb, 0x4e, 0x57, 0xfe, - 0x79, 0xa7, 0x2b, 0xbf, 0xbe, 0xd7, 0x4b, 0x6f, 0xdf, 0xeb, 0xa5, 0xbf, 0xdf, 0xeb, 0xa5, 0x7e, - 0x95, 0xfd, 0x5d, 0x7c, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x33, 0x19, 0x56, 0x3e, 0xa1, - 0x14, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -2554,65 +2461,6 @@ type MasterServer interface { RegisterWorker(context.Context, *RegisterWorkerRequest) (*RegisterWorkerResponse, error) } -// UnimplementedMasterServer can be embedded to have forward compatible implementations. -type UnimplementedMasterServer struct { -} - -func (*UnimplementedMasterServer) StartTask(ctx context.Context, req *StartTaskRequest) (*StartTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartTask not implemented") -} -func (*UnimplementedMasterServer) OperateTask(ctx context.Context, req *OperateTaskRequest) (*OperateTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method OperateTask not implemented") -} -func (*UnimplementedMasterServer) UpdateTask(ctx context.Context, req *UpdateTaskRequest) (*UpdateTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTask not implemented") -} -func (*UnimplementedMasterServer) QueryStatus(ctx context.Context, req *QueryStatusListRequest) (*QueryStatusListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryStatus not implemented") -} -func (*UnimplementedMasterServer) QueryError(ctx context.Context, req *QueryErrorListRequest) (*QueryErrorListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryError not implemented") -} -func (*UnimplementedMasterServer) ShowDDLLocks(ctx context.Context, req *ShowDDLLocksRequest) (*ShowDDLLocksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ShowDDLLocks not implemented") -} -func (*UnimplementedMasterServer) UnlockDDLLock(ctx context.Context, req *UnlockDDLLockRequest) (*UnlockDDLLockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnlockDDLLock not implemented") -} -func (*UnimplementedMasterServer) UpdateMasterConfig(ctx context.Context, req *UpdateMasterConfigRequest) (*UpdateMasterConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateMasterConfig not implemented") -} -func (*UnimplementedMasterServer) UpdateWorkerRelayConfig(ctx context.Context, req *UpdateWorkerRelayConfigRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkerRelayConfig not implemented") -} -func (*UnimplementedMasterServer) BreakWorkerDDLLock(ctx context.Context, req *BreakWorkerDDLLockRequest) (*BreakWorkerDDLLockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BreakWorkerDDLLock not implemented") -} -func (*UnimplementedMasterServer) HandleSQLs(ctx context.Context, req *HandleSQLsRequest) (*HandleSQLsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleSQLs not implemented") -} -func (*UnimplementedMasterServer) SwitchWorkerRelayMaster(ctx context.Context, req *SwitchWorkerRelayMasterRequest) (*SwitchWorkerRelayMasterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SwitchWorkerRelayMaster not implemented") -} -func (*UnimplementedMasterServer) OperateWorkerRelayTask(ctx context.Context, req *OperateWorkerRelayRequest) (*OperateWorkerRelayResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method OperateWorkerRelayTask not implemented") -} -func (*UnimplementedMasterServer) PurgeWorkerRelay(ctx context.Context, req *PurgeWorkerRelayRequest) (*PurgeWorkerRelayResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PurgeWorkerRelay not implemented") -} -func (*UnimplementedMasterServer) RefreshWorkerTasks(ctx context.Context, req *RefreshWorkerTasksRequest) (*RefreshWorkerTasksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RefreshWorkerTasks not implemented") -} -func (*UnimplementedMasterServer) MigrateWorkerRelay(ctx context.Context, req *MigrateWorkerRelayRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MigrateWorkerRelay not implemented") -} -func (*UnimplementedMasterServer) CheckTask(ctx context.Context, req *CheckTaskRequest) (*CheckTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckTask not implemented") -} -func (*UnimplementedMasterServer) RegisterWorker(ctx context.Context, req *RegisterWorkerRequest) (*RegisterWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterWorker not implemented") -} - func RegisterMasterServer(s *grpc.Server, srv MasterServer) { s.RegisterService(&_Master_serviceDesc, srv) } @@ -3025,7 +2873,7 @@ var _Master_serviceDesc = grpc.ServiceDesc{ func (m *MigrateWorkerRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3033,41 +2881,34 @@ func (m *MigrateWorkerRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *MigrateWorkerRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MigrateWorkerRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x1a + if len(m.BinlogName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.BinlogName))) + i += copy(dAtA[i:], m.BinlogName) } if m.BinlogPos != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.BinlogPos)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.BinlogPos)) } - if len(m.BinlogName) > 0 { - i -= len(m.BinlogName) - copy(dAtA[i:], m.BinlogName) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.BinlogName))) - i-- - dAtA[i] = 0xa + if len(m.Worker) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateWorkerRelayConfigRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3075,36 +2916,29 @@ func (m *UpdateWorkerRelayConfigRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateWorkerRelayConfigRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateWorkerRelayConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x12 - } if len(m.Config) > 0 { - i -= len(m.Config) - copy(dAtA[i:], m.Config) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Config))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Config))) + i += copy(dAtA[i:], m.Config) + } + if len(m.Worker) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } - return len(dAtA) - i, nil + return i, nil } func (m *StartTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3112,38 +2946,38 @@ func (m *StartTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *StartTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StartTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *StartTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3151,53 +2985,45 @@ func (m *StartTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *StartTaskResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StartTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateMasterConfigRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3205,29 +3031,23 @@ func (m *UpdateMasterConfigRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateMasterConfigRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateMasterConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Config) > 0 { - i -= len(m.Config) - copy(dAtA[i:], m.Config) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Config))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Config))) + i += copy(dAtA[i:], m.Config) } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateMasterConfigResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3235,53 +3055,45 @@ func (m *UpdateMasterConfigResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateMasterConfigResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateMasterConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *OperateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3289,43 +3101,43 @@ func (m *OperateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *OperateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + if m.Op != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) } if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if m.Op != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 + if len(m.Workers) > 0 { + for _, s := range m.Workers { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + return i, nil } func (m *OperateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3333,58 +3145,50 @@ func (m *OperateTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *OperateTaskResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x1a + if m.Op != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) } if m.Result { - i-- + dAtA[i] = 0x10 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if m.Op != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 + if len(m.Msg) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3392,38 +3196,38 @@ func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3431,53 +3235,45 @@ func (m *UpdateTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateTaskResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil } func (m *QueryStatusListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3485,38 +3281,38 @@ func (m *QueryStatusListRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryStatusListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStatusListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *QueryStatusListResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3524,53 +3320,45 @@ func (m *QueryStatusListResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryStatusListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStatusListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *QueryErrorListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3578,38 +3366,38 @@ func (m *QueryErrorListRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryErrorListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryErrorListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *QueryErrorListResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3617,53 +3405,45 @@ func (m *QueryErrorListResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryErrorListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryErrorListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *ShowDDLLocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3671,38 +3451,38 @@ func (m *ShowDDLLocksRequest) Marshal() (dAtA []byte, err error) { } func (m *ShowDDLLocksRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShowDDLLocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *DDLLock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3710,70 +3490,80 @@ func (m *DDLLock) Marshal() (dAtA []byte, err error) { } func (m *DDLLock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DDLLock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Unsynced) > 0 { - for iNdEx := len(m.Unsynced) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Unsynced[iNdEx]) - copy(dAtA[i:], m.Unsynced[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Unsynced[iNdEx]))) - i-- - dAtA[i] = 0x32 - } + if len(m.ID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) } - if len(m.Synced) > 0 { - for iNdEx := len(m.Synced) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Synced[iNdEx]) - copy(dAtA[i:], m.Synced[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Synced[iNdEx]))) - i-- - dAtA[i] = 0x2a - } + if len(m.Task) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } + if len(m.Owner) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Owner))) + i += copy(dAtA[i:], m.Owner) } if len(m.DDLs) > 0 { - for iNdEx := len(m.DDLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DDLs[iNdEx]) - copy(dAtA[i:], m.DDLs[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.DDLs[iNdEx]))) - i-- + for _, s := range m.DDLs { dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0x1a - } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0x12 + if len(m.Synced) > 0 { + for _, s := range m.Synced { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa + if len(m.Unsynced) > 0 { + for _, s := range m.Unsynced { + dAtA[i] = 0x32 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + return i, nil } func (m *ShowDDLLocksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3781,53 +3571,45 @@ func (m *ShowDDLLocksResponse) Marshal() (dAtA []byte, err error) { } func (m *ShowDDLLocksResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShowDDLLocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Locks) > 0 { - for iNdEx := len(m.Locks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Locks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Locks) > 0 { + for _, msg := range m.Locks { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *UnlockDDLLockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3835,55 +3617,54 @@ func (m *UnlockDDLLockRequest) Marshal() (dAtA []byte, err error) { } func (m *UnlockDDLLockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnlockDDLLockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.ID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) + } + if len(m.ReplaceOwner) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ReplaceOwner))) + i += copy(dAtA[i:], m.ReplaceOwner) + } + if len(m.Workers) > 0 { + for _, s := range m.Workers { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } if m.ForceRemove { - i-- + dAtA[i] = 0x20 + i++ if m.ForceRemove { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x20 - } - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ReplaceOwner) > 0 { - i -= len(m.ReplaceOwner) - copy(dAtA[i:], m.ReplaceOwner) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ReplaceOwner))) - i-- - dAtA[i] = 0x12 - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa + i++ } - return len(dAtA) - i, nil + return i, nil } func (m *UnlockDDLLockResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3891,53 +3672,45 @@ func (m *UnlockDDLLockResponse) Marshal() (dAtA []byte, err error) { } func (m *UnlockDDLLockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnlockDDLLockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *BreakWorkerDDLLockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -3945,65 +3718,64 @@ func (m *BreakWorkerDDLLockRequest) Marshal() (dAtA []byte, err error) { } func (m *BreakWorkerDDLLockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BreakWorkerDDLLockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.SkipDDL { - i-- - if m.SkipDDL { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Workers) > 0 { + for _, s := range m.Workers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } - i-- - dAtA[i] = 0x28 + } + if len(m.Task) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } + if len(m.RemoveLockID) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.RemoveLockID))) + i += copy(dAtA[i:], m.RemoveLockID) } if m.ExecDDL { - i-- + dAtA[i] = 0x20 + i++ if m.ExecDDL { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x20 - } - if len(m.RemoveLockID) > 0 { - i -= len(m.RemoveLockID) - copy(dAtA[i:], m.RemoveLockID) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.RemoveLockID))) - i-- - dAtA[i] = 0x1a - } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0x12 + i++ } - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- - dAtA[i] = 0xa + if m.SkipDDL { + dAtA[i] = 0x28 + i++ + if m.SkipDDL { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i++ } - return len(dAtA) - i, nil + return i, nil } func (m *BreakWorkerDDLLockResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4011,53 +3783,45 @@ func (m *BreakWorkerDDLLockResponse) Marshal() (dAtA []byte, err error) { } func (m *BreakWorkerDDLLockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BreakWorkerDDLLockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *SwitchWorkerRelayMasterRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4065,31 +3829,32 @@ func (m *SwitchWorkerRelayMasterRequest) Marshal() (dAtA []byte, err error) { } func (m *SwitchWorkerRelayMasterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwitchWorkerRelayMasterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - return len(dAtA) - i, nil + return i, nil } func (m *SwitchWorkerRelayMasterResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4097,53 +3862,45 @@ func (m *SwitchWorkerRelayMasterResponse) Marshal() (dAtA []byte, err error) { } func (m *SwitchWorkerRelayMasterResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwitchWorkerRelayMasterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *OperateWorkerRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4151,36 +3908,37 @@ func (m *OperateWorkerRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *OperateWorkerRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateWorkerRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if m.Op != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) + } if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- + for _, s := range m.Workers { dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if m.Op != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return i, nil } func (m *OperateWorkerRelayResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4188,58 +3946,50 @@ func (m *OperateWorkerRelayResponse) Marshal() (dAtA []byte, err error) { } func (m *OperateWorkerRelayResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateWorkerRelayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x1a + if m.Op != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) } if m.Result { - i-- + dAtA[i] = 0x10 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if m.Op != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 + if len(m.Msg) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *RefreshWorkerTasksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4247,22 +3997,17 @@ func (m *RefreshWorkerTasksRequest) Marshal() (dAtA []byte, err error) { } func (m *RefreshWorkerTasksRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RefreshWorkerTasksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - return len(dAtA) - i, nil + return i, nil } func (m *RefreshWorkerTasksMsg) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4270,36 +4015,29 @@ func (m *RefreshWorkerTasksMsg) Marshal() (dAtA []byte, err error) { } func (m *RefreshWorkerTasksMsg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RefreshWorkerTasksMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *RefreshWorkerTasksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4307,46 +4045,39 @@ func (m *RefreshWorkerTasksResponse) Marshal() (dAtA []byte, err error) { } func (m *RefreshWorkerTasksResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RefreshWorkerTasksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *HandleSQLsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4354,74 +4085,71 @@ func (m *HandleSQLsRequest) Marshal() (dAtA []byte, err error) { } func (m *HandleSQLsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HandleSQLsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Sharding { - i-- - if m.Sharding { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Op != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) + } + if len(m.Args) > 0 { + for _, s := range m.Args { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } - i-- - dAtA[i] = 0x38 } - if len(m.SqlPattern) > 0 { - i -= len(m.SqlPattern) - copy(dAtA[i:], m.SqlPattern) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.SqlPattern))) - i-- - dAtA[i] = 0x32 + if len(m.BinlogPos) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.BinlogPos))) + i += copy(dAtA[i:], m.BinlogPos) } if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) - i-- dAtA[i] = 0x2a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } - if len(m.BinlogPos) > 0 { - i -= len(m.BinlogPos) - copy(dAtA[i:], m.BinlogPos) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.BinlogPos))) - i-- - dAtA[i] = 0x22 + if len(m.SqlPattern) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.SqlPattern))) + i += copy(dAtA[i:], m.SqlPattern) } - if len(m.Args) > 0 { - for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Args[iNdEx]) - copy(dAtA[i:], m.Args[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Args[iNdEx]))) - i-- - dAtA[i] = 0x1a + if m.Sharding { + dAtA[i] = 0x38 + i++ + if m.Sharding { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i++ } - if m.Op != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *HandleSQLsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4429,53 +4157,45 @@ func (m *HandleSQLsResponse) Marshal() (dAtA []byte, err error) { } func (m *HandleSQLsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HandleSQLsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *PurgeWorkerRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4483,60 +4203,59 @@ func (m *PurgeWorkerRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *PurgeWorkerRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PurgeWorkerRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.SubDir) > 0 { - i -= len(m.SubDir) - copy(dAtA[i:], m.SubDir) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.SubDir))) - i-- - dAtA[i] = 0x2a - } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x22 - } - if m.Time != 0 { - i = encodeVarintDmmaster(dAtA, i, uint64(m.Time)) - i-- - dAtA[i] = 0x18 + if len(m.Workers) > 0 { + for _, s := range m.Workers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } if m.Inactive { - i-- + dAtA[i] = 0x10 + i++ if m.Inactive { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Workers[iNdEx]) - copy(dAtA[i:], m.Workers[iNdEx]) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Workers[iNdEx]))) - i-- - dAtA[i] = 0xa - } + if m.Time != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(m.Time)) + } + if len(m.Filename) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Filename))) + i += copy(dAtA[i:], m.Filename) + } + if len(m.SubDir) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.SubDir))) + i += copy(dAtA[i:], m.SubDir) } - return len(dAtA) - i, nil + return i, nil } func (m *PurgeWorkerRelayResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4544,53 +4263,45 @@ func (m *PurgeWorkerRelayResponse) Marshal() (dAtA []byte, err error) { } func (m *PurgeWorkerRelayResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PurgeWorkerRelayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Workers) > 0 { - for iNdEx := len(m.Workers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmmaster(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.Workers) > 0 { + for _, msg := range m.Workers { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return len(dAtA) - i, nil + return i, nil } func (m *CheckTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4598,29 +4309,23 @@ func (m *CheckTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CheckTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) } - return len(dAtA) - i, nil + return i, nil } func (m *CheckTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4628,39 +4333,33 @@ func (m *CheckTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *CheckTaskResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ } - return len(dAtA) - i, nil + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + return i, nil } func (m *RegisterWorkerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4668,36 +4367,29 @@ func (m *RegisterWorkerRequest) Marshal() (dAtA []byte, err error) { } func (m *RegisterWorkerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegisterWorkerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Address) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Address))) + i += copy(dAtA[i:], m.Address) } - return len(dAtA) - i, nil + return i, nil } func (m *RegisterWorkerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4705,45 +4397,37 @@ func (m *RegisterWorkerResponse) Marshal() (dAtA []byte, err error) { } func (m *RegisterWorkerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegisterWorkerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmmaster(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintDmmaster(dAtA []byte, offset int, v uint64) int { - offset -= sovDmmaster(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *MigrateWorkerRelayRequest) Size() (n int) { if m == nil { @@ -5504,7 +5188,14 @@ func (m *RegisterWorkerResponse) Size() (n int) { } func sovDmmaster(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozDmmaster(x uint64) (n int) { return sovDmmaster(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -5524,7 +5215,7 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5552,7 +5243,7 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5562,9 +5253,6 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5584,7 +5272,7 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BinlogPos |= uint32(b&0x7F) << shift + m.BinlogPos |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } @@ -5603,7 +5291,7 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5613,9 +5301,6 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5630,9 +5315,6 @@ func (m *MigrateWorkerRelayRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5660,7 +5342,7 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5688,7 +5370,7 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5698,9 +5380,6 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5720,7 +5399,7 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5730,9 +5409,6 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5747,9 +5423,6 @@ func (m *UpdateWorkerRelayConfigRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5777,7 +5450,7 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5805,7 +5478,7 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5815,9 +5488,6 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5837,7 +5507,7 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5847,9 +5517,6 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5864,9 +5531,6 @@ func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -5894,7 +5558,7 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5922,7 +5586,7 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -5942,7 +5606,7 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -5952,9 +5616,6 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5974,7 +5635,7 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -5983,9 +5644,6 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6003,9 +5661,6 @@ func (m *StartTaskResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6033,7 +5688,7 @@ func (m *UpdateMasterConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6061,7 +5716,7 @@ func (m *UpdateMasterConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6071,9 +5726,6 @@ func (m *UpdateMasterConfigRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6088,9 +5740,6 @@ func (m *UpdateMasterConfigRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6118,7 +5767,7 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6146,7 +5795,7 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6166,7 +5815,7 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6176,9 +5825,6 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6198,7 +5844,7 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6207,9 +5853,6 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6227,9 +5870,6 @@ func (m *UpdateMasterConfigResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6257,7 +5897,7 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6285,7 +5925,7 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= TaskOp(b&0x7F) << shift + m.Op |= (TaskOp(b) & 0x7F) << shift if b < 0x80 { break } @@ -6304,7 +5944,7 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6314,9 +5954,6 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6336,7 +5973,7 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6346,9 +5983,6 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6363,9 +5997,6 @@ func (m *OperateTaskRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6393,7 +6024,7 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6421,7 +6052,7 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= TaskOp(b&0x7F) << shift + m.Op |= (TaskOp(b) & 0x7F) << shift if b < 0x80 { break } @@ -6440,7 +6071,7 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6460,7 +6091,7 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6470,9 +6101,6 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6492,7 +6120,7 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6501,9 +6129,6 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6521,9 +6146,6 @@ func (m *OperateTaskResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6551,7 +6173,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6579,7 +6201,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6589,9 +6211,6 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6611,7 +6230,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6621,9 +6240,6 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6638,9 +6254,6 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6668,7 +6281,7 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6696,7 +6309,7 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6716,7 +6329,7 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6726,9 +6339,6 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6748,7 +6358,7 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6757,9 +6367,6 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6777,9 +6384,6 @@ func (m *UpdateTaskResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6807,7 +6411,7 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6835,7 +6439,7 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6845,9 +6449,6 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6867,7 +6468,7 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6877,9 +6478,6 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6894,9 +6492,6 @@ func (m *QueryStatusListRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -6924,7 +6519,7 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6952,7 +6547,7 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -6972,7 +6567,7 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -6982,9 +6577,6 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7004,7 +6596,7 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7013,9 +6605,6 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7033,9 +6622,6 @@ func (m *QueryStatusListResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7063,7 +6649,7 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7091,7 +6677,7 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7101,9 +6687,6 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7123,7 +6706,7 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7133,9 +6716,6 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7150,9 +6730,6 @@ func (m *QueryErrorListRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7180,7 +6757,7 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7208,7 +6785,7 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7228,7 +6805,7 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7238,9 +6815,6 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7260,7 +6834,7 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7269,9 +6843,6 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7289,9 +6860,6 @@ func (m *QueryErrorListResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7319,7 +6887,7 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7347,7 +6915,7 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7357,9 +6925,6 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7379,7 +6944,7 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7389,9 +6954,6 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7406,9 +6968,6 @@ func (m *ShowDDLLocksRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7436,7 +6995,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7464,7 +7023,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7474,9 +7033,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7496,7 +7052,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7506,9 +7062,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7528,7 +7081,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7537,10 +7090,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { if intStringLen < 0 { return ErrInvalidLengthDmmaster } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } @@ -7560,7 +7110,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7570,9 +7120,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7592,7 +7139,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7602,9 +7149,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7624,7 +7168,7 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7634,9 +7178,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7651,9 +7192,6 @@ func (m *DDLLock) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7681,7 +7219,7 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7709,7 +7247,7 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7729,7 +7267,7 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7739,9 +7277,6 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7761,7 +7296,7 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7770,9 +7305,6 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7790,9 +7322,6 @@ func (m *ShowDDLLocksResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7820,7 +7349,7 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7848,7 +7377,7 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7858,9 +7387,6 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7880,7 +7406,7 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7890,9 +7416,6 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7912,7 +7435,7 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -7922,9 +7445,6 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7944,7 +7464,7 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -7959,9 +7479,6 @@ func (m *UnlockDDLLockRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -7989,7 +7506,7 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8017,7 +7534,7 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8037,7 +7554,7 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8047,9 +7564,6 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8069,7 +7583,7 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8078,9 +7592,6 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8098,9 +7609,6 @@ func (m *UnlockDDLLockResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8128,7 +7636,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8156,7 +7664,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8166,9 +7674,6 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8188,7 +7693,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8198,9 +7703,6 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8220,7 +7722,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8230,9 +7732,6 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8252,7 +7751,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8272,7 +7771,7 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8287,9 +7786,6 @@ func (m *BreakWorkerDDLLockRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8317,7 +7813,7 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8345,7 +7841,7 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8365,7 +7861,7 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8375,9 +7871,6 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8397,7 +7890,7 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8406,9 +7899,6 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8426,9 +7916,6 @@ func (m *BreakWorkerDDLLockResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8456,7 +7943,7 @@ func (m *SwitchWorkerRelayMasterRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8484,7 +7971,7 @@ func (m *SwitchWorkerRelayMasterRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8494,9 +7981,6 @@ func (m *SwitchWorkerRelayMasterRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8511,9 +7995,6 @@ func (m *SwitchWorkerRelayMasterRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8541,7 +8022,7 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8569,7 +8050,7 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8589,7 +8070,7 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8599,9 +8080,6 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8621,7 +8099,7 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8630,9 +8108,6 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8650,9 +8125,6 @@ func (m *SwitchWorkerRelayMasterResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8680,7 +8152,7 @@ func (m *OperateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8708,7 +8180,7 @@ func (m *OperateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= RelayOp(b&0x7F) << shift + m.Op |= (RelayOp(b) & 0x7F) << shift if b < 0x80 { break } @@ -8727,7 +8199,7 @@ func (m *OperateWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8737,9 +8209,6 @@ func (m *OperateWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8754,9 +8223,6 @@ func (m *OperateWorkerRelayRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8784,7 +8250,7 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8812,7 +8278,7 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= RelayOp(b&0x7F) << shift + m.Op |= (RelayOp(b) & 0x7F) << shift if b < 0x80 { break } @@ -8831,7 +8297,7 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8851,7 +8317,7 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8861,9 +8327,6 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8883,7 +8346,7 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -8892,9 +8355,6 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8912,9 +8372,6 @@ func (m *OperateWorkerRelayResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8942,7 +8399,7 @@ func (m *RefreshWorkerTasksRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8965,9 +8422,6 @@ func (m *RefreshWorkerTasksRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8995,7 +8449,7 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9023,7 +8477,7 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9033,9 +8487,6 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9055,7 +8506,7 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9065,9 +8516,6 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9082,9 +8530,6 @@ func (m *RefreshWorkerTasksMsg) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9112,7 +8557,7 @@ func (m *RefreshWorkerTasksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9140,7 +8585,7 @@ func (m *RefreshWorkerTasksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9160,7 +8605,7 @@ func (m *RefreshWorkerTasksResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9169,9 +8614,6 @@ func (m *RefreshWorkerTasksResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9189,9 +8631,6 @@ func (m *RefreshWorkerTasksResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9219,7 +8658,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9247,7 +8686,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9257,9 +8696,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9279,7 +8715,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= SQLOp(b&0x7F) << shift + m.Op |= (SQLOp(b) & 0x7F) << shift if b < 0x80 { break } @@ -9298,7 +8734,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9308,9 +8744,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9330,7 +8763,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9340,9 +8773,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9362,7 +8792,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9372,9 +8802,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9394,7 +8821,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9404,9 +8831,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9426,7 +8850,7 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9441,9 +8865,6 @@ func (m *HandleSQLsRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9471,7 +8892,7 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9499,7 +8920,7 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9519,7 +8940,7 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9529,9 +8950,6 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9551,7 +8969,7 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9560,9 +8978,6 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9580,9 +8995,6 @@ func (m *HandleSQLsResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9610,7 +9022,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9638,7 +9050,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9648,9 +9060,6 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9670,7 +9079,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9690,7 +9099,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Time |= int64(b&0x7F) << shift + m.Time |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9709,7 +9118,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9719,9 +9128,6 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9741,7 +9147,7 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9751,9 +9157,6 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9768,9 +9171,6 @@ func (m *PurgeWorkerRelayRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9798,7 +9198,7 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9826,7 +9226,7 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9846,7 +9246,7 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9856,9 +9256,6 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9878,7 +9275,7 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -9887,9 +9284,6 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9907,9 +9301,6 @@ func (m *PurgeWorkerRelayResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9937,7 +9328,7 @@ func (m *CheckTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9965,7 +9356,7 @@ func (m *CheckTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9975,9 +9366,6 @@ func (m *CheckTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -9992,9 +9380,6 @@ func (m *CheckTaskRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10022,7 +9407,7 @@ func (m *CheckTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10050,7 +9435,7 @@ func (m *CheckTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -10070,7 +9455,7 @@ func (m *CheckTaskResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10080,9 +9465,6 @@ func (m *CheckTaskResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -10097,9 +9479,6 @@ func (m *CheckTaskResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10127,7 +9506,7 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10155,7 +9534,7 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10165,9 +9544,6 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -10187,7 +9563,7 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10197,9 +9573,6 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -10214,9 +9587,6 @@ func (m *RegisterWorkerRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10244,7 +9614,7 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10272,7 +9642,7 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -10292,7 +9662,7 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10302,9 +9672,6 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmmaster } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmmaster - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -10319,9 +9686,6 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmmaster } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmmaster - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10337,7 +9701,6 @@ func (m *RegisterWorkerResponse) Unmarshal(dAtA []byte) error { func skipDmmaster(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -10369,8 +9732,10 @@ func skipDmmaster(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -10387,34 +9752,148 @@ func skipDmmaster(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthDmmaster } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDmmaster + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDmmaster + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipDmmaster(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthDmmaster - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthDmmaster = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDmmaster = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDmmaster = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthDmmaster = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDmmaster = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("dmmaster.proto", fileDescriptor_dmmaster_632e41001d9f6d87) } + +var fileDescriptor_dmmaster_632e41001d9f6d87 = []byte{ + // 1411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0xdb, 0x46, + 0x13, 0x16, 0x25, 0x5b, 0x89, 0x46, 0x89, 0x61, 0x6f, 0x6c, 0x89, 0xa2, 0x1d, 0xc6, 0x2f, 0xdf, + 0x22, 0x30, 0x7a, 0x88, 0x1b, 0xa5, 0xa7, 0x00, 0x01, 0x1a, 0x5b, 0x09, 0x6a, 0x40, 0xa9, 0x1d, + 0xaa, 0x41, 0x91, 0x4b, 0x01, 0x4a, 0x5a, 0xcb, 0x84, 0x24, 0x92, 0xe6, 0x52, 0x76, 0xdc, 0xa2, + 0x28, 0xd0, 0x43, 0x2f, 0xbd, 0xb4, 0xe8, 0x21, 0xe7, 0xfe, 0x9b, 0x1c, 0x03, 0x14, 0x05, 0x7a, + 0x2c, 0x92, 0xfe, 0x90, 0x62, 0x3f, 0x48, 0x2e, 0xbf, 0x94, 0xd8, 0x07, 0xdd, 0xb8, 0x3b, 0xe4, + 0x33, 0xcf, 0xcc, 0x0e, 0x67, 0x1e, 0x12, 0x56, 0x86, 0xd3, 0xa9, 0x45, 0x02, 0xec, 0xdf, 0xf3, + 0x7c, 0x37, 0x70, 0x51, 0xd9, 0xeb, 0x6b, 0x2b, 0xc3, 0xe9, 0xb9, 0xeb, 0x8f, 0xc3, 0x3d, 0x6d, + 0x6b, 0xe4, 0xba, 0xa3, 0x09, 0xde, 0xb5, 0x3c, 0x7b, 0xd7, 0x72, 0x1c, 0x37, 0xb0, 0x02, 0xdb, + 0x75, 0x08, 0xb7, 0x1a, 0xa7, 0xd0, 0x7a, 0x66, 0x8f, 0x7c, 0x2b, 0xc0, 0xdf, 0xb0, 0x87, 0x4c, + 0x3c, 0xb1, 0x2e, 0x4c, 0x7c, 0x3a, 0xc3, 0x24, 0x40, 0x3a, 0xc0, 0x9e, 0xed, 0x4c, 0xdc, 0xd1, + 0x57, 0xd6, 0x14, 0xab, 0xca, 0xb6, 0xb2, 0x53, 0x33, 0xa5, 0x1d, 0xb4, 0x05, 0x35, 0xbe, 0x3a, + 0x72, 0x89, 0x5a, 0xde, 0x56, 0x76, 0x6e, 0x9a, 0xf1, 0x06, 0x6a, 0x40, 0x95, 0x13, 0x51, 0x2b, + 0xec, 0x49, 0xb1, 0x32, 0x8e, 0x40, 0x7f, 0xe1, 0x0d, 0x93, 0x1e, 0xf7, 0x5d, 0xe7, 0xd8, 0x1e, + 0x85, 0x7e, 0x1b, 0x50, 0x1d, 0xb0, 0x0d, 0xe1, 0x53, 0xac, 0x24, 0xc4, 0x72, 0x02, 0xf1, 0x0b, + 0x58, 0xed, 0x05, 0x96, 0x1f, 0x7c, 0x6d, 0x91, 0x71, 0x88, 0x81, 0x60, 0x29, 0xb0, 0xc8, 0x58, + 0x20, 0xb0, 0x6b, 0xa4, 0xc2, 0x35, 0xfe, 0x04, 0x65, 0x5b, 0xd9, 0xa9, 0x99, 0xe1, 0xd2, 0x38, + 0x85, 0x35, 0x09, 0x81, 0x78, 0xae, 0x43, 0x30, 0x75, 0xe7, 0x63, 0x32, 0x9b, 0x04, 0x0c, 0xe4, + 0xba, 0x29, 0x56, 0x68, 0x15, 0x2a, 0x53, 0x32, 0x12, 0x1c, 0xe8, 0x25, 0x6a, 0xc7, 0xc0, 0x95, + 0xed, 0xca, 0x4e, 0xbd, 0xad, 0xde, 0xf3, 0xfa, 0xf7, 0xf6, 0xdd, 0xe9, 0xd4, 0x75, 0xc2, 0x28, + 0x39, 0x68, 0xec, 0xf2, 0x01, 0xb4, 0x78, 0x1a, 0x9e, 0xb1, 0x13, 0xfc, 0xa8, 0x0c, 0x18, 0x17, + 0xa0, 0xe5, 0x3d, 0x74, 0x69, 0xc2, 0xf7, 0xd3, 0x84, 0x9b, 0x94, 0xf0, 0xf3, 0x19, 0xf6, 0x2f, + 0x7a, 0x81, 0x15, 0xcc, 0x48, 0x96, 0xef, 0xb7, 0x80, 0x0e, 0x3d, 0x4c, 0x2b, 0x45, 0x4e, 0xb3, + 0x06, 0x65, 0xd7, 0x63, 0xee, 0x56, 0xda, 0x40, 0x31, 0xa8, 0xf1, 0xd0, 0x33, 0xcb, 0xae, 0x47, + 0x8f, 0xc0, 0xa1, 0x85, 0xc3, 0xfd, 0xb2, 0x6b, 0xf9, 0x08, 0x2a, 0xc9, 0x23, 0xf8, 0x4d, 0x81, + 0x5b, 0x09, 0x07, 0x22, 0xa8, 0x79, 0x1e, 0xe2, 0x80, 0xcb, 0x79, 0x01, 0x57, 0xe2, 0x80, 0x3f, + 0x8f, 0xfd, 0x2e, 0xb1, 0x80, 0x35, 0x0a, 0x25, 0xfc, 0xf5, 0x66, 0x7d, 0xd9, 0x65, 0xcc, 0xe9, + 0x31, 0xac, 0xf1, 0x74, 0x5f, 0xbd, 0xb2, 0x7c, 0x40, 0x32, 0xc4, 0x42, 0x4a, 0xeb, 0x29, 0x34, + 0xa4, 0xa3, 0xec, 0xda, 0x24, 0x90, 0xb8, 0x3b, 0xf1, 0xbb, 0x9c, 0x39, 0x92, 0x14, 0xf7, 0x33, + 0x68, 0x66, 0x70, 0x16, 0x51, 0x6a, 0x4f, 0x60, 0x83, 0xd9, 0x9f, 0xf8, 0xbe, 0xeb, 0x5f, 0x9d, + 0x7e, 0x20, 0xd2, 0x20, 0xc1, 0x5c, 0x9a, 0xfd, 0x67, 0x69, 0xf6, 0x8d, 0x88, 0x3d, 0x83, 0xcd, + 0x92, 0xdf, 0x87, 0x5b, 0xbd, 0x13, 0xf7, 0xbc, 0xd3, 0xe9, 0x76, 0xdd, 0xc1, 0x98, 0x5c, 0xad, + 0x6a, 0x7e, 0x51, 0xe0, 0x9a, 0x40, 0x40, 0x2b, 0x50, 0x3e, 0xe8, 0x88, 0xe7, 0xca, 0x07, 0x9d, + 0x08, 0xa9, 0x2c, 0x21, 0xad, 0xc3, 0xb2, 0x7b, 0xee, 0x44, 0xad, 0x96, 0x2f, 0xe8, 0x9d, 0x9d, + 0x4e, 0x97, 0x57, 0x7c, 0xcd, 0x64, 0xd7, 0x34, 0x74, 0x72, 0xe1, 0x0c, 0xf0, 0x50, 0x5d, 0x66, + 0xbb, 0x62, 0x85, 0x34, 0xb8, 0x3e, 0x73, 0x84, 0xa5, 0xca, 0x2c, 0xd1, 0xda, 0x18, 0xc0, 0x7a, + 0x32, 0xa4, 0x4b, 0xa7, 0xf1, 0x7f, 0xb0, 0x3c, 0xa1, 0x8f, 0x8a, 0x24, 0xd6, 0x69, 0x12, 0x05, + 0x9c, 0xc9, 0x2d, 0xc6, 0xcf, 0x0a, 0xac, 0xbf, 0x70, 0xe8, 0x75, 0x68, 0x10, 0x99, 0x4b, 0xc7, + 0x6f, 0xc0, 0x0d, 0x1f, 0x7b, 0x13, 0x6b, 0x80, 0x0f, 0x59, 0xc8, 0xdc, 0x4d, 0x62, 0xaf, 0xb8, + 0xcd, 0xa0, 0x6d, 0xa8, 0x1f, 0xbb, 0xfe, 0x00, 0x9b, 0x78, 0xea, 0x9e, 0x61, 0x75, 0x89, 0x11, + 0x97, 0xb7, 0x8c, 0x19, 0x6c, 0xa4, 0x78, 0x2c, 0xe4, 0xa5, 0xfd, 0x43, 0x81, 0xd6, 0x9e, 0x8f, + 0xad, 0x31, 0xbf, 0x21, 0x95, 0x04, 0x29, 0x20, 0x25, 0x19, 0x50, 0x5e, 0x39, 0xb0, 0x14, 0xd1, + 0x60, 0x28, 0xc4, 0x41, 0x47, 0x54, 0x45, 0x62, 0x8f, 0x22, 0xe2, 0x57, 0x78, 0xd0, 0xe9, 0x74, + 0x45, 0x12, 0xc2, 0x25, 0xb5, 0x90, 0xb1, 0xed, 0x51, 0xcb, 0x32, 0xb7, 0x88, 0xa5, 0xf1, 0x1d, + 0x68, 0x79, 0x14, 0x17, 0x92, 0x9f, 0x87, 0xa0, 0xf7, 0xce, 0xed, 0x60, 0x70, 0x22, 0xc9, 0x06, + 0x3e, 0x05, 0x3f, 0x98, 0x23, 0xe3, 0x47, 0xb8, 0x53, 0xf8, 0xec, 0x42, 0xc8, 0x9b, 0xd0, 0x12, + 0xb3, 0x26, 0x47, 0x66, 0x6d, 0x4a, 0x13, 0x8e, 0xbd, 0x19, 0xcc, 0x2a, 0x46, 0x5c, 0x71, 0x8f, + 0x78, 0xad, 0x80, 0x96, 0x07, 0x2a, 0x02, 0x9a, 0x8b, 0xfa, 0xf1, 0x83, 0xb3, 0x9d, 0x1e, 0x9c, + 0xaa, 0x34, 0x38, 0x13, 0x1e, 0x63, 0x66, 0x9b, 0xd0, 0x32, 0xf1, 0xb1, 0x8f, 0x89, 0xc8, 0x37, + 0x1d, 0x7d, 0x61, 0x23, 0x34, 0x1e, 0xc3, 0x46, 0xd6, 0xf8, 0x8c, 0xc8, 0xea, 0x4e, 0x91, 0xd5, + 0x5d, 0xf6, 0x04, 0x0c, 0x1b, 0xb4, 0x3c, 0xfc, 0x0f, 0x9c, 0xe4, 0x83, 0x64, 0x26, 0xeb, 0xed, + 0x16, 0xcf, 0x4a, 0x0e, 0x97, 0x38, 0x94, 0x37, 0x0a, 0xac, 0x7d, 0x69, 0x39, 0xc3, 0x09, 0xee, + 0x3d, 0xef, 0x92, 0x79, 0x73, 0xa8, 0xc5, 0xf2, 0x5d, 0x66, 0xf9, 0xae, 0x51, 0xe4, 0xde, 0xf3, + 0x6e, 0x2c, 0x84, 0x2c, 0x7f, 0x14, 0xb6, 0x22, 0x76, 0x4d, 0xb5, 0x73, 0x3f, 0xd2, 0xce, 0x4b, + 0x0c, 0x27, 0xde, 0x90, 0x72, 0xb1, 0x9c, 0xc8, 0x85, 0x0e, 0x40, 0x4e, 0x27, 0x47, 0x56, 0x10, + 0x60, 0xdf, 0x51, 0xab, 0x5c, 0x91, 0xc7, 0x3b, 0xb4, 0x8b, 0x93, 0x13, 0xcb, 0x1f, 0xda, 0xce, + 0x48, 0xbd, 0xc6, 0xa2, 0x8f, 0xd6, 0x54, 0x89, 0xc8, 0x91, 0x2c, 0xa4, 0xee, 0x5f, 0x2b, 0xd0, + 0x3c, 0x9a, 0xf9, 0xa3, 0xbc, 0xb2, 0x2f, 0x6e, 0x69, 0x1a, 0x5c, 0xb7, 0x1d, 0x6b, 0x10, 0xd8, + 0x67, 0x58, 0xd4, 0x67, 0xb4, 0x66, 0xed, 0xce, 0x9e, 0x62, 0x56, 0xa2, 0x15, 0x93, 0x5d, 0xd3, + 0xfb, 0x8f, 0xed, 0x09, 0x66, 0x47, 0xc2, 0x53, 0x19, 0xad, 0xd9, 0xbc, 0x9b, 0xf5, 0x3b, 0x76, + 0x94, 0x49, 0xbe, 0x32, 0x5e, 0x81, 0x9a, 0x25, 0xb6, 0x90, 0x9c, 0xdc, 0x85, 0xd5, 0xfd, 0x13, + 0x3c, 0x18, 0x7f, 0x40, 0x53, 0x1a, 0x8f, 0x60, 0x4d, 0xba, 0xef, 0xb2, 0xd4, 0xa8, 0x88, 0x32, + 0xf1, 0xc8, 0xa6, 0x4d, 0x2e, 0x64, 0x32, 0x57, 0x44, 0x59, 0xc3, 0xa1, 0x8f, 0x09, 0x11, 0x10, + 0xe1, 0xd2, 0xd8, 0x83, 0x46, 0x1a, 0xe6, 0xb2, 0x54, 0xda, 0x7f, 0xd5, 0xa1, 0xca, 0xdb, 0x2d, + 0x7a, 0x09, 0xb5, 0xe8, 0x43, 0x0b, 0xad, 0xb3, 0xd7, 0x24, 0xf5, 0xe5, 0xa6, 0x6d, 0xa4, 0x76, + 0xb9, 0x3b, 0xe3, 0xce, 0x4f, 0x7f, 0xfe, 0xfb, 0x7b, 0xb9, 0x65, 0xac, 0xd3, 0x2f, 0x59, 0xb2, + 0x7b, 0x76, 0xdf, 0x9a, 0x78, 0x27, 0xd6, 0xfd, 0x5d, 0x9a, 0x2b, 0xf2, 0x50, 0xf9, 0x14, 0x1d, + 0x43, 0x5d, 0xfa, 0x7e, 0x40, 0x0d, 0xa9, 0x4f, 0xc9, 0xf0, 0xcd, 0xcc, 0xbe, 0x70, 0x70, 0x97, + 0x39, 0xd8, 0xd6, 0x36, 0xf3, 0x1c, 0xec, 0x7e, 0x4f, 0xf3, 0xf4, 0x03, 0xf5, 0xf3, 0x08, 0x20, + 0x56, 0xf4, 0x88, 0xb1, 0xcd, 0x7c, 0x24, 0x68, 0x8d, 0xf4, 0xb6, 0x70, 0x52, 0x42, 0x13, 0xa8, + 0x4b, 0xe2, 0x17, 0x69, 0x29, 0x35, 0x2c, 0xc9, 0x5d, 0x6d, 0x33, 0xd7, 0x26, 0x90, 0x3e, 0x61, + 0x74, 0x75, 0xb4, 0x95, 0xa2, 0x4b, 0xd8, 0xad, 0x82, 0x2f, 0x7a, 0x02, 0x10, 0x8b, 0x55, 0xd4, + 0x4a, 0x8a, 0x57, 0xd9, 0x97, 0x96, 0x67, 0x8a, 0x48, 0xef, 0xc3, 0x0d, 0x59, 0x01, 0x22, 0x96, + 0xc4, 0x1c, 0x99, 0xab, 0xa9, 0x59, 0x43, 0x04, 0xf2, 0x14, 0x6e, 0x26, 0x84, 0x15, 0x62, 0x37, + 0xe7, 0x69, 0x3e, 0xad, 0x95, 0x63, 0x89, 0x70, 0x5e, 0x84, 0x9f, 0x54, 0xf2, 0x47, 0x30, 0xba, + 0x1d, 0x67, 0x3c, 0xe7, 0x8b, 0x5a, 0xd3, 0x8b, 0xcc, 0x11, 0xec, 0x4b, 0x68, 0x16, 0xfc, 0x97, + 0x40, 0x46, 0xfc, 0x70, 0xd1, 0x4f, 0x0b, 0xad, 0xf0, 0xcd, 0xe7, 0x8c, 0xb3, 0xba, 0x89, 0x33, + 0x2e, 0x94, 0x7c, 0x9c, 0x71, 0xb1, 0xdc, 0x32, 0x4a, 0xb4, 0x12, 0xe3, 0x8e, 0xce, 0x2b, 0x31, + 0x33, 0xab, 0x78, 0x25, 0x66, 0x1b, 0xbf, 0x51, 0x42, 0x43, 0x68, 0x16, 0xa8, 0x22, 0x1e, 0xf0, + 0x7c, 0xb9, 0xa5, 0xfd, 0x7f, 0xee, 0x3d, 0x52, 0x5a, 0x1b, 0x59, 0x95, 0xc2, 0x5e, 0x9d, 0xdb, + 0xd2, 0x9b, 0x98, 0x9d, 0x0f, 0x3c, 0xfe, 0x62, 0x81, 0x63, 0x94, 0xd0, 0x21, 0xac, 0xa6, 0x7b, + 0x38, 0x62, 0xef, 0x4c, 0xc1, 0xc8, 0xd1, 0xb6, 0xf2, 0x8d, 0xf2, 0x39, 0x65, 0xf5, 0x00, 0xe7, + 0x59, 0x28, 0x68, 0x38, 0xcf, 0x62, 0x3d, 0xc2, 0x78, 0xa2, 0xec, 0x4f, 0x36, 0x0e, 0x5b, 0xf8, + 0xf3, 0x6d, 0x6e, 0x3d, 0x3d, 0x84, 0x5a, 0x34, 0x1a, 0x78, 0x17, 0x4d, 0x4f, 0x14, 0xde, 0x45, + 0x33, 0xf3, 0xc3, 0x28, 0xa1, 0x03, 0x58, 0x49, 0x36, 0x74, 0x24, 0x74, 0x50, 0xce, 0xac, 0xe0, + 0x5d, 0x21, 0xbf, 0xff, 0x1b, 0xa5, 0x3d, 0xf5, 0xcd, 0x3b, 0x5d, 0x79, 0xfb, 0x4e, 0x57, 0xfe, + 0x79, 0xa7, 0x2b, 0xbf, 0xbe, 0xd7, 0x4b, 0x6f, 0xdf, 0xeb, 0xa5, 0xbf, 0xdf, 0xeb, 0xa5, 0x7e, + 0x95, 0xfd, 0x5d, 0x7c, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x33, 0x19, 0x56, 0x3e, 0xa1, + 0x14, 0x00, 0x00, +} diff --git a/dm/pb/dmmaster.pb.gw.go b/dm/pb/dmmaster.pb.gw.go index b3c4e66074..953fb4ef8a 100644 --- a/dm/pb/dmmaster.pb.gw.go +++ b/dm/pb/dmmaster.pb.gw.go @@ -13,7 +13,6 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" @@ -23,13 +22,11 @@ import ( "google.golang.org/grpc/status" ) -// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage func request_Master_StartTask_0(ctx context.Context, marshaler runtime.Marshaler, client MasterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartTaskRequest @@ -48,23 +45,6 @@ func request_Master_StartTask_0(ctx context.Context, marshaler runtime.Marshaler } -func local_request_Master_StartTask_0(ctx context.Context, marshaler runtime.Marshaler, server MasterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StartTaskRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.StartTask(ctx, &protoReq) - return msg, metadata, err - -} - func request_Master_OperateTask_0(ctx context.Context, marshaler runtime.Marshaler, client MasterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq OperateTaskRequest var metadata runtime.ServerMetadata @@ -100,41 +80,6 @@ func request_Master_OperateTask_0(ctx context.Context, marshaler runtime.Marshal } -func local_request_Master_OperateTask_0(ctx context.Context, marshaler runtime.Marshaler, server MasterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq OperateTaskRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.OperateTask(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Master_QueryStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -173,105 +118,6 @@ func request_Master_QueryStatus_0(ctx context.Context, marshaler runtime.Marshal } -func local_request_Master_QueryStatus_0(ctx context.Context, marshaler runtime.Marshaler, server MasterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStatusListRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Master_QueryStatus_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.QueryStatus(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMasterHandlerServer registers the http handlers for service Master to "mux". -// UnaryRPC :call MasterServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterMasterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MasterServer) error { - - mux.Handle("POST", pattern_Master_StartTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Master_StartTask_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Master_StartTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_Master_OperateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Master_OperateTask_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Master_OperateTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Master_QueryStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Master_QueryStatus_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Master_QueryStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - // RegisterMasterHandlerFromEndpoint is same as RegisterMasterHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterMasterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { diff --git a/dm/pb/dmworker.pb.go b/dm/pb/dmworker.pb.go index 51f17754c4..d7e0425e0f 100644 --- a/dm/pb/dmworker.pb.go +++ b/dm/pb/dmworker.pb.go @@ -4,16 +4,17 @@ package pb import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" + "fmt" proto "github.com/gogo/protobuf/proto" + + math "math" + + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + + io "io" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +26,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TaskOp int32 @@ -48,7 +49,6 @@ var TaskOp_name = map[int32]string{ 5: "Update", 6: "AutoResume", } - var TaskOp_value = map[string]int32{ "InvalidOp": 0, "Stop": 1, @@ -62,9 +62,8 @@ var TaskOp_value = map[string]int32{ func (x TaskOp) String() string { return proto.EnumName(TaskOp_name, int32(x)) } - func (TaskOp) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{0} + return fileDescriptor_dmworker_84482ac67274de9a, []int{0} } type SQLOp int32 @@ -80,7 +79,6 @@ var SQLOp_name = map[int32]string{ 1: "REPLACE", 2: "INJECT", } - var SQLOp_value = map[string]int32{ "SKIP": 0, "REPLACE": 1, @@ -90,9 +88,8 @@ var SQLOp_value = map[string]int32{ func (x SQLOp) String() string { return proto.EnumName(SQLOp_name, int32(x)) } - func (SQLOp) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{1} + return fileDescriptor_dmworker_84482ac67274de9a, []int{1} } // Stage represents current stage for a (sub) task @@ -136,7 +133,6 @@ var Stage_name = map[int32]string{ 4: "Stopped", 5: "Finished", } - var Stage_value = map[string]int32{ "InvalidStage": 0, "New": 1, @@ -149,9 +145,8 @@ var Stage_value = map[string]int32{ func (x Stage) String() string { return proto.EnumName(Stage_name, int32(x)) } - func (Stage) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{2} + return fileDescriptor_dmworker_84482ac67274de9a, []int{2} } // UnitType represents the dm unit's type @@ -174,7 +169,6 @@ var UnitType_name = map[int32]string{ 4: "Sync", 100: "Relay", } - var UnitType_value = map[string]int32{ "InvalidUnit": 0, "Check": 1, @@ -187,9 +181,8 @@ var UnitType_value = map[string]int32{ func (x UnitType) String() string { return proto.EnumName(UnitType_name, int32(x)) } - func (UnitType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{3} + return fileDescriptor_dmworker_84482ac67274de9a, []int{3} } // ErrorType represents type of error produced by a dm unit @@ -207,7 +200,6 @@ var ErrorType_name = map[int32]string{ 1: "ExecSQL", 2: "CheckFailed", } - var ErrorType_value = map[string]int32{ "UnknownError": 0, "ExecSQL": 1, @@ -217,9 +209,8 @@ var ErrorType_value = map[string]int32{ func (x ErrorType) String() string { return proto.EnumName(ErrorType_name, int32(x)) } - func (ErrorType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{4} + return fileDescriptor_dmworker_84482ac67274de9a, []int{4} } // RelayOp differs from TaskOp @@ -238,7 +229,6 @@ var RelayOp_name = map[int32]string{ 2: "PauseRelay", 3: "ResumeRelay", } - var RelayOp_value = map[string]int32{ "InvalidRelayOp": 0, "StopRelay": 1, @@ -249,9 +239,8 @@ var RelayOp_value = map[string]int32{ func (x RelayOp) String() string { return proto.EnumName(RelayOp_name, int32(x)) } - func (RelayOp) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{5} + return fileDescriptor_dmworker_84482ac67274de9a, []int{5} } type StartSubTaskRequest struct { @@ -262,7 +251,7 @@ func (m *StartSubTaskRequest) Reset() { *m = StartSubTaskRequest{} } func (m *StartSubTaskRequest) String() string { return proto.CompactTextString(m) } func (*StartSubTaskRequest) ProtoMessage() {} func (*StartSubTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{0} + return fileDescriptor_dmworker_84482ac67274de9a, []int{0} } func (m *StartSubTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,15 +261,15 @@ func (m *StartSubTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_StartSubTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *StartSubTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartSubTaskRequest.Merge(m, src) +func (dst *StartSubTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartSubTaskRequest.Merge(dst, src) } func (m *StartSubTaskRequest) XXX_Size() int { return m.Size() @@ -306,7 +295,7 @@ func (m *UpdateRelayRequest) Reset() { *m = UpdateRelayRequest{} } func (m *UpdateRelayRequest) String() string { return proto.CompactTextString(m) } func (*UpdateRelayRequest) ProtoMessage() {} func (*UpdateRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{1} + return fileDescriptor_dmworker_84482ac67274de9a, []int{1} } func (m *UpdateRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -316,15 +305,15 @@ func (m *UpdateRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_UpdateRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateRelayRequest.Merge(m, src) +func (dst *UpdateRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateRelayRequest.Merge(dst, src) } func (m *UpdateRelayRequest) XXX_Size() int { return m.Size() @@ -351,7 +340,7 @@ func (m *MigrateRelayRequest) Reset() { *m = MigrateRelayRequest{} } func (m *MigrateRelayRequest) String() string { return proto.CompactTextString(m) } func (*MigrateRelayRequest) ProtoMessage() {} func (*MigrateRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{2} + return fileDescriptor_dmworker_84482ac67274de9a, []int{2} } func (m *MigrateRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,15 +350,15 @@ func (m *MigrateRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_MigrateRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *MigrateRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MigrateRelayRequest.Merge(m, src) +func (dst *MigrateRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrateRelayRequest.Merge(dst, src) } func (m *MigrateRelayRequest) XXX_Size() int { return m.Size() @@ -403,7 +392,7 @@ func (m *OperateSubTaskRequest) Reset() { *m = OperateSubTaskRequest{} } func (m *OperateSubTaskRequest) String() string { return proto.CompactTextString(m) } func (*OperateSubTaskRequest) ProtoMessage() {} func (*OperateSubTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{3} + return fileDescriptor_dmworker_84482ac67274de9a, []int{3} } func (m *OperateSubTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,15 +402,15 @@ func (m *OperateSubTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_OperateSubTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateSubTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateSubTaskRequest.Merge(m, src) +func (dst *OperateSubTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateSubTaskRequest.Merge(dst, src) } func (m *OperateSubTaskRequest) XXX_Size() int { return m.Size() @@ -447,16 +436,17 @@ func (m *OperateSubTaskRequest) GetName() string { } type OperateSubTaskResponse struct { - Meta *CommonWorkerResponse `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` - Op TaskOp `protobuf:"varint,2,opt,name=op,proto3,enum=pb.TaskOp" json:"op,omitempty"` - LogID int64 `protobuf:"varint,3,opt,name=logID,proto3" json:"logID,omitempty"` + Op TaskOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.TaskOp" json:"op,omitempty"` + Result bool `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"` + Worker string `protobuf:"bytes,3,opt,name=worker,proto3" json:"worker,omitempty"` + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` } func (m *OperateSubTaskResponse) Reset() { *m = OperateSubTaskResponse{} } func (m *OperateSubTaskResponse) String() string { return proto.CompactTextString(m) } func (*OperateSubTaskResponse) ProtoMessage() {} func (*OperateSubTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{4} + return fileDescriptor_dmworker_84482ac67274de9a, []int{4} } func (m *OperateSubTaskResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,15 +456,15 @@ func (m *OperateSubTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_OperateSubTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateSubTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateSubTaskResponse.Merge(m, src) +func (dst *OperateSubTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateSubTaskResponse.Merge(dst, src) } func (m *OperateSubTaskResponse) XXX_Size() int { return m.Size() @@ -485,13 +475,6 @@ func (m *OperateSubTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_OperateSubTaskResponse proto.InternalMessageInfo -func (m *OperateSubTaskResponse) GetMeta() *CommonWorkerResponse { - if m != nil { - return m.Meta - } - return nil -} - func (m *OperateSubTaskResponse) GetOp() TaskOp { if m != nil { return m.Op @@ -499,115 +482,25 @@ func (m *OperateSubTaskResponse) GetOp() TaskOp { return TaskOp_InvalidOp } -func (m *OperateSubTaskResponse) GetLogID() int64 { +func (m *OperateSubTaskResponse) GetResult() bool { if m != nil { - return m.LogID - } - return 0 -} - -type QueryTaskOperationRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - LogID int64 `protobuf:"varint,2,opt,name=logID,proto3" json:"logID,omitempty"` -} - -func (m *QueryTaskOperationRequest) Reset() { *m = QueryTaskOperationRequest{} } -func (m *QueryTaskOperationRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTaskOperationRequest) ProtoMessage() {} -func (*QueryTaskOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{5} -} -func (m *QueryTaskOperationRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTaskOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTaskOperationRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.Result } + return false } -func (m *QueryTaskOperationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTaskOperationRequest.Merge(m, src) -} -func (m *QueryTaskOperationRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTaskOperationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTaskOperationRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTaskOperationRequest proto.InternalMessageInfo -func (m *QueryTaskOperationRequest) GetName() string { +func (m *OperateSubTaskResponse) GetWorker() string { if m != nil { - return m.Name + return m.Worker } return "" } -func (m *QueryTaskOperationRequest) GetLogID() int64 { - if m != nil { - return m.LogID - } - return 0 -} - -type QueryTaskOperationResponse struct { - Meta *CommonWorkerResponse `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` - Log *TaskLog `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"` -} - -func (m *QueryTaskOperationResponse) Reset() { *m = QueryTaskOperationResponse{} } -func (m *QueryTaskOperationResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTaskOperationResponse) ProtoMessage() {} -func (*QueryTaskOperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{6} -} -func (m *QueryTaskOperationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTaskOperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTaskOperationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTaskOperationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTaskOperationResponse.Merge(m, src) -} -func (m *QueryTaskOperationResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTaskOperationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTaskOperationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTaskOperationResponse proto.InternalMessageInfo - -func (m *QueryTaskOperationResponse) GetMeta() *CommonWorkerResponse { - if m != nil { - return m.Meta - } - return nil -} - -func (m *QueryTaskOperationResponse) GetLog() *TaskLog { +func (m *OperateSubTaskResponse) GetMsg() string { if m != nil { - return m.Log + return m.Msg } - return nil + return "" } type UpdateSubTaskRequest struct { @@ -618,7 +511,7 @@ func (m *UpdateSubTaskRequest) Reset() { *m = UpdateSubTaskRequest{} } func (m *UpdateSubTaskRequest) String() string { return proto.CompactTextString(m) } func (*UpdateSubTaskRequest) ProtoMessage() {} func (*UpdateSubTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{7} + return fileDescriptor_dmworker_84482ac67274de9a, []int{5} } func (m *UpdateSubTaskRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -628,15 +521,15 @@ func (m *UpdateSubTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_UpdateSubTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UpdateSubTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateSubTaskRequest.Merge(m, src) +func (dst *UpdateSubTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateSubTaskRequest.Merge(dst, src) } func (m *UpdateSubTaskRequest) XXX_Size() int { return m.Size() @@ -662,7 +555,7 @@ func (m *QueryStatusRequest) Reset() { *m = QueryStatusRequest{} } func (m *QueryStatusRequest) String() string { return proto.CompactTextString(m) } func (*QueryStatusRequest) ProtoMessage() {} func (*QueryStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{8} + return fileDescriptor_dmworker_84482ac67274de9a, []int{6} } func (m *QueryStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -672,15 +565,15 @@ func (m *QueryStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_QueryStatusRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStatusRequest.Merge(m, src) +func (dst *QueryStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatusRequest.Merge(dst, src) } func (m *QueryStatusRequest) XXX_Size() int { return m.Size() @@ -706,7 +599,7 @@ func (m *QueryErrorRequest) Reset() { *m = QueryErrorRequest{} } func (m *QueryErrorRequest) String() string { return proto.CompactTextString(m) } func (*QueryErrorRequest) ProtoMessage() {} func (*QueryErrorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{9} + return fileDescriptor_dmworker_84482ac67274de9a, []int{7} } func (m *QueryErrorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -716,15 +609,15 @@ func (m *QueryErrorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_QueryErrorRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryErrorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryErrorRequest.Merge(m, src) +func (dst *QueryErrorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryErrorRequest.Merge(dst, src) } func (m *QueryErrorRequest) XXX_Size() int { return m.Size() @@ -746,7 +639,7 @@ func (m *QueryErrorRequest) GetName() string { type HandleSubTaskSQLsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Op SQLOp `protobuf:"varint,2,opt,name=op,proto3,enum=pb.SQLOp" json:"op,omitempty"` - Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + Args []string `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"` BinlogPos string `protobuf:"bytes,4,opt,name=binlogPos,proto3" json:"binlogPos,omitempty"` SqlPattern string `protobuf:"bytes,5,opt,name=sqlPattern,proto3" json:"sqlPattern,omitempty"` } @@ -755,7 +648,7 @@ func (m *HandleSubTaskSQLsRequest) Reset() { *m = HandleSubTaskSQLsReque func (m *HandleSubTaskSQLsRequest) String() string { return proto.CompactTextString(m) } func (*HandleSubTaskSQLsRequest) ProtoMessage() {} func (*HandleSubTaskSQLsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{10} + return fileDescriptor_dmworker_84482ac67274de9a, []int{8} } func (m *HandleSubTaskSQLsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -765,15 +658,15 @@ func (m *HandleSubTaskSQLsRequest) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_HandleSubTaskSQLsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *HandleSubTaskSQLsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleSubTaskSQLsRequest.Merge(m, src) +func (dst *HandleSubTaskSQLsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HandleSubTaskSQLsRequest.Merge(dst, src) } func (m *HandleSubTaskSQLsRequest) XXX_Size() int { return m.Size() @@ -829,7 +722,7 @@ func (m *CommonWorkerResponse) Reset() { *m = CommonWorkerResponse{} } func (m *CommonWorkerResponse) String() string { return proto.CompactTextString(m) } func (*CommonWorkerResponse) ProtoMessage() {} func (*CommonWorkerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{11} + return fileDescriptor_dmworker_84482ac67274de9a, []int{9} } func (m *CommonWorkerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -839,15 +732,15 @@ func (m *CommonWorkerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_CommonWorkerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CommonWorkerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommonWorkerResponse.Merge(m, src) +func (dst *CommonWorkerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonWorkerResponse.Merge(dst, src) } func (m *CommonWorkerResponse) XXX_Size() int { return m.Size() @@ -885,8 +778,8 @@ type QueryStatusResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Worker string `protobuf:"bytes,2,opt,name=worker,proto3" json:"worker,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` - SubTaskStatus []*SubTaskStatus `protobuf:"bytes,4,rep,name=subTaskStatus,proto3" json:"subTaskStatus,omitempty"` - RelayStatus *RelayStatus `protobuf:"bytes,5,opt,name=relayStatus,proto3" json:"relayStatus,omitempty"` + SubTaskStatus []*SubTaskStatus `protobuf:"bytes,4,rep,name=subTaskStatus" json:"subTaskStatus,omitempty"` + RelayStatus *RelayStatus `protobuf:"bytes,5,opt,name=relayStatus" json:"relayStatus,omitempty"` SourceID string `protobuf:"bytes,6,opt,name=sourceID,proto3" json:"sourceID,omitempty"` } @@ -894,7 +787,7 @@ func (m *QueryStatusResponse) Reset() { *m = QueryStatusResponse{} } func (m *QueryStatusResponse) String() string { return proto.CompactTextString(m) } func (*QueryStatusResponse) ProtoMessage() {} func (*QueryStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{12} + return fileDescriptor_dmworker_84482ac67274de9a, []int{10} } func (m *QueryStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -904,15 +797,15 @@ func (m *QueryStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_QueryStatusResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStatusResponse.Merge(m, src) +func (dst *QueryStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStatusResponse.Merge(dst, src) } func (m *QueryStatusResponse) XXX_Size() int { return m.Size() @@ -970,15 +863,15 @@ type QueryErrorResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Worker string `protobuf:"bytes,2,opt,name=worker,proto3" json:"worker,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` - SubTaskError []*SubTaskError `protobuf:"bytes,4,rep,name=subTaskError,proto3" json:"subTaskError,omitempty"` - RelayError *RelayError `protobuf:"bytes,5,opt,name=RelayError,proto3" json:"RelayError,omitempty"` + SubTaskError []*SubTaskError `protobuf:"bytes,4,rep,name=subTaskError" json:"subTaskError,omitempty"` + RelayError *RelayError `protobuf:"bytes,5,opt,name=RelayError" json:"RelayError,omitempty"` } func (m *QueryErrorResponse) Reset() { *m = QueryErrorResponse{} } func (m *QueryErrorResponse) String() string { return proto.CompactTextString(m) } func (*QueryErrorResponse) ProtoMessage() {} func (*QueryErrorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{13} + return fileDescriptor_dmworker_84482ac67274de9a, []int{11} } func (m *QueryErrorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -988,15 +881,15 @@ func (m *QueryErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_QueryErrorResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryErrorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryErrorResponse.Merge(m, src) +func (dst *QueryErrorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryErrorResponse.Merge(dst, src) } func (m *QueryErrorResponse) XXX_Size() int { return m.Size() @@ -1057,7 +950,7 @@ func (m *CheckStatus) Reset() { *m = CheckStatus{} } func (m *CheckStatus) String() string { return proto.CompactTextString(m) } func (*CheckStatus) ProtoMessage() {} func (*CheckStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{14} + return fileDescriptor_dmworker_84482ac67274de9a, []int{12} } func (m *CheckStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1067,15 +960,15 @@ func (m *CheckStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_CheckStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CheckStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckStatus.Merge(m, src) +func (dst *CheckStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_CheckStatus.Merge(dst, src) } func (m *CheckStatus) XXX_Size() int { return m.Size() @@ -1137,7 +1030,7 @@ func (m *DumpStatus) Reset() { *m = DumpStatus{} } func (m *DumpStatus) String() string { return proto.CompactTextString(m) } func (*DumpStatus) ProtoMessage() {} func (*DumpStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{15} + return fileDescriptor_dmworker_84482ac67274de9a, []int{13} } func (m *DumpStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1147,15 +1040,15 @@ func (m *DumpStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DumpStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DumpStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DumpStatus.Merge(m, src) +func (dst *DumpStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_DumpStatus.Merge(dst, src) } func (m *DumpStatus) XXX_Size() int { return m.Size() @@ -1178,7 +1071,7 @@ func (m *LoadStatus) Reset() { *m = LoadStatus{} } func (m *LoadStatus) String() string { return proto.CompactTextString(m) } func (*LoadStatus) ProtoMessage() {} func (*LoadStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{16} + return fileDescriptor_dmworker_84482ac67274de9a, []int{14} } func (m *LoadStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1188,15 +1081,15 @@ func (m *LoadStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LoadStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *LoadStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadStatus.Merge(m, src) +func (dst *LoadStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadStatus.Merge(dst, src) } func (m *LoadStatus) XXX_Size() int { return m.Size() @@ -1243,17 +1136,17 @@ func (m *LoadStatus) GetMetaBinlog() string { // unsynced: unsynced source tables type ShardingGroup struct { Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - DDLs []string `protobuf:"bytes,2,rep,name=DDLs,proto3" json:"DDLs,omitempty"` + DDLs []string `protobuf:"bytes,2,rep,name=DDLs" json:"DDLs,omitempty"` FirstPos string `protobuf:"bytes,3,opt,name=firstPos,proto3" json:"firstPos,omitempty"` - Synced []string `protobuf:"bytes,4,rep,name=synced,proto3" json:"synced,omitempty"` - Unsynced []string `protobuf:"bytes,5,rep,name=unsynced,proto3" json:"unsynced,omitempty"` + Synced []string `protobuf:"bytes,4,rep,name=synced" json:"synced,omitempty"` + Unsynced []string `protobuf:"bytes,5,rep,name=unsynced" json:"unsynced,omitempty"` } func (m *ShardingGroup) Reset() { *m = ShardingGroup{} } func (m *ShardingGroup) String() string { return proto.CompactTextString(m) } func (*ShardingGroup) ProtoMessage() {} func (*ShardingGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{17} + return fileDescriptor_dmworker_84482ac67274de9a, []int{15} } func (m *ShardingGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1263,15 +1156,15 @@ func (m *ShardingGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ShardingGroup.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ShardingGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShardingGroup.Merge(m, src) +func (dst *ShardingGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShardingGroup.Merge(dst, src) } func (m *ShardingGroup) XXX_Size() int { return m.Size() @@ -1326,8 +1219,8 @@ type SyncStatus struct { MasterBinlogGtid string `protobuf:"bytes,5,opt,name=masterBinlogGtid,proto3" json:"masterBinlogGtid,omitempty"` SyncerBinlog string `protobuf:"bytes,6,opt,name=syncerBinlog,proto3" json:"syncerBinlog,omitempty"` SyncerBinlogGtid string `protobuf:"bytes,7,opt,name=syncerBinlogGtid,proto3" json:"syncerBinlogGtid,omitempty"` - BlockingDDLs []string `protobuf:"bytes,8,rep,name=blockingDDLs,proto3" json:"blockingDDLs,omitempty"` - UnresolvedGroups []*ShardingGroup `protobuf:"bytes,9,rep,name=unresolvedGroups,proto3" json:"unresolvedGroups,omitempty"` + BlockingDDLs []string `protobuf:"bytes,8,rep,name=blockingDDLs" json:"blockingDDLs,omitempty"` + UnresolvedGroups []*ShardingGroup `protobuf:"bytes,9,rep,name=unresolvedGroups" json:"unresolvedGroups,omitempty"` Synced bool `protobuf:"varint,10,opt,name=synced,proto3" json:"synced,omitempty"` } @@ -1335,7 +1228,7 @@ func (m *SyncStatus) Reset() { *m = SyncStatus{} } func (m *SyncStatus) String() string { return proto.CompactTextString(m) } func (*SyncStatus) ProtoMessage() {} func (*SyncStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{18} + return fileDescriptor_dmworker_84482ac67274de9a, []int{16} } func (m *SyncStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1345,15 +1238,15 @@ func (m *SyncStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SyncStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncStatus.Merge(m, src) +func (dst *SyncStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncStatus.Merge(dst, src) } func (m *SyncStatus) XXX_Size() int { return m.Size() @@ -1443,14 +1336,14 @@ type RelayStatus struct { RelayBinlogGtid string `protobuf:"bytes,5,opt,name=relayBinlogGtid,proto3" json:"relayBinlogGtid,omitempty"` RelayCatchUpMaster bool `protobuf:"varint,6,opt,name=relayCatchUpMaster,proto3" json:"relayCatchUpMaster,omitempty"` Stage Stage `protobuf:"varint,7,opt,name=stage,proto3,enum=pb.Stage" json:"stage,omitempty"` - Result *ProcessResult `protobuf:"bytes,8,opt,name=result,proto3" json:"result,omitempty"` + Result *ProcessResult `protobuf:"bytes,8,opt,name=result" json:"result,omitempty"` } func (m *RelayStatus) Reset() { *m = RelayStatus{} } func (m *RelayStatus) String() string { return proto.CompactTextString(m) } func (*RelayStatus) ProtoMessage() {} func (*RelayStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{19} + return fileDescriptor_dmworker_84482ac67274de9a, []int{17} } func (m *RelayStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1460,15 +1353,15 @@ func (m *RelayStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_RelayStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RelayStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RelayStatus.Merge(m, src) +func (dst *RelayStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayStatus.Merge(dst, src) } func (m *RelayStatus) XXX_Size() int { return m.Size() @@ -1549,7 +1442,7 @@ type SubTaskStatus struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Stage Stage `protobuf:"varint,2,opt,name=stage,proto3,enum=pb.Stage" json:"stage,omitempty"` Unit UnitType `protobuf:"varint,3,opt,name=unit,proto3,enum=pb.UnitType" json:"unit,omitempty"` - Result *ProcessResult `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` + Result *ProcessResult `protobuf:"bytes,4,opt,name=result" json:"result,omitempty"` UnresolvedDDLLockID string `protobuf:"bytes,5,opt,name=unresolvedDDLLockID,proto3" json:"unresolvedDDLLockID,omitempty"` // Types that are valid to be assigned to Status: // *SubTaskStatus_Msg @@ -1564,7 +1457,7 @@ func (m *SubTaskStatus) Reset() { *m = SubTaskStatus{} } func (m *SubTaskStatus) String() string { return proto.CompactTextString(m) } func (*SubTaskStatus) ProtoMessage() {} func (*SubTaskStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{20} + return fileDescriptor_dmworker_84482ac67274de9a, []int{18} } func (m *SubTaskStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1574,15 +1467,15 @@ func (m *SubTaskStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_SubTaskStatus.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SubTaskStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubTaskStatus.Merge(m, src) +func (dst *SubTaskStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubTaskStatus.Merge(dst, src) } func (m *SubTaskStatus) XXX_Size() int { return m.Size() @@ -1600,19 +1493,19 @@ type isSubTaskStatus_Status interface { } type SubTaskStatus_Msg struct { - Msg string `protobuf:"bytes,6,opt,name=msg,proto3,oneof" json:"msg,omitempty"` + Msg string `protobuf:"bytes,6,opt,name=msg,proto3,oneof"` } type SubTaskStatus_Check struct { - Check *CheckStatus `protobuf:"bytes,7,opt,name=check,proto3,oneof" json:"check,omitempty"` + Check *CheckStatus `protobuf:"bytes,7,opt,name=check,oneof"` } type SubTaskStatus_Dump struct { - Dump *DumpStatus `protobuf:"bytes,8,opt,name=dump,proto3,oneof" json:"dump,omitempty"` + Dump *DumpStatus `protobuf:"bytes,8,opt,name=dump,oneof"` } type SubTaskStatus_Load struct { - Load *LoadStatus `protobuf:"bytes,9,opt,name=load,proto3,oneof" json:"load,omitempty"` + Load *LoadStatus `protobuf:"bytes,9,opt,name=load,oneof"` } type SubTaskStatus_Sync struct { - Sync *SyncStatus `protobuf:"bytes,10,opt,name=sync,proto3,oneof" json:"sync,omitempty"` + Sync *SyncStatus `protobuf:"bytes,10,opt,name=sync,oneof"` } func (*SubTaskStatus_Msg) isSubTaskStatus_Status() {} @@ -1698,9 +1591,9 @@ func (m *SubTaskStatus) GetSync() *SyncStatus { return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SubTaskStatus) XXX_OneofWrappers() []interface{} { - return []interface{}{ +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SubTaskStatus) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SubTaskStatus_OneofMarshaler, _SubTaskStatus_OneofUnmarshaler, _SubTaskStatus_OneofSizer, []interface{}{ (*SubTaskStatus_Msg)(nil), (*SubTaskStatus_Check)(nil), (*SubTaskStatus_Dump)(nil), @@ -1709,16 +1602,132 @@ func (*SubTaskStatus) XXX_OneofWrappers() []interface{} { } } +func _SubTaskStatus_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SubTaskStatus) + // status + switch x := m.Status.(type) { + case *SubTaskStatus_Msg: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Msg) + case *SubTaskStatus_Check: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Check); err != nil { + return err + } + case *SubTaskStatus_Dump: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Dump); err != nil { + return err + } + case *SubTaskStatus_Load: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Load); err != nil { + return err + } + case *SubTaskStatus_Sync: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Sync); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SubTaskStatus.Status has unexpected type %T", x) + } + return nil +} + +func _SubTaskStatus_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SubTaskStatus) + switch tag { + case 6: // status.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Status = &SubTaskStatus_Msg{x} + return true, err + case 7: // status.check + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(CheckStatus) + err := b.DecodeMessage(msg) + m.Status = &SubTaskStatus_Check{msg} + return true, err + case 8: // status.dump + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DumpStatus) + err := b.DecodeMessage(msg) + m.Status = &SubTaskStatus_Dump{msg} + return true, err + case 9: // status.load + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(LoadStatus) + err := b.DecodeMessage(msg) + m.Status = &SubTaskStatus_Load{msg} + return true, err + case 10: // status.sync + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SyncStatus) + err := b.DecodeMessage(msg) + m.Status = &SubTaskStatus_Sync{msg} + return true, err + default: + return false, nil + } +} + +func _SubTaskStatus_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SubTaskStatus) + // status + switch x := m.Status.(type) { + case *SubTaskStatus_Msg: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Msg))) + n += len(x.Msg) + case *SubTaskStatus_Check: + s := proto.Size(x.Check) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskStatus_Dump: + s := proto.Size(x.Dump) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskStatus_Load: + s := proto.Size(x.Load) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskStatus_Sync: + s := proto.Size(x.Sync) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + // SubTaskStatusList used for internal jsonpb marshal type SubTaskStatusList struct { - Status []*SubTaskStatus `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"` + Status []*SubTaskStatus `protobuf:"bytes,1,rep,name=status" json:"status,omitempty"` } func (m *SubTaskStatusList) Reset() { *m = SubTaskStatusList{} } func (m *SubTaskStatusList) String() string { return proto.CompactTextString(m) } func (*SubTaskStatusList) ProtoMessage() {} func (*SubTaskStatusList) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{21} + return fileDescriptor_dmworker_84482ac67274de9a, []int{19} } func (m *SubTaskStatusList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1728,15 +1737,15 @@ func (m *SubTaskStatusList) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_SubTaskStatusList.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SubTaskStatusList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubTaskStatusList.Merge(m, src) +func (dst *SubTaskStatusList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubTaskStatusList.Merge(dst, src) } func (m *SubTaskStatusList) XXX_Size() int { return m.Size() @@ -1764,7 +1773,7 @@ func (m *CheckError) Reset() { *m = CheckError{} } func (m *CheckError) String() string { return proto.CompactTextString(m) } func (*CheckError) ProtoMessage() {} func (*CheckError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{22} + return fileDescriptor_dmworker_84482ac67274de9a, []int{20} } func (m *CheckError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1774,15 +1783,15 @@ func (m *CheckError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CheckError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CheckError) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckError.Merge(m, src) +func (dst *CheckError) XXX_Merge(src proto.Message) { + xxx_messageInfo_CheckError.Merge(dst, src) } func (m *CheckError) XXX_Size() int { return m.Size() @@ -1810,7 +1819,7 @@ func (m *DumpError) Reset() { *m = DumpError{} } func (m *DumpError) String() string { return proto.CompactTextString(m) } func (*DumpError) ProtoMessage() {} func (*DumpError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{23} + return fileDescriptor_dmworker_84482ac67274de9a, []int{21} } func (m *DumpError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1820,15 +1829,15 @@ func (m *DumpError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DumpError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DumpError) XXX_Merge(src proto.Message) { - xxx_messageInfo_DumpError.Merge(m, src) +func (dst *DumpError) XXX_Merge(src proto.Message) { + xxx_messageInfo_DumpError.Merge(dst, src) } func (m *DumpError) XXX_Size() int { return m.Size() @@ -1855,7 +1864,7 @@ func (m *LoadError) Reset() { *m = LoadError{} } func (m *LoadError) String() string { return proto.CompactTextString(m) } func (*LoadError) ProtoMessage() {} func (*LoadError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{24} + return fileDescriptor_dmworker_84482ac67274de9a, []int{22} } func (m *LoadError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1865,15 +1874,15 @@ func (m *LoadError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LoadError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *LoadError) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadError.Merge(m, src) +func (dst *LoadError) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadError.Merge(dst, src) } func (m *LoadError) XXX_Size() int { return m.Size() @@ -1902,7 +1911,7 @@ func (m *SyncSQLError) Reset() { *m = SyncSQLError{} } func (m *SyncSQLError) String() string { return proto.CompactTextString(m) } func (*SyncSQLError) ProtoMessage() {} func (*SyncSQLError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{25} + return fileDescriptor_dmworker_84482ac67274de9a, []int{23} } func (m *SyncSQLError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1912,15 +1921,15 @@ func (m *SyncSQLError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_SyncSQLError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncSQLError) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncSQLError.Merge(m, src) +func (dst *SyncSQLError) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncSQLError.Merge(dst, src) } func (m *SyncSQLError) XXX_Size() int { return m.Size() @@ -1954,14 +1963,14 @@ func (m *SyncSQLError) GetErrorSQL() string { // SyncError represents error list for sync unit type SyncError struct { - Errors []*SyncSQLError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` + Errors []*SyncSQLError `protobuf:"bytes,1,rep,name=errors" json:"errors,omitempty"` } func (m *SyncError) Reset() { *m = SyncError{} } func (m *SyncError) String() string { return proto.CompactTextString(m) } func (*SyncError) ProtoMessage() {} func (*SyncError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{26} + return fileDescriptor_dmworker_84482ac67274de9a, []int{24} } func (m *SyncError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1971,15 +1980,15 @@ func (m *SyncError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_SyncError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncError) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncError.Merge(m, src) +func (dst *SyncError) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncError.Merge(dst, src) } func (m *SyncError) XXX_Size() int { return m.Size() @@ -2006,7 +2015,7 @@ func (m *RelayError) Reset() { *m = RelayError{} } func (m *RelayError) String() string { return proto.CompactTextString(m) } func (*RelayError) ProtoMessage() {} func (*RelayError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{27} + return fileDescriptor_dmworker_84482ac67274de9a, []int{25} } func (m *RelayError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2016,15 +2025,15 @@ func (m *RelayError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RelayError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *RelayError) XXX_Merge(src proto.Message) { - xxx_messageInfo_RelayError.Merge(m, src) +func (dst *RelayError) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayError.Merge(dst, src) } func (m *RelayError) XXX_Size() int { return m.Size() @@ -2065,7 +2074,7 @@ func (m *SubTaskError) Reset() { *m = SubTaskError{} } func (m *SubTaskError) String() string { return proto.CompactTextString(m) } func (*SubTaskError) ProtoMessage() {} func (*SubTaskError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{28} + return fileDescriptor_dmworker_84482ac67274de9a, []int{26} } func (m *SubTaskError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2075,15 +2084,15 @@ func (m *SubTaskError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_SubTaskError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SubTaskError) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubTaskError.Merge(m, src) +func (dst *SubTaskError) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubTaskError.Merge(dst, src) } func (m *SubTaskError) XXX_Size() int { return m.Size() @@ -2101,19 +2110,19 @@ type isSubTaskError_Error interface { } type SubTaskError_Msg struct { - Msg string `protobuf:"bytes,4,opt,name=msg,proto3,oneof" json:"msg,omitempty"` + Msg string `protobuf:"bytes,4,opt,name=msg,proto3,oneof"` } type SubTaskError_Check struct { - Check *CheckError `protobuf:"bytes,5,opt,name=check,proto3,oneof" json:"check,omitempty"` + Check *CheckError `protobuf:"bytes,5,opt,name=check,oneof"` } type SubTaskError_Dump struct { - Dump *DumpError `protobuf:"bytes,6,opt,name=dump,proto3,oneof" json:"dump,omitempty"` + Dump *DumpError `protobuf:"bytes,6,opt,name=dump,oneof"` } type SubTaskError_Load struct { - Load *LoadError `protobuf:"bytes,7,opt,name=load,proto3,oneof" json:"load,omitempty"` + Load *LoadError `protobuf:"bytes,7,opt,name=load,oneof"` } type SubTaskError_Sync struct { - Sync *SyncError `protobuf:"bytes,8,opt,name=sync,proto3,oneof" json:"sync,omitempty"` + Sync *SyncError `protobuf:"bytes,8,opt,name=sync,oneof"` } func (*SubTaskError_Msg) isSubTaskError_Error() {} @@ -2185,9 +2194,9 @@ func (m *SubTaskError) GetSync() *SyncError { return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SubTaskError) XXX_OneofWrappers() []interface{} { - return []interface{}{ +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SubTaskError) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SubTaskError_OneofMarshaler, _SubTaskError_OneofUnmarshaler, _SubTaskError_OneofSizer, []interface{}{ (*SubTaskError_Msg)(nil), (*SubTaskError_Check)(nil), (*SubTaskError_Dump)(nil), @@ -2196,16 +2205,132 @@ func (*SubTaskError) XXX_OneofWrappers() []interface{} { } } +func _SubTaskError_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SubTaskError) + // error + switch x := m.Error.(type) { + case *SubTaskError_Msg: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Msg) + case *SubTaskError_Check: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Check); err != nil { + return err + } + case *SubTaskError_Dump: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Dump); err != nil { + return err + } + case *SubTaskError_Load: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Load); err != nil { + return err + } + case *SubTaskError_Sync: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Sync); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SubTaskError.Error has unexpected type %T", x) + } + return nil +} + +func _SubTaskError_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SubTaskError) + switch tag { + case 4: // error.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Error = &SubTaskError_Msg{x} + return true, err + case 5: // error.check + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(CheckError) + err := b.DecodeMessage(msg) + m.Error = &SubTaskError_Check{msg} + return true, err + case 6: // error.dump + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DumpError) + err := b.DecodeMessage(msg) + m.Error = &SubTaskError_Dump{msg} + return true, err + case 7: // error.load + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(LoadError) + err := b.DecodeMessage(msg) + m.Error = &SubTaskError_Load{msg} + return true, err + case 8: // error.sync + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SyncError) + err := b.DecodeMessage(msg) + m.Error = &SubTaskError_Sync{msg} + return true, err + default: + return false, nil + } +} + +func _SubTaskError_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SubTaskError) + // error + switch x := m.Error.(type) { + case *SubTaskError_Msg: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Msg))) + n += len(x.Msg) + case *SubTaskError_Check: + s := proto.Size(x.Check) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskError_Dump: + s := proto.Size(x.Dump) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskError_Load: + s := proto.Size(x.Load) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SubTaskError_Sync: + s := proto.Size(x.Sync) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + // SubTaskErrorList used for internal jsonpb marshal type SubTaskErrorList struct { - Error []*SubTaskError `protobuf:"bytes,1,rep,name=error,proto3" json:"error,omitempty"` + Error []*SubTaskError `protobuf:"bytes,1,rep,name=error" json:"error,omitempty"` } func (m *SubTaskErrorList) Reset() { *m = SubTaskErrorList{} } func (m *SubTaskErrorList) String() string { return proto.CompactTextString(m) } func (*SubTaskErrorList) ProtoMessage() {} func (*SubTaskErrorList) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{29} + return fileDescriptor_dmworker_84482ac67274de9a, []int{27} } func (m *SubTaskErrorList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2215,15 +2340,15 @@ func (m *SubTaskErrorList) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_SubTaskErrorList.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SubTaskErrorList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubTaskErrorList.Merge(m, src) +func (dst *SubTaskErrorList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubTaskErrorList.Merge(dst, src) } func (m *SubTaskErrorList) XXX_Size() int { return m.Size() @@ -2247,7 +2372,7 @@ func (m *SubTaskErrorList) GetError() []*SubTaskError { // errors: includes all (potential) errors occured when processing type ProcessResult struct { IsCanceled bool `protobuf:"varint,1,opt,name=isCanceled,proto3" json:"isCanceled,omitempty"` - Errors []*ProcessError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` + Errors []*ProcessError `protobuf:"bytes,2,rep,name=errors" json:"errors,omitempty"` Detail []byte `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` } @@ -2255,7 +2380,7 @@ func (m *ProcessResult) Reset() { *m = ProcessResult{} } func (m *ProcessResult) String() string { return proto.CompactTextString(m) } func (*ProcessResult) ProtoMessage() {} func (*ProcessResult) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{30} + return fileDescriptor_dmworker_84482ac67274de9a, []int{28} } func (m *ProcessResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2265,15 +2390,15 @@ func (m *ProcessResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ProcessResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ProcessResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProcessResult.Merge(m, src) +func (dst *ProcessResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessResult.Merge(dst, src) } func (m *ProcessResult) XXX_Size() int { return m.Size() @@ -2321,7 +2446,7 @@ func (m *TError) Reset() { *m = TError{} } func (m *TError) String() string { return proto.CompactTextString(m) } func (*TError) ProtoMessage() {} func (*TError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{31} + return fileDescriptor_dmworker_84482ac67274de9a, []int{29} } func (m *TError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2331,15 +2456,15 @@ func (m *TError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *TError) XXX_Merge(src proto.Message) { - xxx_messageInfo_TError.Merge(m, src) +func (dst *TError) XXX_Merge(src proto.Message) { + xxx_messageInfo_TError.Merge(dst, src) } func (m *TError) XXX_Size() int { return m.Size() @@ -2397,14 +2522,14 @@ func (m *TError) GetRawCause() string { type ProcessError struct { Type ErrorType `protobuf:"varint,1,opt,name=Type,proto3,enum=pb.ErrorType" json:"Type,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - Error *TError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Error *TError `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"` } func (m *ProcessError) Reset() { *m = ProcessError{} } func (m *ProcessError) String() string { return proto.CompactTextString(m) } func (*ProcessError) ProtoMessage() {} func (*ProcessError) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{32} + return fileDescriptor_dmworker_84482ac67274de9a, []int{30} } func (m *ProcessError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2414,15 +2539,15 @@ func (m *ProcessError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ProcessError.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ProcessError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProcessError.Merge(m, src) +func (dst *ProcessError) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessError.Merge(dst, src) } func (m *ProcessError) XXX_Size() int { return m.Size() @@ -2462,14 +2587,14 @@ type DDLInfo struct { Task string `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` - DDLs []string `protobuf:"bytes,4,rep,name=DDLs,proto3" json:"DDLs,omitempty"` + DDLs []string `protobuf:"bytes,4,rep,name=DDLs" json:"DDLs,omitempty"` } func (m *DDLInfo) Reset() { *m = DDLInfo{} } func (m *DDLInfo) String() string { return proto.CompactTextString(m) } func (*DDLInfo) ProtoMessage() {} func (*DDLInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{33} + return fileDescriptor_dmworker_84482ac67274de9a, []int{31} } func (m *DDLInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2479,15 +2604,15 @@ func (m *DDLInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DDLInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DDLInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DDLInfo.Merge(m, src) +func (dst *DDLInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DDLInfo.Merge(dst, src) } func (m *DDLInfo) XXX_Size() int { return m.Size() @@ -2538,7 +2663,7 @@ func (m *DDLLockInfo) Reset() { *m = DDLLockInfo{} } func (m *DDLLockInfo) String() string { return proto.CompactTextString(m) } func (*DDLLockInfo) ProtoMessage() {} func (*DDLLockInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{34} + return fileDescriptor_dmworker_84482ac67274de9a, []int{32} } func (m *DDLLockInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2548,15 +2673,15 @@ func (m *DDLLockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_DDLLockInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *DDLLockInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DDLLockInfo.Merge(m, src) +func (dst *DDLLockInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DDLLockInfo.Merge(dst, src) } func (m *DDLLockInfo) XXX_Size() int { return m.Size() @@ -2587,14 +2712,14 @@ type ExecDDLRequest struct { LockID string `protobuf:"bytes,2,opt,name=lockID,proto3" json:"lockID,omitempty"` Exec bool `protobuf:"varint,3,opt,name=exec,proto3" json:"exec,omitempty"` TraceGID string `protobuf:"bytes,4,opt,name=traceGID,proto3" json:"traceGID,omitempty"` - DDLs []string `protobuf:"bytes,5,rep,name=DDLs,proto3" json:"DDLs,omitempty"` + DDLs []string `protobuf:"bytes,5,rep,name=DDLs" json:"DDLs,omitempty"` } func (m *ExecDDLRequest) Reset() { *m = ExecDDLRequest{} } func (m *ExecDDLRequest) String() string { return proto.CompactTextString(m) } func (*ExecDDLRequest) ProtoMessage() {} func (*ExecDDLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{35} + return fileDescriptor_dmworker_84482ac67274de9a, []int{33} } func (m *ExecDDLRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2604,15 +2729,15 @@ func (m *ExecDDLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ExecDDLRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ExecDDLRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecDDLRequest.Merge(m, src) +func (dst *ExecDDLRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecDDLRequest.Merge(dst, src) } func (m *ExecDDLRequest) XXX_Size() int { return m.Size() @@ -2675,7 +2800,7 @@ func (m *BreakDDLLockRequest) Reset() { *m = BreakDDLLockRequest{} } func (m *BreakDDLLockRequest) String() string { return proto.CompactTextString(m) } func (*BreakDDLLockRequest) ProtoMessage() {} func (*BreakDDLLockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{36} + return fileDescriptor_dmworker_84482ac67274de9a, []int{34} } func (m *BreakDDLLockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2685,15 +2810,15 @@ func (m *BreakDDLLockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_BreakDDLLockRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BreakDDLLockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BreakDDLLockRequest.Merge(m, src) +func (dst *BreakDDLLockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BreakDDLLockRequest.Merge(dst, src) } func (m *BreakDDLLockRequest) XXX_Size() int { return m.Size() @@ -2740,7 +2865,7 @@ func (m *SwitchRelayMasterRequest) Reset() { *m = SwitchRelayMasterReque func (m *SwitchRelayMasterRequest) String() string { return proto.CompactTextString(m) } func (*SwitchRelayMasterRequest) ProtoMessage() {} func (*SwitchRelayMasterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{37} + return fileDescriptor_dmworker_84482ac67274de9a, []int{35} } func (m *SwitchRelayMasterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2750,15 +2875,15 @@ func (m *SwitchRelayMasterRequest) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_SwitchRelayMasterRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SwitchRelayMasterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwitchRelayMasterRequest.Merge(m, src) +func (dst *SwitchRelayMasterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwitchRelayMasterRequest.Merge(dst, src) } func (m *SwitchRelayMasterRequest) XXX_Size() int { return m.Size() @@ -2778,7 +2903,7 @@ func (m *OperateRelayRequest) Reset() { *m = OperateRelayRequest{} } func (m *OperateRelayRequest) String() string { return proto.CompactTextString(m) } func (*OperateRelayRequest) ProtoMessage() {} func (*OperateRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{38} + return fileDescriptor_dmworker_84482ac67274de9a, []int{36} } func (m *OperateRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2788,15 +2913,15 @@ func (m *OperateRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_OperateRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateRelayRequest.Merge(m, src) +func (dst *OperateRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateRelayRequest.Merge(dst, src) } func (m *OperateRelayRequest) XXX_Size() int { return m.Size() @@ -2825,7 +2950,7 @@ func (m *OperateRelayResponse) Reset() { *m = OperateRelayResponse{} } func (m *OperateRelayResponse) String() string { return proto.CompactTextString(m) } func (*OperateRelayResponse) ProtoMessage() {} func (*OperateRelayResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{39} + return fileDescriptor_dmworker_84482ac67274de9a, []int{37} } func (m *OperateRelayResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2835,15 +2960,15 @@ func (m *OperateRelayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_OperateRelayResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *OperateRelayResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OperateRelayResponse.Merge(m, src) +func (dst *OperateRelayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperateRelayResponse.Merge(dst, src) } func (m *OperateRelayResponse) XXX_Size() int { return m.Size() @@ -2898,7 +3023,7 @@ func (m *PurgeRelayRequest) Reset() { *m = PurgeRelayRequest{} } func (m *PurgeRelayRequest) String() string { return proto.CompactTextString(m) } func (*PurgeRelayRequest) ProtoMessage() {} func (*PurgeRelayRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{40} + return fileDescriptor_dmworker_84482ac67274de9a, []int{38} } func (m *PurgeRelayRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2908,15 +3033,15 @@ func (m *PurgeRelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_PurgeRelayRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *PurgeRelayRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PurgeRelayRequest.Merge(m, src) +func (dst *PurgeRelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PurgeRelayRequest.Merge(dst, src) } func (m *PurgeRelayRequest) XXX_Size() int { return m.Size() @@ -2962,7 +3087,7 @@ func (m *QueryWorkerConfigRequest) Reset() { *m = QueryWorkerConfigReque func (m *QueryWorkerConfigRequest) String() string { return proto.CompactTextString(m) } func (*QueryWorkerConfigRequest) ProtoMessage() {} func (*QueryWorkerConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{41} + return fileDescriptor_dmworker_84482ac67274de9a, []int{39} } func (m *QueryWorkerConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2972,15 +3097,15 @@ func (m *QueryWorkerConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_QueryWorkerConfigRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryWorkerConfigRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryWorkerConfigRequest.Merge(m, src) +func (dst *QueryWorkerConfigRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWorkerConfigRequest.Merge(dst, src) } func (m *QueryWorkerConfigRequest) XXX_Size() int { return m.Size() @@ -3003,7 +3128,7 @@ func (m *QueryWorkerConfigResponse) Reset() { *m = QueryWorkerConfigResp func (m *QueryWorkerConfigResponse) String() string { return proto.CompactTextString(m) } func (*QueryWorkerConfigResponse) ProtoMessage() {} func (*QueryWorkerConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{42} + return fileDescriptor_dmworker_84482ac67274de9a, []int{40} } func (m *QueryWorkerConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3013,15 +3138,15 @@ func (m *QueryWorkerConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_QueryWorkerConfigResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *QueryWorkerConfigResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryWorkerConfigResponse.Merge(m, src) +func (dst *QueryWorkerConfigResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWorkerConfigResponse.Merge(dst, src) } func (m *QueryWorkerConfigResponse) XXX_Size() int { return m.Size() @@ -3067,165 +3192,12 @@ func (m *QueryWorkerConfigResponse) GetContent() string { return "" } -type TaskMeta struct { - Op TaskOp `protobuf:"varint,1,opt,name=op,proto3,enum=pb.TaskOp" json:"op,omitempty"` - Stage Stage `protobuf:"varint,2,opt,name=stage,proto3,enum=pb.Stage" json:"stage,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Task []byte `protobuf:"bytes,4,opt,name=task,proto3" json:"task,omitempty"` -} - -func (m *TaskMeta) Reset() { *m = TaskMeta{} } -func (m *TaskMeta) String() string { return proto.CompactTextString(m) } -func (*TaskMeta) ProtoMessage() {} -func (*TaskMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{43} -} -func (m *TaskMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TaskMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TaskMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TaskMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaskMeta.Merge(m, src) -} -func (m *TaskMeta) XXX_Size() int { - return m.Size() -} -func (m *TaskMeta) XXX_DiscardUnknown() { - xxx_messageInfo_TaskMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_TaskMeta proto.InternalMessageInfo - -func (m *TaskMeta) GetOp() TaskOp { - if m != nil { - return m.Op - } - return TaskOp_InvalidOp -} - -func (m *TaskMeta) GetStage() Stage { - if m != nil { - return m.Stage - } - return Stage_InvalidStage -} - -func (m *TaskMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TaskMeta) GetTask() []byte { - if m != nil { - return m.Task - } - return nil -} - -type TaskLog struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Task *TaskMeta `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` - Ts int64 `protobuf:"varint,3,opt,name=ts,proto3" json:"ts,omitempty"` - // true means this log is applied successfully - Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` - Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` -} - -func (m *TaskLog) Reset() { *m = TaskLog{} } -func (m *TaskLog) String() string { return proto.CompactTextString(m) } -func (*TaskLog) ProtoMessage() {} -func (*TaskLog) Descriptor() ([]byte, []int) { - return fileDescriptor_51a1b9e17fd67b10, []int{44} -} -func (m *TaskLog) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TaskLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TaskLog.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TaskLog) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaskLog.Merge(m, src) -} -func (m *TaskLog) XXX_Size() int { - return m.Size() -} -func (m *TaskLog) XXX_DiscardUnknown() { - xxx_messageInfo_TaskLog.DiscardUnknown(m) -} - -var xxx_messageInfo_TaskLog proto.InternalMessageInfo - -func (m *TaskLog) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *TaskLog) GetTask() *TaskMeta { - if m != nil { - return m.Task - } - return nil -} - -func (m *TaskLog) GetTs() int64 { - if m != nil { - return m.Ts - } - return 0 -} - -func (m *TaskLog) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *TaskLog) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - func init() { - proto.RegisterEnum("pb.TaskOp", TaskOp_name, TaskOp_value) - proto.RegisterEnum("pb.SQLOp", SQLOp_name, SQLOp_value) - proto.RegisterEnum("pb.Stage", Stage_name, Stage_value) - proto.RegisterEnum("pb.UnitType", UnitType_name, UnitType_value) - proto.RegisterEnum("pb.ErrorType", ErrorType_name, ErrorType_value) - proto.RegisterEnum("pb.RelayOp", RelayOp_name, RelayOp_value) proto.RegisterType((*StartSubTaskRequest)(nil), "pb.StartSubTaskRequest") proto.RegisterType((*UpdateRelayRequest)(nil), "pb.UpdateRelayRequest") proto.RegisterType((*MigrateRelayRequest)(nil), "pb.MigrateRelayRequest") proto.RegisterType((*OperateSubTaskRequest)(nil), "pb.OperateSubTaskRequest") proto.RegisterType((*OperateSubTaskResponse)(nil), "pb.OperateSubTaskResponse") - proto.RegisterType((*QueryTaskOperationRequest)(nil), "pb.QueryTaskOperationRequest") - proto.RegisterType((*QueryTaskOperationResponse)(nil), "pb.QueryTaskOperationResponse") proto.RegisterType((*UpdateSubTaskRequest)(nil), "pb.UpdateSubTaskRequest") proto.RegisterType((*QueryStatusRequest)(nil), "pb.QueryStatusRequest") proto.RegisterType((*QueryErrorRequest)(nil), "pb.QueryErrorRequest") @@ -3262,163 +3234,12 @@ func init() { proto.RegisterType((*PurgeRelayRequest)(nil), "pb.PurgeRelayRequest") proto.RegisterType((*QueryWorkerConfigRequest)(nil), "pb.QueryWorkerConfigRequest") proto.RegisterType((*QueryWorkerConfigResponse)(nil), "pb.QueryWorkerConfigResponse") - proto.RegisterType((*TaskMeta)(nil), "pb.TaskMeta") - proto.RegisterType((*TaskLog)(nil), "pb.TaskLog") -} - -func init() { proto.RegisterFile("dmworker.proto", fileDescriptor_51a1b9e17fd67b10) } - -var fileDescriptor_51a1b9e17fd67b10 = []byte{ - // 2372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x19, 0x4d, 0x6f, 0x23, 0x59, - 0xd1, 0xdd, 0x6e, 0x3b, 0x76, 0xd9, 0xc9, 0x74, 0x5e, 0x66, 0x67, 0x3d, 0x66, 0x27, 0x84, 0x9e, - 0xd5, 0x6e, 0x36, 0x42, 0xd1, 0x6e, 0x00, 0x21, 0x01, 0x0b, 0xec, 0xc4, 0x99, 0x4c, 0xc0, 0x99, - 0x49, 0xda, 0x13, 0xe0, 0xb6, 0xea, 0xb4, 0x5f, 0x9c, 0x56, 0xda, 0xdd, 0x3d, 0xfd, 0x91, 0x4c, - 0x4e, 0x80, 0x38, 0x22, 0x21, 0x24, 0x4e, 0x88, 0x33, 0x37, 0x7e, 0x02, 0x77, 0x38, 0xee, 0x91, - 0x1b, 0x68, 0xe6, 0x17, 0x70, 0xe7, 0x80, 0xaa, 0xde, 0xeb, 0xee, 0xd7, 0x89, 0xed, 0x19, 0xa1, - 0xe1, 0x62, 0x75, 0x7d, 0xbc, 0x7a, 0x55, 0xf5, 0xea, 0x55, 0xd5, 0x2b, 0xc3, 0xca, 0x78, 0x7a, - 0x15, 0xc6, 0x17, 0x3c, 0xde, 0x8e, 0xe2, 0x30, 0x0d, 0x99, 0x1e, 0x9d, 0x5a, 0x9f, 0xc0, 0xda, - 0x28, 0x75, 0xe2, 0x74, 0x94, 0x9d, 0x3e, 0x77, 0x92, 0x0b, 0x9b, 0xbf, 0xc8, 0x78, 0x92, 0x32, - 0x06, 0x46, 0xea, 0x24, 0x17, 0x3d, 0x6d, 0x43, 0xdb, 0x6c, 0xdb, 0xf4, 0x6d, 0x6d, 0x03, 0x3b, - 0x89, 0xc6, 0x4e, 0xca, 0x6d, 0xee, 0x3b, 0xd7, 0x39, 0x67, 0x0f, 0x96, 0xdc, 0x30, 0x48, 0x79, - 0x90, 0x4a, 0xe6, 0x1c, 0xb4, 0x46, 0xb0, 0x76, 0xe8, 0x4d, 0xe2, 0x9b, 0x0b, 0xd6, 0x01, 0x1e, - 0x79, 0x81, 0x1f, 0x4e, 0x9e, 0x3a, 0x53, 0x2e, 0xd7, 0x28, 0x18, 0xf6, 0x01, 0xb4, 0x05, 0x74, - 0x14, 0x26, 0x3d, 0x7d, 0x43, 0xdb, 0x5c, 0xb6, 0x4b, 0x84, 0xb5, 0x0f, 0xef, 0x3d, 0x8b, 0x38, - 0x0a, 0xbd, 0xa1, 0x71, 0x1f, 0xf4, 0x30, 0x22, 0x71, 0x2b, 0x3b, 0xb0, 0x1d, 0x9d, 0x6e, 0x23, - 0xf1, 0x59, 0x64, 0xeb, 0x61, 0x84, 0xd6, 0x04, 0xb8, 0x99, 0x2e, 0xac, 0xc1, 0x6f, 0xeb, 0x25, - 0xdc, 0xbb, 0x29, 0x28, 0x89, 0xc2, 0x20, 0xe1, 0xec, 0x9b, 0x60, 0x4c, 0x79, 0xea, 0x90, 0xac, - 0xce, 0x4e, 0x0f, 0x65, 0xed, 0x86, 0xd3, 0x69, 0x18, 0xfc, 0x9c, 0x9c, 0x97, 0xf3, 0xd9, 0xc4, - 0x25, 0xf7, 0xd5, 0x67, 0xee, 0x7b, 0x17, 0x1a, 0x7e, 0x38, 0x39, 0x18, 0xf4, 0xea, 0x1b, 0xda, - 0x66, 0xdd, 0x16, 0x80, 0xb5, 0x07, 0xf7, 0x8f, 0x33, 0x1e, 0x5f, 0x0b, 0x46, 0x54, 0xc1, 0x0b, - 0x03, 0xc5, 0xf1, 0x41, 0xe9, 0x17, 0xfa, 0x2e, 0xc5, 0xe8, 0xaa, 0x18, 0x0f, 0xfa, 0xb3, 0xc4, - 0xfc, 0x4f, 0x46, 0x3c, 0x80, 0xba, 0x1f, 0x4e, 0x48, 0x7e, 0x67, 0xa7, 0x93, 0x5b, 0x31, 0x0c, - 0x27, 0x36, 0xe2, 0xad, 0x2d, 0xb8, 0x2b, 0x4e, 0xfe, 0x2d, 0xa2, 0x64, 0x13, 0x18, 0xa9, 0x35, - 0x4a, 0x9d, 0x34, 0x4b, 0x16, 0x98, 0x65, 0x7d, 0x0c, 0xab, 0xc4, 0xb9, 0x17, 0xc7, 0x61, 0xbc, - 0x88, 0xf1, 0x4f, 0x1a, 0xf4, 0x9e, 0x38, 0xc1, 0xd8, 0xcf, 0xf7, 0x1f, 0x1d, 0x0f, 0x17, 0x49, - 0x66, 0xf7, 0x95, 0x33, 0x69, 0xa3, 0x35, 0xa3, 0xe3, 0x61, 0x19, 0x0a, 0x4e, 0x3c, 0x49, 0x7a, - 0xf5, 0x8d, 0x3a, 0xb2, 0xe3, 0x37, 0x46, 0xdc, 0x69, 0x11, 0x71, 0x06, 0xc9, 0x29, 0x11, 0x18, - 0xaf, 0xc9, 0x0b, 0xff, 0xc8, 0x49, 0x53, 0x1e, 0x07, 0xbd, 0x86, 0x88, 0xd7, 0x12, 0x63, 0xfd, - 0x02, 0xee, 0xce, 0xf2, 0x2c, 0xbb, 0x07, 0xcd, 0x98, 0x27, 0x99, 0x2f, 0xee, 0x45, 0xcb, 0x96, - 0x10, 0xe2, 0xc5, 0x2d, 0x94, 0xe1, 0x28, 0x21, 0x66, 0x42, 0x7d, 0x9a, 0x4c, 0x28, 0x54, 0xda, - 0x36, 0x7e, 0x5a, 0xff, 0xd4, 0x60, 0xad, 0xe2, 0xcb, 0x77, 0x25, 0x99, 0x7d, 0x17, 0x96, 0x13, - 0xe9, 0x4a, 0x12, 0xdd, 0x33, 0x36, 0xea, 0x9b, 0x9d, 0x9d, 0x55, 0xf2, 0x95, 0x4a, 0xb0, 0xab, - 0x7c, 0xec, 0x33, 0xe8, 0xc4, 0x78, 0x99, 0xe5, 0xb2, 0x06, 0x05, 0xcc, 0x1d, 0x5c, 0x66, 0x97, - 0x68, 0x5b, 0xe5, 0x61, 0x7d, 0x68, 0x25, 0x61, 0x16, 0xbb, 0xfc, 0x60, 0xd0, 0x6b, 0x92, 0x0a, - 0x05, 0x6c, 0xfd, 0x55, 0x93, 0xd1, 0x22, 0x63, 0xe0, 0x9d, 0x19, 0xf8, 0x6d, 0xe8, 0x4a, 0xc5, - 0x49, 0xb2, 0xb4, 0xcf, 0x54, 0xec, 0x13, 0x3b, 0x56, 0xb8, 0xd8, 0x36, 0x00, 0x99, 0x21, 0xd6, - 0x08, 0xe3, 0x56, 0x0a, 0xe3, 0xc4, 0x0a, 0x85, 0xc3, 0xfa, 0xb3, 0x06, 0x9d, 0xdd, 0x73, 0xee, - 0xe6, 0xde, 0xb9, 0x07, 0xcd, 0xc8, 0x49, 0x12, 0x3e, 0xce, 0xf5, 0x16, 0x10, 0x5e, 0xe0, 0x34, - 0x4c, 0x1d, 0x9f, 0xd4, 0x6e, 0xd8, 0x02, 0xa0, 0xc0, 0xca, 0x5c, 0x97, 0x27, 0xc9, 0x59, 0xe6, - 0x93, 0xf2, 0x0d, 0x5b, 0xc1, 0xa0, 0xb4, 0x33, 0xc7, 0xf3, 0xf9, 0x98, 0x62, 0xb2, 0x61, 0x4b, - 0x08, 0x33, 0xee, 0x95, 0x13, 0x07, 0x5e, 0x30, 0x21, 0x15, 0x1b, 0x76, 0x0e, 0xe2, 0x8a, 0x31, - 0x4f, 0x1d, 0xcf, 0x27, 0x47, 0x77, 0x6d, 0x09, 0x59, 0x5d, 0x80, 0x41, 0x36, 0x8d, 0x84, 0x96, - 0xd6, 0xef, 0x34, 0x80, 0x61, 0xe8, 0x8c, 0xa5, 0xd2, 0x1f, 0xc2, 0xf2, 0x99, 0x17, 0x78, 0xc9, - 0x39, 0x1f, 0x3f, 0xba, 0x4e, 0x79, 0x42, 0xba, 0xd7, 0xed, 0x2a, 0x12, 0x95, 0x25, 0xad, 0x05, - 0x8b, 0x48, 0x44, 0x0a, 0x06, 0x4f, 0x39, 0x8a, 0xc3, 0x49, 0xcc, 0x93, 0x44, 0x9e, 0x43, 0x01, - 0xe3, 0x5a, 0xcc, 0x32, 0x22, 0x89, 0xcb, 0x0b, 0xa6, 0x60, 0xac, 0xdf, 0x6a, 0xb0, 0x3c, 0x3a, - 0x77, 0xe2, 0xb1, 0x17, 0x4c, 0xf6, 0xe3, 0x30, 0x8b, 0xd0, 0x90, 0xd4, 0x89, 0x27, 0x3c, 0xaf, - 0x29, 0x12, 0xc2, 0xdb, 0x3b, 0x18, 0x0c, 0x71, 0x7f, 0xba, 0xbd, 0xf8, 0x8d, 0x3b, 0x9f, 0x79, - 0x71, 0x92, 0xe2, 0xe5, 0x95, 0x3b, 0xe7, 0x30, 0xca, 0x49, 0xae, 0x03, 0x97, 0x5c, 0x88, 0x2b, - 0x24, 0x84, 0x6b, 0xb2, 0x40, 0x52, 0x1a, 0x44, 0x29, 0x60, 0xeb, 0x37, 0x75, 0x80, 0xd1, 0x75, - 0xe0, 0x4a, 0xf7, 0x6c, 0x40, 0x87, 0xcc, 0xdc, 0xbb, 0xe4, 0x41, 0x9a, 0x3b, 0x47, 0x45, 0xa1, - 0x30, 0x02, 0x9f, 0x47, 0xb9, 0x63, 0x0a, 0x18, 0x53, 0x4b, 0xcc, 0x5d, 0x1e, 0xa4, 0x48, 0x14, - 0x55, 0xa0, 0x44, 0x30, 0x0b, 0xba, 0x53, 0x27, 0x49, 0x79, 0x5c, 0x71, 0x4d, 0x05, 0xc7, 0xb6, - 0xc0, 0x54, 0xe1, 0xfd, 0xd4, 0x1b, 0xcb, 0x24, 0x74, 0x0b, 0x8f, 0xf2, 0xc8, 0x88, 0x5c, 0x9e, - 0xb8, 0x6e, 0x15, 0x1c, 0xca, 0x53, 0x61, 0x92, 0xb7, 0x24, 0xe4, 0xdd, 0xc4, 0xa3, 0xbc, 0x53, - 0x3f, 0x74, 0x2f, 0xbc, 0x60, 0x42, 0x6e, 0x6f, 0x91, 0xab, 0x2a, 0x38, 0xf6, 0x39, 0x98, 0x59, - 0x10, 0xf3, 0x24, 0xf4, 0x2f, 0xf9, 0x98, 0x4e, 0x2f, 0xe9, 0xb5, 0x95, 0x6c, 0xa2, 0x9e, 0xab, - 0x7d, 0x8b, 0x55, 0x39, 0x21, 0x10, 0x57, 0x46, 0x9e, 0xc2, 0xdf, 0x74, 0xe8, 0x28, 0x29, 0xe5, - 0x96, 0xab, 0xb4, 0xb7, 0x74, 0x95, 0x3e, 0xc7, 0x55, 0x1b, 0x79, 0x22, 0xcb, 0x4e, 0x07, 0x5e, - 0x2c, 0x03, 0x47, 0x45, 0x15, 0x1c, 0x95, 0xb3, 0x51, 0x51, 0x6c, 0x13, 0xee, 0x28, 0xa0, 0x72, - 0x32, 0x37, 0xd1, 0x6c, 0x1b, 0x18, 0xa1, 0x76, 0x9d, 0xd4, 0x3d, 0x3f, 0x89, 0x0e, 0x49, 0x1b, - 0x3a, 0x9e, 0x96, 0x3d, 0x83, 0xc2, 0xbe, 0x0e, 0x8d, 0x24, 0x75, 0x26, 0x9c, 0x4e, 0x26, 0xaf, - 0x61, 0x88, 0xb0, 0x05, 0x9e, 0x7d, 0x52, 0x64, 0xc8, 0x16, 0x65, 0x29, 0xf2, 0xf5, 0x51, 0x1c, - 0x62, 0xee, 0xb0, 0x89, 0x90, 0x27, 0x4d, 0xeb, 0x3f, 0x3a, 0x2c, 0x57, 0x72, 0xfa, 0xcc, 0x92, - 0x59, 0xec, 0xa8, 0xcf, 0xd9, 0x71, 0x03, 0x8c, 0x2c, 0xf0, 0x52, 0xf2, 0xd4, 0xca, 0x4e, 0x17, - 0xe9, 0x27, 0x81, 0x97, 0x3e, 0xbf, 0x8e, 0xb8, 0x4d, 0x14, 0x45, 0x27, 0xe3, 0x0d, 0x3a, 0xb1, - 0x4f, 0x61, 0xad, 0x8c, 0x84, 0xc1, 0x60, 0x38, 0x0c, 0xdd, 0x8b, 0x83, 0x81, 0xf4, 0xde, 0x2c, - 0x12, 0x63, 0x22, 0xc5, 0x53, 0x44, 0x3f, 0xa9, 0x89, 0x24, 0xff, 0x31, 0x34, 0x5c, 0xcc, 0xbe, - 0xe4, 0x25, 0x59, 0x86, 0x94, 0x74, 0xfc, 0xa4, 0x66, 0x0b, 0x3a, 0xfb, 0x10, 0x8c, 0x71, 0x36, - 0x8d, 0xa4, 0xaf, 0x28, 0xa3, 0x97, 0xf9, 0xf0, 0x49, 0xcd, 0x26, 0x2a, 0x72, 0xf9, 0xa1, 0x33, - 0xee, 0xb5, 0x4b, 0xae, 0x32, 0x4d, 0x22, 0x17, 0x52, 0x91, 0x0b, 0x43, 0x94, 0xc2, 0x55, 0x72, - 0x95, 0xd9, 0x02, 0xb9, 0x90, 0xfa, 0xa8, 0x05, 0xcd, 0x44, 0x64, 0xdb, 0x1f, 0xc2, 0x6a, 0xc5, - 0xfb, 0x43, 0x2f, 0x21, 0x57, 0x09, 0x72, 0x4f, 0x9b, 0x57, 0x78, 0xf3, 0xf5, 0xeb, 0x00, 0x64, - 0x93, 0xa8, 0x50, 0xb2, 0xd2, 0x69, 0x65, 0x93, 0xf0, 0x00, 0xda, 0x68, 0xcb, 0x02, 0x32, 0x1a, - 0x31, 0x8f, 0x1c, 0x41, 0x97, 0xb4, 0x3f, 0x1e, 0xce, 0xe1, 0x60, 0x3b, 0x70, 0x57, 0xd4, 0x9d, - 0xa2, 0x07, 0xf7, 0xb0, 0xd1, 0x94, 0x17, 0x6b, 0x26, 0x0d, 0x33, 0x22, 0x47, 0x71, 0xa3, 0xe3, - 0x61, 0x9e, 0x92, 0x73, 0xd8, 0xfa, 0x0e, 0xb4, 0x71, 0x47, 0xb1, 0xdd, 0x26, 0x34, 0x89, 0x90, - 0xfb, 0xc1, 0x2c, 0xdc, 0x29, 0x15, 0xb2, 0x25, 0x1d, 0xdd, 0x50, 0x16, 0xde, 0x19, 0x86, 0xfc, - 0x51, 0x87, 0xae, 0x5a, 0xd9, 0xff, 0x5f, 0x41, 0x2e, 0xe3, 0xd0, 0x50, 0xe3, 0xf0, 0xa3, 0x3c, - 0x0e, 0x95, 0x8e, 0xa1, 0x3c, 0xb3, 0x32, 0x0c, 0x1f, 0xca, 0x30, 0x6c, 0x12, 0xdb, 0x72, 0x1e, - 0x86, 0x39, 0x97, 0x88, 0xc2, 0x87, 0x32, 0x0a, 0x97, 0x4a, 0xa6, 0xe2, 0x00, 0x8b, 0x20, 0x7c, - 0x28, 0x83, 0xb0, 0x55, 0x32, 0x15, 0x4e, 0x2d, 0x62, 0x70, 0x09, 0x1a, 0xe4, 0x3c, 0xeb, 0x7b, - 0x60, 0xaa, 0xae, 0xa1, 0x08, 0xfc, 0x48, 0x12, 0x2b, 0x8e, 0x57, 0x3b, 0x23, 0xb9, 0xf6, 0x05, - 0x2c, 0x57, 0xae, 0x30, 0x16, 0x73, 0x2f, 0xd9, 0x75, 0x02, 0x97, 0xfb, 0x45, 0x9f, 0xa3, 0x60, - 0x94, 0x23, 0xd5, 0x4b, 0xc9, 0x52, 0x44, 0xe5, 0x48, 0x95, 0x6e, 0xa5, 0x5e, 0xe9, 0x56, 0xfe, - 0xa2, 0x41, 0xf3, 0xb9, 0x38, 0xc4, 0x1e, 0x2c, 0xed, 0xc5, 0xf1, 0x6e, 0x38, 0x16, 0xe7, 0xd8, - 0xb0, 0x73, 0x10, 0x43, 0x0c, 0x3f, 0x7d, 0x27, 0x49, 0x64, 0x57, 0x55, 0xc0, 0x92, 0x36, 0x72, - 0xc3, 0x88, 0xcb, 0xb6, 0xaa, 0x80, 0x25, 0x6d, 0xc8, 0x2f, 0xb9, 0x2f, 0xdb, 0xaa, 0x02, 0xc6, - 0xdd, 0x0e, 0x79, 0x92, 0x60, 0x80, 0x88, 0x4c, 0x94, 0x83, 0xb8, 0xca, 0x76, 0xae, 0x76, 0x9d, - 0x2c, 0xe1, 0x79, 0x0f, 0x9b, 0xc3, 0x16, 0x87, 0xae, 0x6a, 0x1e, 0xfb, 0x06, 0x18, 0x18, 0x2f, - 0xf2, 0x29, 0x4a, 0x67, 0x43, 0x04, 0x11, 0x44, 0xf8, 0x9b, 0x87, 0xaf, 0x5e, 0xde, 0xb2, 0x8d, - 0xfc, 0x38, 0xea, 0x74, 0xa2, 0xe2, 0x21, 0x59, 0x39, 0x88, 0x2f, 0x61, 0x69, 0x30, 0x18, 0x1e, - 0x04, 0x67, 0xe1, 0xac, 0x67, 0x17, 0xd5, 0x51, 0xf7, 0x9c, 0x4f, 0x9d, 0xbc, 0x35, 0x16, 0x10, - 0xb5, 0x9e, 0xce, 0xa9, 0xcf, 0xe5, 0x3d, 0x14, 0x40, 0xd1, 0x47, 0x19, 0x65, 0x1f, 0x65, 0x7d, - 0x06, 0x9d, 0x3c, 0xdd, 0xce, 0xdb, 0x64, 0x05, 0x74, 0xf9, 0x0a, 0x6d, 0xdb, 0xfa, 0xc1, 0xc0, - 0xfa, 0x95, 0x06, 0x2b, 0x7b, 0x2f, 0xb9, 0x3b, 0x18, 0x0c, 0x17, 0x3c, 0x09, 0x51, 0x37, 0x5f, - 0x24, 0x78, 0xa9, 0x9b, 0x9f, 0xe7, 0x74, 0x83, 0xbf, 0xe4, 0x2e, 0xa9, 0xd6, 0xb2, 0xe9, 0x9b, - 0x9a, 0xa9, 0xd8, 0x71, 0xf9, 0xfe, 0xc1, 0x40, 0x96, 0xdc, 0x02, 0x2e, 0xb4, 0x6e, 0x28, 0x5a, - 0xff, 0x5a, 0x83, 0xb5, 0x47, 0x31, 0x77, 0x2e, 0xa4, 0xee, 0x8b, 0xf4, 0xb0, 0xa0, 0x1b, 0xf3, - 0x69, 0x78, 0xc9, 0x87, 0xaa, 0x36, 0x15, 0x1c, 0xc6, 0x00, 0x17, 0x16, 0x49, 0xb5, 0x72, 0x10, - 0x29, 0xc9, 0x85, 0x17, 0x21, 0xc5, 0x10, 0x14, 0x09, 0x5a, 0x7d, 0xe8, 0x8d, 0xae, 0xbc, 0xd4, - 0x3d, 0xa7, 0x0c, 0x25, 0x4a, 0xb8, 0xd4, 0xc3, 0xda, 0x81, 0x35, 0x39, 0x66, 0xa8, 0x0c, 0x41, - 0xbe, 0xa6, 0x4c, 0x2b, 0x3a, 0xc5, 0x0b, 0x43, 0xbc, 0x51, 0xad, 0x0c, 0xee, 0x56, 0xd7, 0xc8, - 0x67, 0xd1, 0xa2, 0x45, 0xca, 0x9b, 0x49, 0x9f, 0xf3, 0x66, 0xaa, 0xcf, 0x7a, 0x33, 0x19, 0x65, - 0x0a, 0xbd, 0x82, 0xd5, 0xa3, 0x2c, 0x9e, 0x54, 0x15, 0xed, 0x43, 0xcb, 0x0b, 0x1c, 0x37, 0xf5, - 0x2e, 0xb9, 0xbc, 0xec, 0x05, 0x4c, 0x3e, 0xf6, 0xe4, 0x58, 0xa5, 0x6e, 0xd3, 0xb7, 0xe8, 0xc6, - 0x7d, 0x4e, 0xa9, 0xb7, 0xe8, 0xc6, 0x05, 0x4c, 0x31, 0x2a, 0xda, 0x2d, 0x43, 0xc6, 0x28, 0x41, - 0xe8, 0x3f, 0x7a, 0x04, 0x8a, 0x07, 0xf4, 0x6e, 0x18, 0x9c, 0x79, 0x93, 0xdc, 0x7f, 0x7f, 0xd0, - 0xe4, 0xb4, 0xa4, 0x4a, 0x7c, 0x67, 0x0f, 0x45, 0xf5, 0x75, 0x6a, 0x54, 0x5f, 0xa7, 0xea, 0x68, - 0xab, 0x51, 0x1d, 0x6d, 0x85, 0xd0, 0xc2, 0x4c, 0x79, 0x58, 0x0e, 0x80, 0x66, 0x0f, 0x9e, 0xde, - 0x58, 0x70, 0xf2, 0x2a, 0x55, 0x57, 0xaa, 0x54, 0x1e, 0xba, 0x06, 0x65, 0x45, 0x31, 0x55, 0xf9, - 0x25, 0x2c, 0xc9, 0x89, 0x0c, 0x5e, 0x42, 0x6f, 0x2c, 0xdf, 0x21, 0x3a, 0x75, 0xb2, 0x82, 0x5d, - 0x0c, 0x6f, 0xba, 0xb9, 0x06, 0xa8, 0x5b, 0x79, 0x6d, 0xd3, 0xfc, 0xf5, 0xa1, 0xa7, 0x09, 0x45, - 0xb2, 0x78, 0x66, 0x16, 0x91, 0x2c, 0x40, 0xa4, 0x4c, 0xab, 0x19, 0x50, 0x82, 0x5b, 0x5f, 0x42, - 0x53, 0xd8, 0xc5, 0x96, 0xa1, 0x7d, 0x10, 0x5c, 0x3a, 0xbe, 0x37, 0x7e, 0x16, 0x99, 0x35, 0xd6, - 0x02, 0x63, 0x94, 0x86, 0x91, 0xa9, 0xb1, 0x36, 0x34, 0x8e, 0x30, 0x23, 0x9a, 0x3a, 0x03, 0x68, - 0x62, 0xb9, 0x98, 0x72, 0xb3, 0x8e, 0x68, 0x9a, 0x30, 0x9a, 0x06, 0xa2, 0xc5, 0x1c, 0xc9, 0x6c, - 0xb0, 0x15, 0x80, 0x2f, 0xb2, 0x34, 0x94, 0x6c, 0xcd, 0xad, 0x2d, 0x68, 0xd0, 0x94, 0x86, 0x04, - 0xfe, 0xf4, 0xe0, 0xc8, 0xac, 0xb1, 0x0e, 0x2c, 0xd9, 0x7b, 0x47, 0xc3, 0x2f, 0x76, 0xf7, 0x4c, - 0x0d, 0xd7, 0x1e, 0x3c, 0xfd, 0xc9, 0xde, 0xee, 0x73, 0x53, 0xdf, 0xfa, 0x19, 0x89, 0x9c, 0x60, - 0x22, 0xed, 0x4a, 0x5d, 0x08, 0x36, 0x6b, 0x6c, 0x09, 0xea, 0x4f, 0xf9, 0x95, 0xa9, 0xd1, 0xe2, - 0x2c, 0xc0, 0x67, 0xb1, 0xd0, 0x87, 0x54, 0x1b, 0x9b, 0x75, 0x24, 0xa0, 0xc2, 0x11, 0x1f, 0x9b, - 0x06, 0xeb, 0x42, 0xeb, 0xb1, 0x7c, 0xe7, 0x9a, 0x8d, 0xad, 0x67, 0xd0, 0xca, 0xcb, 0x3d, 0xbb, - 0x03, 0x1d, 0x29, 0x1a, 0x51, 0x66, 0x0d, 0xed, 0xa0, 0xa2, 0x6e, 0x6a, 0xa8, 0x22, 0x16, 0x6e, - 0x53, 0xc7, 0x2f, 0xac, 0xce, 0x66, 0x9d, 0xd4, 0xbe, 0x0e, 0x5c, 0xd3, 0x40, 0x46, 0xba, 0x42, - 0xe6, 0x78, 0xeb, 0xfb, 0xd0, 0x2e, 0x72, 0x3f, 0x2a, 0x7b, 0x12, 0x5c, 0x04, 0xe1, 0x55, 0x40, - 0x38, 0x61, 0x20, 0xa6, 0xcf, 0xd1, 0xf1, 0xd0, 0xd4, 0x70, 0x43, 0x92, 0xff, 0x98, 0x3a, 0x2a, - 0x53, 0xdf, 0x3a, 0x84, 0x25, 0x79, 0xc1, 0x19, 0x83, 0x15, 0xa9, 0x8c, 0xc4, 0x98, 0x35, 0x3c, - 0x07, 0xb4, 0x43, 0x6c, 0xa5, 0xa1, 0x3f, 0xc9, 0x44, 0x01, 0xeb, 0x28, 0x4e, 0xf8, 0x56, 0x20, - 0xea, 0x3b, 0xff, 0x6e, 0x41, 0x53, 0x5c, 0x22, 0xb6, 0x07, 0x5d, 0x75, 0xe8, 0xcb, 0xde, 0x97, - 0x71, 0x79, 0x73, 0x0c, 0xdc, 0xef, 0x23, 0x61, 0xf6, 0x98, 0xd4, 0xaa, 0xb1, 0x03, 0x58, 0xa9, - 0xd2, 0xd8, 0xfd, 0x59, 0xfc, 0x6f, 0x23, 0x6a, 0x1f, 0x96, 0x2b, 0x13, 0x46, 0x46, 0x13, 0xcb, - 0x59, 0x43, 0xc7, 0x37, 0x08, 0xfa, 0x31, 0x74, 0x94, 0x91, 0x19, 0xbb, 0x87, 0xcc, 0xb7, 0xe7, - 0x91, 0xfd, 0xf7, 0x6f, 0xe1, 0x0b, 0x09, 0x9f, 0x03, 0x94, 0x23, 0x29, 0xf6, 0x5e, 0xc1, 0xa8, - 0x8e, 0x29, 0xfb, 0xf7, 0x6e, 0xa2, 0x8b, 0xe5, 0x27, 0x72, 0xa2, 0x55, 0x19, 0xcb, 0xb2, 0x07, - 0x05, 0xff, 0xac, 0xa9, 0x6f, 0x7f, 0x7d, 0x1e, 0xb9, 0x10, 0xfb, 0x18, 0x40, 0x8e, 0x40, 0x8f, - 0x87, 0x09, 0xfb, 0x00, 0xf9, 0xe7, 0x8d, 0x44, 0xfb, 0x73, 0xa7, 0xbd, 0x56, 0x8d, 0xed, 0x40, - 0xf7, 0x31, 0x4f, 0xdd, 0xf3, 0xbc, 0x97, 0xa0, 0x47, 0x93, 0x52, 0xf7, 0xfb, 0x1d, 0x89, 0x40, - 0xc0, 0xaa, 0x6d, 0x6a, 0x9f, 0x6a, 0xec, 0x07, 0x00, 0x18, 0xa6, 0x59, 0xca, 0xb1, 0x0e, 0x32, - 0xea, 0x68, 0x2a, 0x55, 0x7f, 0xe1, 0x8e, 0xbb, 0xd0, 0x55, 0x0b, 0xb4, 0x08, 0xb6, 0x19, 0x25, - 0x7b, 0xa1, 0x90, 0x43, 0x58, 0xbd, 0x55, 0x62, 0x85, 0x17, 0xe6, 0x55, 0xde, 0x37, 0xe9, 0xa4, - 0x56, 0x58, 0xa1, 0xd3, 0x8c, 0x3a, 0x2d, 0x84, 0xcc, 0x2a, 0xc6, 0x56, 0x8d, 0xfd, 0x08, 0xa0, - 0xac, 0x97, 0x22, 0x50, 0x6e, 0xd5, 0xcf, 0x85, 0x5a, 0xec, 0xc3, 0xaa, 0xf2, 0x87, 0x8a, 0x28, - 0x6d, 0x22, 0x62, 0x6f, 0xff, 0xcf, 0xb2, 0x50, 0x90, 0x2d, 0x27, 0xe9, 0x6a, 0x8d, 0x14, 0xde, - 0x99, 0x57, 0x57, 0xfb, 0x0f, 0xe6, 0x50, 0x55, 0x17, 0xa9, 0xff, 0xde, 0x08, 0x17, 0xcd, 0xf8, - 0x3f, 0x67, 0x91, 0x62, 0x8f, 0x7a, 0x7f, 0x7f, 0xb5, 0xae, 0x7d, 0xf5, 0x6a, 0x5d, 0xfb, 0xd7, - 0xab, 0x75, 0xed, 0xf7, 0xaf, 0xd7, 0x6b, 0x5f, 0xbd, 0x5e, 0xaf, 0xfd, 0xe3, 0xf5, 0x7a, 0xed, - 0xb4, 0x49, 0x7f, 0x41, 0x7d, 0xeb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xde, 0x4f, 0x95, 0x7e, - 0x94, 0x1a, 0x00, 0x00, + proto.RegisterEnum("pb.TaskOp", TaskOp_name, TaskOp_value) + proto.RegisterEnum("pb.SQLOp", SQLOp_name, SQLOp_value) + proto.RegisterEnum("pb.Stage", Stage_name, Stage_value) + proto.RegisterEnum("pb.UnitType", UnitType_name, UnitType_value) + proto.RegisterEnum("pb.ErrorType", ErrorType_name, ErrorType_value) + proto.RegisterEnum("pb.RelayOp", RelayOp_name, RelayOp_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -3433,12 +3254,11 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type WorkerClient interface { - StartSubTask(ctx context.Context, in *StartSubTaskRequest, opts ...grpc.CallOption) (*OperateSubTaskResponse, error) + StartSubTask(ctx context.Context, in *StartSubTaskRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) OperateSubTask(ctx context.Context, in *OperateSubTaskRequest, opts ...grpc.CallOption) (*OperateSubTaskResponse, error) - UpdateSubTask(ctx context.Context, in *UpdateSubTaskRequest, opts ...grpc.CallOption) (*OperateSubTaskResponse, error) + UpdateSubTask(ctx context.Context, in *UpdateSubTaskRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) QueryStatus(ctx context.Context, in *QueryStatusRequest, opts ...grpc.CallOption) (*QueryStatusResponse, error) QueryError(ctx context.Context, in *QueryErrorRequest, opts ...grpc.CallOption) (*QueryErrorResponse, error) - QueryTaskOperation(ctx context.Context, in *QueryTaskOperationRequest, opts ...grpc.CallOption) (*QueryTaskOperationResponse, error) HandleSQLs(ctx context.Context, in *HandleSubTaskSQLsRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) // FetchDDLInfo fetches DDL info from dm-worker by dm-master // and sends the relevant DDL lock info back to dm-worker @@ -3469,8 +3289,8 @@ func NewWorkerClient(cc *grpc.ClientConn) WorkerClient { return &workerClient{cc} } -func (c *workerClient) StartSubTask(ctx context.Context, in *StartSubTaskRequest, opts ...grpc.CallOption) (*OperateSubTaskResponse, error) { - out := new(OperateSubTaskResponse) +func (c *workerClient) StartSubTask(ctx context.Context, in *StartSubTaskRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) { + out := new(CommonWorkerResponse) err := c.cc.Invoke(ctx, "/pb.Worker/StartSubTask", in, out, opts...) if err != nil { return nil, err @@ -3487,8 +3307,8 @@ func (c *workerClient) OperateSubTask(ctx context.Context, in *OperateSubTaskReq return out, nil } -func (c *workerClient) UpdateSubTask(ctx context.Context, in *UpdateSubTaskRequest, opts ...grpc.CallOption) (*OperateSubTaskResponse, error) { - out := new(OperateSubTaskResponse) +func (c *workerClient) UpdateSubTask(ctx context.Context, in *UpdateSubTaskRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) { + out := new(CommonWorkerResponse) err := c.cc.Invoke(ctx, "/pb.Worker/UpdateSubTask", in, out, opts...) if err != nil { return nil, err @@ -3514,15 +3334,6 @@ func (c *workerClient) QueryError(ctx context.Context, in *QueryErrorRequest, op return out, nil } -func (c *workerClient) QueryTaskOperation(ctx context.Context, in *QueryTaskOperationRequest, opts ...grpc.CallOption) (*QueryTaskOperationResponse, error) { - out := new(QueryTaskOperationResponse) - err := c.cc.Invoke(ctx, "/pb.Worker/QueryTaskOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *workerClient) HandleSQLs(ctx context.Context, in *HandleSubTaskSQLsRequest, opts ...grpc.CallOption) (*CommonWorkerResponse, error) { out := new(CommonWorkerResponse) err := c.cc.Invoke(ctx, "/pb.Worker/HandleSQLs", in, out, opts...) @@ -3637,12 +3448,11 @@ func (c *workerClient) MigrateRelay(ctx context.Context, in *MigrateRelayRequest // WorkerServer is the server API for Worker service. type WorkerServer interface { - StartSubTask(context.Context, *StartSubTaskRequest) (*OperateSubTaskResponse, error) + StartSubTask(context.Context, *StartSubTaskRequest) (*CommonWorkerResponse, error) OperateSubTask(context.Context, *OperateSubTaskRequest) (*OperateSubTaskResponse, error) - UpdateSubTask(context.Context, *UpdateSubTaskRequest) (*OperateSubTaskResponse, error) + UpdateSubTask(context.Context, *UpdateSubTaskRequest) (*CommonWorkerResponse, error) QueryStatus(context.Context, *QueryStatusRequest) (*QueryStatusResponse, error) QueryError(context.Context, *QueryErrorRequest) (*QueryErrorResponse, error) - QueryTaskOperation(context.Context, *QueryTaskOperationRequest) (*QueryTaskOperationResponse, error) HandleSQLs(context.Context, *HandleSubTaskSQLsRequest) (*CommonWorkerResponse, error) // FetchDDLInfo fetches DDL info from dm-worker by dm-master // and sends the relevant DDL lock info back to dm-worker @@ -3665,59 +3475,6 @@ type WorkerServer interface { MigrateRelay(context.Context, *MigrateRelayRequest) (*CommonWorkerResponse, error) } -// UnimplementedWorkerServer can be embedded to have forward compatible implementations. -type UnimplementedWorkerServer struct { -} - -func (*UnimplementedWorkerServer) StartSubTask(ctx context.Context, req *StartSubTaskRequest) (*OperateSubTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartSubTask not implemented") -} -func (*UnimplementedWorkerServer) OperateSubTask(ctx context.Context, req *OperateSubTaskRequest) (*OperateSubTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method OperateSubTask not implemented") -} -func (*UnimplementedWorkerServer) UpdateSubTask(ctx context.Context, req *UpdateSubTaskRequest) (*OperateSubTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSubTask not implemented") -} -func (*UnimplementedWorkerServer) QueryStatus(ctx context.Context, req *QueryStatusRequest) (*QueryStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryStatus not implemented") -} -func (*UnimplementedWorkerServer) QueryError(ctx context.Context, req *QueryErrorRequest) (*QueryErrorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryError not implemented") -} -func (*UnimplementedWorkerServer) QueryTaskOperation(ctx context.Context, req *QueryTaskOperationRequest) (*QueryTaskOperationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryTaskOperation not implemented") -} -func (*UnimplementedWorkerServer) HandleSQLs(ctx context.Context, req *HandleSubTaskSQLsRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleSQLs not implemented") -} -func (*UnimplementedWorkerServer) FetchDDLInfo(srv Worker_FetchDDLInfoServer) error { - return status.Errorf(codes.Unimplemented, "method FetchDDLInfo not implemented") -} -func (*UnimplementedWorkerServer) ExecuteDDL(ctx context.Context, req *ExecDDLRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecuteDDL not implemented") -} -func (*UnimplementedWorkerServer) BreakDDLLock(ctx context.Context, req *BreakDDLLockRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BreakDDLLock not implemented") -} -func (*UnimplementedWorkerServer) SwitchRelayMaster(ctx context.Context, req *SwitchRelayMasterRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SwitchRelayMaster not implemented") -} -func (*UnimplementedWorkerServer) OperateRelay(ctx context.Context, req *OperateRelayRequest) (*OperateRelayResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method OperateRelay not implemented") -} -func (*UnimplementedWorkerServer) PurgeRelay(ctx context.Context, req *PurgeRelayRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PurgeRelay not implemented") -} -func (*UnimplementedWorkerServer) UpdateRelayConfig(ctx context.Context, req *UpdateRelayRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateRelayConfig not implemented") -} -func (*UnimplementedWorkerServer) QueryWorkerConfig(ctx context.Context, req *QueryWorkerConfigRequest) (*QueryWorkerConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryWorkerConfig not implemented") -} -func (*UnimplementedWorkerServer) MigrateRelay(ctx context.Context, req *MigrateRelayRequest) (*CommonWorkerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MigrateRelay not implemented") -} - func RegisterWorkerServer(s *grpc.Server, srv WorkerServer) { s.RegisterService(&_Worker_serviceDesc, srv) } @@ -3812,24 +3569,6 @@ func _Worker_QueryError_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Worker_QueryTaskOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTaskOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkerServer).QueryTaskOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Worker/QueryTaskOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkerServer).QueryTaskOperation(ctx, req.(*QueryTaskOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Worker_HandleSQLs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HandleSubTaskSQLsRequest) if err := dec(in); err != nil { @@ -4042,10 +3781,6 @@ var _Worker_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryError", Handler: _Worker_QueryError_Handler, }, - { - MethodName: "QueryTaskOperation", - Handler: _Worker_QueryTaskOperation_Handler, - }, { MethodName: "HandleSQLs", Handler: _Worker_HandleSQLs_Handler, @@ -4097,7 +3832,7 @@ var _Worker_serviceDesc = grpc.ServiceDesc{ func (m *StartSubTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4105,29 +3840,23 @@ func (m *StartSubTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *StartSubTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StartSubTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) } - return len(dAtA) - i, nil + return i, nil } func (m *UpdateRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4135,29 +3864,23 @@ func (m *UpdateRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Content) > 0 { - i -= len(m.Content) - copy(dAtA[i:], m.Content) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Content))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Content))) + i += copy(dAtA[i:], m.Content) } - return len(dAtA) - i, nil + return i, nil } func (m *MigrateRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4165,34 +3888,28 @@ func (m *MigrateRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *MigrateRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MigrateRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.BinlogPos != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.BinlogPos)) - i-- - dAtA[i] = 0x10 - } if len(m.BinlogName) > 0 { - i -= len(m.BinlogName) - copy(dAtA[i:], m.BinlogName) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.BinlogName))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.BinlogName))) + i += copy(dAtA[i:], m.BinlogName) + } + if m.BinlogPos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.BinlogPos)) } - return len(dAtA) - i, nil + return i, nil } func (m *OperateSubTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4200,34 +3917,28 @@ func (m *OperateSubTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *OperateSubTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateSubTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } if m.Op != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) + } + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - return len(dAtA) - i, nil + return i, nil } func (m *OperateSubTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4235,126 +3946,44 @@ func (m *OperateSubTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *OperateSubTaskResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateSubTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.LogID != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.LogID)) - i-- - dAtA[i] = 0x18 - } if m.Op != 0 { + dAtA[i] = 0x8 + i++ i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x10 - } - if m.Meta != nil { - { - size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *QueryTaskOperationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTaskOperationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTaskOperationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LogID != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.LogID)) - i-- + if m.Result { dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTaskOperationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTaskOperationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTaskOperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Log != nil { - { - size, err := m.Log.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i-- - dAtA[i] = 0x12 + i++ } - if m.Meta != nil { - { - size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if len(m.Worker) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } - return len(dAtA) - i, nil + if len(m.Msg) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + return i, nil } func (m *UpdateSubTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4362,29 +3991,23 @@ func (m *UpdateSubTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateSubTaskRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateSubTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) } - return len(dAtA) - i, nil + return i, nil } func (m *QueryStatusRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4392,29 +4015,23 @@ func (m *QueryStatusRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - return len(dAtA) - i, nil + return i, nil } func (m *QueryErrorRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4422,29 +4039,23 @@ func (m *QueryErrorRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryErrorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryErrorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - return len(dAtA) - i, nil + return i, nil } func (m *HandleSubTaskSQLsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4452,57 +4063,55 @@ func (m *HandleSubTaskSQLsRequest) Marshal() (dAtA []byte, err error) { } func (m *HandleSubTaskSQLsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HandleSubTaskSQLsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.SqlPattern) > 0 { - i -= len(m.SqlPattern) - copy(dAtA[i:], m.SqlPattern) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SqlPattern))) - i-- - dAtA[i] = 0x2a + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if len(m.BinlogPos) > 0 { - i -= len(m.BinlogPos) - copy(dAtA[i:], m.BinlogPos) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.BinlogPos))) - i-- - dAtA[i] = 0x22 + if m.Op != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) } if len(m.Args) > 0 { - for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Args[iNdEx]) - copy(dAtA[i:], m.Args[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Args[iNdEx]))) - i-- + for _, s := range m.Args { dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if m.Op != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x10 + if len(m.BinlogPos) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.BinlogPos))) + i += copy(dAtA[i:], m.BinlogPos) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if len(m.SqlPattern) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SqlPattern))) + i += copy(dAtA[i:], m.SqlPattern) } - return len(dAtA) - i, nil + return i, nil } func (m *CommonWorkerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4510,46 +4119,39 @@ func (m *CommonWorkerResponse) Marshal() (dAtA []byte, err error) { } func (m *CommonWorkerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommonWorkerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x1a - } - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Worker) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) + } + if len(m.Msg) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *QueryStatusResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4557,79 +4159,67 @@ func (m *QueryStatusResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.SourceID) > 0 { - i -= len(m.SourceID) - copy(dAtA[i:], m.SourceID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SourceID))) - i-- - dAtA[i] = 0x32 - } - if m.RelayStatus != nil { - { - size, err := m.RelayStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i-- - dAtA[i] = 0x2a + i++ } - if len(m.SubTaskStatus) > 0 { - for iNdEx := len(m.SubTaskStatus) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SubTaskStatus[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + if len(m.Worker) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x12 + if len(m.SubTaskStatus) > 0 { + for _, msg := range m.SubTaskStatus { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.Result { - i-- - if m.Result { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.RelayStatus != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.RelayStatus.Size())) + n1, err := m.RelayStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x8 + i += n1 + } + if len(m.SourceID) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SourceID))) + i += copy(dAtA[i:], m.SourceID) } - return len(dAtA) - i, nil + return i, nil } func (m *QueryErrorResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4637,72 +4227,61 @@ func (m *QueryErrorResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryErrorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.RelayError != nil { - { - size, err := m.RelayError.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.SubTaskError) > 0 { - for iNdEx := len(m.SubTaskError) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SubTaskError[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x1a - } - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ } - return len(dAtA) - i, nil + if len(m.Worker) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) + } + if len(m.Msg) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if len(m.SubTaskError) > 0 { + for _, msg := range m.SubTaskError { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.RelayError != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.RelayError.Size())) + n2, err := m.RelayError.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil } func (m *CheckStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4710,59 +4289,53 @@ func (m *CheckStatus) Marshal() (dAtA []byte, err error) { } func (m *CheckStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Detail) > 0 { - i -= len(m.Detail) - copy(dAtA[i:], m.Detail) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Detail))) - i-- - dAtA[i] = 0x32 - } - if m.Warning != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Warning)) - i-- - dAtA[i] = 0x28 - } - if m.Failed != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Failed)) - i-- - dAtA[i] = 0x20 - } - if m.Successful != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Successful)) - i-- - dAtA[i] = 0x18 - } - if m.Total != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x10 - } if m.Passed { - i-- + dAtA[i] = 0x8 + i++ if m.Passed { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if m.Total != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Total)) + } + if m.Successful != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Successful)) + } + if m.Failed != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Failed)) + } + if m.Warning != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Warning)) + } + if len(m.Detail) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Detail))) + i += copy(dAtA[i:], m.Detail) } - return len(dAtA) - i, nil + return i, nil } func (m *DumpStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4770,22 +4343,17 @@ func (m *DumpStatus) Marshal() (dAtA []byte, err error) { } func (m *DumpStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DumpStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - return len(dAtA) - i, nil + return i, nil } func (m *LoadStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4793,46 +4361,39 @@ func (m *LoadStatus) Marshal() (dAtA []byte, err error) { } func (m *LoadStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.MetaBinlog) > 0 { - i -= len(m.MetaBinlog) - copy(dAtA[i:], m.MetaBinlog) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.MetaBinlog))) - i-- - dAtA[i] = 0x22 - } - if len(m.Progress) > 0 { - i -= len(m.Progress) - copy(dAtA[i:], m.Progress) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Progress))) - i-- - dAtA[i] = 0x1a + if m.FinishedBytes != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.FinishedBytes)) } if m.TotalBytes != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.TotalBytes)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.TotalBytes)) } - if m.FinishedBytes != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.FinishedBytes)) - i-- - dAtA[i] = 0x8 + if len(m.Progress) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Progress))) + i += copy(dAtA[i:], m.Progress) + } + if len(m.MetaBinlog) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.MetaBinlog))) + i += copy(dAtA[i:], m.MetaBinlog) } - return len(dAtA) - i, nil + return i, nil } func (m *ShardingGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4840,63 +4401,74 @@ func (m *ShardingGroup) Marshal() (dAtA []byte, err error) { } func (m *ShardingGroup) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShardingGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Unsynced) > 0 { - for iNdEx := len(m.Unsynced) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Unsynced[iNdEx]) - copy(dAtA[i:], m.Unsynced[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Unsynced[iNdEx]))) - i-- - dAtA[i] = 0x2a - } + if len(m.Target) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Target))) + i += copy(dAtA[i:], m.Target) } - if len(m.Synced) > 0 { - for iNdEx := len(m.Synced) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Synced[iNdEx]) - copy(dAtA[i:], m.Synced[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Synced[iNdEx]))) - i-- - dAtA[i] = 0x22 + if len(m.DDLs) > 0 { + for _, s := range m.DDLs { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } if len(m.FirstPos) > 0 { - i -= len(m.FirstPos) - copy(dAtA[i:], m.FirstPos) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.FirstPos))) - i-- dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.FirstPos))) + i += copy(dAtA[i:], m.FirstPos) } - if len(m.DDLs) > 0 { - for iNdEx := len(m.DDLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DDLs[iNdEx]) - copy(dAtA[i:], m.DDLs[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.DDLs[iNdEx]))) - i-- - dAtA[i] = 0x12 + if len(m.Synced) > 0 { + for _, s := range m.Synced { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } } - if len(m.Target) > 0 { - i -= len(m.Target) - copy(dAtA[i:], m.Target) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Target))) - i-- - dAtA[i] = 0xa + if len(m.Unsynced) > 0 { + for _, s := range m.Unsynced { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + return i, nil } func (m *SyncStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -4904,98 +4476,93 @@ func (m *SyncStatus) Marshal() (dAtA []byte, err error) { } func (m *SyncStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Synced { - i-- - if m.Synced { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if len(m.UnresolvedGroups) > 0 { - for iNdEx := len(m.UnresolvedGroups) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnresolvedGroups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + if m.TotalEvents != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.TotalEvents)) } - if len(m.BlockingDDLs) > 0 { - for iNdEx := len(m.BlockingDDLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BlockingDDLs[iNdEx]) - copy(dAtA[i:], m.BlockingDDLs[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.BlockingDDLs[iNdEx]))) - i-- - dAtA[i] = 0x42 - } + if m.TotalTps != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.TotalTps)) } - if len(m.SyncerBinlogGtid) > 0 { - i -= len(m.SyncerBinlogGtid) - copy(dAtA[i:], m.SyncerBinlogGtid) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SyncerBinlogGtid))) - i-- - dAtA[i] = 0x3a + if m.RecentTps != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.RecentTps)) } - if len(m.SyncerBinlog) > 0 { - i -= len(m.SyncerBinlog) - copy(dAtA[i:], m.SyncerBinlog) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SyncerBinlog))) - i-- - dAtA[i] = 0x32 + if len(m.MasterBinlog) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlog))) + i += copy(dAtA[i:], m.MasterBinlog) } if len(m.MasterBinlogGtid) > 0 { - i -= len(m.MasterBinlogGtid) - copy(dAtA[i:], m.MasterBinlogGtid) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlogGtid))) - i-- dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlogGtid))) + i += copy(dAtA[i:], m.MasterBinlogGtid) } - if len(m.MasterBinlog) > 0 { - i -= len(m.MasterBinlog) - copy(dAtA[i:], m.MasterBinlog) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlog))) - i-- - dAtA[i] = 0x22 + if len(m.SyncerBinlog) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SyncerBinlog))) + i += copy(dAtA[i:], m.SyncerBinlog) } - if m.RecentTps != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.RecentTps)) - i-- - dAtA[i] = 0x18 + if len(m.SyncerBinlogGtid) > 0 { + dAtA[i] = 0x3a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SyncerBinlogGtid))) + i += copy(dAtA[i:], m.SyncerBinlogGtid) } - if m.TotalTps != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.TotalTps)) - i-- - dAtA[i] = 0x10 + if len(m.BlockingDDLs) > 0 { + for _, s := range m.BlockingDDLs { + dAtA[i] = 0x42 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - if m.TotalEvents != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.TotalEvents)) - i-- - dAtA[i] = 0x8 + if len(m.UnresolvedGroups) > 0 { + for _, msg := range m.UnresolvedGroups { + dAtA[i] = 0x4a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Synced { + dAtA[i] = 0x50 + i++ + if m.Synced { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - return len(dAtA) - i, nil + return i, nil } func (m *RelayStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5003,84 +4570,72 @@ func (m *RelayStatus) Marshal() (dAtA []byte, err error) { } func (m *RelayStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RelayStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 + if len(m.MasterBinlog) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlog))) + i += copy(dAtA[i:], m.MasterBinlog) } - if m.Stage != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) - i-- - dAtA[i] = 0x38 + if len(m.MasterBinlogGtid) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlogGtid))) + i += copy(dAtA[i:], m.MasterBinlogGtid) + } + if len(m.RelaySubDir) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelaySubDir))) + i += copy(dAtA[i:], m.RelaySubDir) + } + if len(m.RelayBinlog) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelayBinlog))) + i += copy(dAtA[i:], m.RelayBinlog) + } + if len(m.RelayBinlogGtid) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelayBinlogGtid))) + i += copy(dAtA[i:], m.RelayBinlogGtid) } if m.RelayCatchUpMaster { - i-- + dAtA[i] = 0x30 + i++ if m.RelayCatchUpMaster { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x30 - } - if len(m.RelayBinlogGtid) > 0 { - i -= len(m.RelayBinlogGtid) - copy(dAtA[i:], m.RelayBinlogGtid) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelayBinlogGtid))) - i-- - dAtA[i] = 0x2a + i++ } - if len(m.RelayBinlog) > 0 { - i -= len(m.RelayBinlog) - copy(dAtA[i:], m.RelayBinlog) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelayBinlog))) - i-- - dAtA[i] = 0x22 + if m.Stage != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) } - if len(m.RelaySubDir) > 0 { - i -= len(m.RelaySubDir) - copy(dAtA[i:], m.RelaySubDir) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.RelaySubDir))) - i-- - dAtA[i] = 0x1a + if m.Result != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Result.Size())) + n3, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } - if len(m.MasterBinlogGtid) > 0 { - i -= len(m.MasterBinlogGtid) - copy(dAtA[i:], m.MasterBinlogGtid) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlogGtid))) - i-- - dAtA[i] = 0x12 - } - if len(m.MasterBinlog) > 0 { - i -= len(m.MasterBinlog) - copy(dAtA[i:], m.MasterBinlog) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.MasterBinlog))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5088,165 +4643,120 @@ func (m *SubTaskStatus) Marshal() (dAtA []byte, err error) { } func (m *SubTaskStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Status != nil { - { - size := m.Status.Size() - i -= size - if _, err := m.Status.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.UnresolvedDDLLockID) > 0 { - i -= len(m.UnresolvedDDLLockID) - copy(dAtA[i:], m.UnresolvedDDLLockID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.UnresolvedDDLLockID))) - i-- - dAtA[i] = 0x2a + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + if m.Stage != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) } if m.Unit != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Unit)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Unit)) } - if m.Stage != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) - i-- - dAtA[i] = 0x10 + if m.Result != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Result.Size())) + n4, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if len(m.UnresolvedDDLLockID) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.UnresolvedDDLLockID))) + i += copy(dAtA[i:], m.UnresolvedDDLLockID) } - return len(dAtA) - i, nil + if m.Status != nil { + nn5, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn5 + } + return i, nil } func (m *SubTaskStatus_Msg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus_Msg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- + i := 0 dAtA[i] = 0x32 - return len(dAtA) - i, nil + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + return i, nil } func (m *SubTaskStatus_Check) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus_Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Check != nil { - { - size, err := m.Check.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x3a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Check.Size())) + n6, err := m.Check.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskStatus_Dump) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus_Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Dump != nil { - { - size, err := m.Dump.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x42 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Dump.Size())) + n7, err := m.Dump.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskStatus_Load) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus_Load) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Load != nil { - { - size, err := m.Load.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x4a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Load.Size())) + n8, err := m.Load.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskStatus_Sync) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatus_Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Sync != nil { - { - size, err := m.Sync.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x52 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Sync.Size())) + n9, err := m.Sync.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskStatusList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5254,36 +4764,29 @@ func (m *SubTaskStatusList) Marshal() (dAtA []byte, err error) { } func (m *SubTaskStatusList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskStatusList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Status) > 0 { - for iNdEx := len(m.Status) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Status[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Status { dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + return i, nil } func (m *CheckError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5291,29 +4794,23 @@ func (m *CheckError) Marshal() (dAtA []byte, err error) { } func (m *CheckError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *DumpError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5321,29 +4818,23 @@ func (m *DumpError) Marshal() (dAtA []byte, err error) { } func (m *DumpError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DumpError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *LoadError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5351,29 +4842,23 @@ func (m *LoadError) Marshal() (dAtA []byte, err error) { } func (m *LoadError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *SyncSQLError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5381,43 +4866,35 @@ func (m *SyncSQLError) Marshal() (dAtA []byte, err error) { } func (m *SyncSQLError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncSQLError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.ErrorSQL) > 0 { - i -= len(m.ErrorSQL) - copy(dAtA[i:], m.ErrorSQL) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.ErrorSQL))) - i-- - dAtA[i] = 0x1a + if len(m.Msg) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } if len(m.FailedBinlogPosition) > 0 { - i -= len(m.FailedBinlogPosition) - copy(dAtA[i:], m.FailedBinlogPosition) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.FailedBinlogPosition))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.FailedBinlogPosition))) + i += copy(dAtA[i:], m.FailedBinlogPosition) } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0xa + if len(m.ErrorSQL) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.ErrorSQL))) + i += copy(dAtA[i:], m.ErrorSQL) } - return len(dAtA) - i, nil + return i, nil } func (m *SyncError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5425,36 +4902,29 @@ func (m *SyncError) Marshal() (dAtA []byte, err error) { } func (m *SyncError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Errors) > 0 { - for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Errors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Errors { dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + return i, nil } func (m *RelayError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5462,29 +4932,23 @@ func (m *RelayError) Marshal() (dAtA []byte, err error) { } func (m *RelayError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RelayError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5492,146 +4956,104 @@ func (m *SubTaskError) Marshal() (dAtA []byte, err error) { } func (m *SubTaskError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Error != nil { - { - size := m.Error.Size() - i -= size - if _, err := m.Error.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Unit != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Unit)) - i-- - dAtA[i] = 0x18 + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } if m.Stage != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) - i-- dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + if m.Unit != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Unit)) + } + if m.Error != nil { + nn10, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn10 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskError_Msg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError_Msg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- + i := 0 dAtA[i] = 0x22 - return len(dAtA) - i, nil + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + return i, nil } func (m *SubTaskError_Check) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError_Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Check != nil { - { - size, err := m.Check.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Check.Size())) + n11, err := m.Check.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskError_Dump) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError_Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Dump != nil { - { - size, err := m.Dump.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x32 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Dump.Size())) + n12, err := m.Dump.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskError_Load) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError_Load) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Load != nil { - { - size, err := m.Load.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x3a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Load.Size())) + n13, err := m.Load.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskError_Sync) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskError_Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + i := 0 if m.Sync != nil { - { - size, err := m.Sync.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x42 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Sync.Size())) + n14, err := m.Sync.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 } - return len(dAtA) - i, nil + return i, nil } func (m *SubTaskErrorList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5639,36 +5061,29 @@ func (m *SubTaskErrorList) Marshal() (dAtA []byte, err error) { } func (m *SubTaskErrorList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubTaskErrorList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Error) > 0 { - for iNdEx := len(m.Error) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Error[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Error { dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + return i, nil } func (m *ProcessResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5676,53 +5091,45 @@ func (m *ProcessResult) Marshal() (dAtA []byte, err error) { } func (m *ProcessResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProcessResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Detail) > 0 { - i -= len(m.Detail) - copy(dAtA[i:], m.Detail) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Detail))) - i-- - dAtA[i] = 0x1a - } - if len(m.Errors) > 0 { - for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Errors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } if m.IsCanceled { - i-- + dAtA[i] = 0x8 + i++ if m.IsCanceled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ } - return len(dAtA) - i, nil -} - -func (m *TError) Marshal() (dAtA []byte, err error) { + if len(m.Errors) > 0 { + for _, msg := range m.Errors { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Detail) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Detail))) + i += copy(dAtA[i:], m.Detail) + } + return i, nil +} + +func (m *TError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5730,56 +5137,49 @@ func (m *TError) Marshal() (dAtA []byte, err error) { } func (m *TError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.RawCause) > 0 { - i -= len(m.RawCause) - copy(dAtA[i:], m.RawCause) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.RawCause))) - i-- - dAtA[i] = 0x32 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a + if m.ErrCode != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.ErrCode)) } - if m.ErrLevel != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.ErrLevel)) - i-- - dAtA[i] = 0x20 + if m.ErrClass != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.ErrClass)) } if m.ErrScope != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.ErrScope)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.ErrScope)) } - if m.ErrClass != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.ErrClass)) - i-- - dAtA[i] = 0x10 + if m.ErrLevel != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.ErrLevel)) } - if m.ErrCode != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.ErrCode)) - i-- - dAtA[i] = 0x8 + if len(m.Message) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + if len(m.RawCause) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.RawCause))) + i += copy(dAtA[i:], m.RawCause) } - return len(dAtA) - i, nil + return i, nil } func (m *ProcessError) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5787,46 +5187,38 @@ func (m *ProcessError) Marshal() (dAtA []byte, err error) { } func (m *ProcessError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProcessError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Type)) } if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - if m.Type != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 + if m.Error != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Error.Size())) + n15, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 } - return len(dAtA) - i, nil + return i, nil } func (m *DDLInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5834,52 +5226,50 @@ func (m *DDLInfo) Marshal() (dAtA []byte, err error) { } func (m *DDLInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DDLInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.DDLs) > 0 { - for iNdEx := len(m.DDLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DDLs[iNdEx]) - copy(dAtA[i:], m.DDLs[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.DDLs[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Table) > 0 { - i -= len(m.Table) - copy(dAtA[i:], m.Table) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Table))) - i-- - dAtA[i] = 0x1a + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) } if len(m.Schema) > 0 { - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Schema))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Schema))) + i += copy(dAtA[i:], m.Schema) } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa + if len(m.Table) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Table))) + i += copy(dAtA[i:], m.Table) + } + if len(m.DDLs) > 0 { + for _, s := range m.DDLs { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + return i, nil } func (m *DDLLockInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5887,36 +5277,29 @@ func (m *DDLLockInfo) Marshal() (dAtA []byte, err error) { } func (m *DDLLockInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DDLLockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0x12 - } if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } + if len(m.ID) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) } - return len(dAtA) - i, nil + return i, nil } func (m *ExecDDLRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5924,62 +5307,60 @@ func (m *ExecDDLRequest) Marshal() (dAtA []byte, err error) { } func (m *ExecDDLRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecDDLRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.DDLs) > 0 { - for iNdEx := len(m.DDLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DDLs[iNdEx]) - copy(dAtA[i:], m.DDLs[iNdEx]) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.DDLs[iNdEx]))) - i-- - dAtA[i] = 0x2a - } + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) } - if len(m.TraceGID) > 0 { - i -= len(m.TraceGID) - copy(dAtA[i:], m.TraceGID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.TraceGID))) - i-- - dAtA[i] = 0x22 + if len(m.LockID) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.LockID))) + i += copy(dAtA[i:], m.LockID) } if m.Exec { - i-- + dAtA[i] = 0x18 + i++ if m.Exec { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x18 + i++ } - if len(m.LockID) > 0 { - i -= len(m.LockID) - copy(dAtA[i:], m.LockID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.LockID))) - i-- - dAtA[i] = 0x12 + if len(m.TraceGID) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.TraceGID))) + i += copy(dAtA[i:], m.TraceGID) } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa + if len(m.DDLs) > 0 { + for _, s := range m.DDLs { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return len(dAtA) - i, nil + return i, nil } func (m *BreakDDLLockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -5987,56 +5368,49 @@ func (m *BreakDDLLockRequest) Marshal() (dAtA []byte, err error) { } func (m *BreakDDLLockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BreakDDLLockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.SkipDDL { - i-- - if m.SkipDDL { + if len(m.Task) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) + i += copy(dAtA[i:], m.Task) + } + if len(m.RemoveLockID) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.RemoveLockID))) + i += copy(dAtA[i:], m.RemoveLockID) + } + if m.ExecDDL { + dAtA[i] = 0x18 + i++ + if m.ExecDDL { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x20 + i++ } - if m.ExecDDL { - i-- - if m.ExecDDL { + if m.SkipDDL { + dAtA[i] = 0x20 + i++ + if m.SkipDDL { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x18 - } - if len(m.RemoveLockID) > 0 { - i -= len(m.RemoveLockID) - copy(dAtA[i:], m.RemoveLockID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.RemoveLockID))) - i-- - dAtA[i] = 0x12 - } - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0xa + i++ } - return len(dAtA) - i, nil + return i, nil } func (m *SwitchRelayMasterRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6044,22 +5418,17 @@ func (m *SwitchRelayMasterRequest) Marshal() (dAtA []byte, err error) { } func (m *SwitchRelayMasterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwitchRelayMasterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - return len(dAtA) - i, nil + return i, nil } func (m *OperateRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6067,27 +5436,22 @@ func (m *OperateRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *OperateRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if m.Op != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) } - return len(dAtA) - i, nil + return i, nil } func (m *OperateRelayResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6095,51 +5459,44 @@ func (m *OperateRelayResponse) Marshal() (dAtA []byte, err error) { } func (m *OperateRelayResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OperateRelayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x22 - } - if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) - i-- - dAtA[i] = 0x1a + if m.Op != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) } if m.Result { - i-- + dAtA[i] = 0x10 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if m.Op != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 + if len(m.Worker) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) + } + if len(m.Msg) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - return len(dAtA) - i, nil + return i, nil } func (m *PurgeRelayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6147,51 +5504,44 @@ func (m *PurgeRelayRequest) Marshal() (dAtA []byte, err error) { } func (m *PurgeRelayRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PurgeRelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.SubDir) > 0 { - i -= len(m.SubDir) - copy(dAtA[i:], m.SubDir) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SubDir))) - i-- - dAtA[i] = 0x22 - } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0x1a - } - if m.Time != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Time)) - i-- - dAtA[i] = 0x10 - } if m.Inactive { - i-- + dAtA[i] = 0x8 + i++ if m.Inactive { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if m.Time != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(m.Time)) + } + if len(m.Filename) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Filename))) + i += copy(dAtA[i:], m.Filename) + } + if len(m.SubDir) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SubDir))) + i += copy(dAtA[i:], m.SubDir) } - return len(dAtA) - i, nil + return i, nil } func (m *QueryWorkerConfigRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6199,22 +5549,17 @@ func (m *QueryWorkerConfigRequest) Marshal() (dAtA []byte, err error) { } func (m *QueryWorkerConfigRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryWorkerConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - return len(dAtA) - i, nil + return i, nil } func (m *QueryWorkerConfigResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -6222,175 +5567,55 @@ func (m *QueryWorkerConfigResponse) Marshal() (dAtA []byte, err error) { } func (m *QueryWorkerConfigResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryWorkerConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Content) > 0 { - i -= len(m.Content) - copy(dAtA[i:], m.Content) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Content))) - i-- - dAtA[i] = 0x2a - } - if len(m.SourceID) > 0 { - i -= len(m.SourceID) - copy(dAtA[i:], m.SourceID) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.SourceID))) - i-- - dAtA[i] = 0x22 - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x1a + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } if len(m.Worker) > 0 { - i -= len(m.Worker) - copy(dAtA[i:], m.Worker) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) - i-- dAtA[i] = 0x12 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Worker))) + i += copy(dAtA[i:], m.Worker) } - if m.Result { - i-- - if m.Result { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TaskMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TaskMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TaskMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Task) > 0 { - i -= len(m.Task) - copy(dAtA[i:], m.Task) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Task))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Name))) - i-- + if len(m.Msg) > 0 { dAtA[i] = 0x1a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) } - if m.Stage != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Stage)) - i-- - dAtA[i] = 0x10 - } - if m.Op != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TaskLog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.SourceID) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.SourceID))) + i += copy(dAtA[i:], m.SourceID) } - return dAtA[:n], nil -} - -func (m *TaskLog) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TaskLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintDmworker(dAtA, i, uint64(len(m.Message))) - i-- + if len(m.Content) > 0 { dAtA[i] = 0x2a + i++ + i = encodeVarintDmworker(dAtA, i, uint64(len(m.Content))) + i += copy(dAtA[i:], m.Content) } - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Ts != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Ts)) - i-- - dAtA[i] = 0x18 - } - if m.Task != nil { - { - size, err := m.Task.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDmworker(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintDmworker(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return i, nil } func encodeVarintDmworker(dAtA []byte, offset int, v uint64) int { - offset -= sovDmworker(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *StartSubTaskRequest) Size() (n int) { if m == nil { @@ -6456,47 +5681,18 @@ func (m *OperateSubTaskResponse) Size() (n int) { } var l int _ = l - if m.Meta != nil { - l = m.Meta.Size() - n += 1 + l + sovDmworker(uint64(l)) - } if m.Op != 0 { n += 1 + sovDmworker(uint64(m.Op)) } - if m.LogID != 0 { - n += 1 + sovDmworker(uint64(m.LogID)) - } - return n -} - -func (m *QueryTaskOperationRequest) Size() (n int) { - if m == nil { - return 0 + if m.Result { + n += 2 } - var l int - _ = l - l = len(m.Name) + l = len(m.Worker) if l > 0 { n += 1 + l + sovDmworker(uint64(l)) } - if m.LogID != 0 { - n += 1 + sovDmworker(uint64(m.LogID)) - } - return n -} - -func (m *QueryTaskOperationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Meta != nil { - l = m.Meta.Size() - n += 1 + l + sovDmworker(uint64(l)) - } - if m.Log != nil { - l = m.Log.Size() + l = len(m.Msg) + if l > 0 { n += 1 + l + sovDmworker(uint64(l)) } return n @@ -7396,58 +6592,16 @@ func (m *QueryWorkerConfigResponse) Size() (n int) { return n } -func (m *TaskMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Op != 0 { - n += 1 + sovDmworker(uint64(m.Op)) - } - if m.Stage != 0 { - n += 1 + sovDmworker(uint64(m.Stage)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovDmworker(uint64(l)) - } - l = len(m.Task) - if l > 0 { - n += 1 + l + sovDmworker(uint64(l)) - } - return n -} - -func (m *TaskLog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovDmworker(uint64(m.Id)) - } - if m.Task != nil { - l = m.Task.Size() - n += 1 + l + sovDmworker(uint64(l)) - } - if m.Ts != 0 { - n += 1 + sovDmworker(uint64(m.Ts)) - } - if m.Success { - n += 2 - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovDmworker(uint64(l)) +func sovDmworker(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } } return n } - -func sovDmworker(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} func sozDmworker(x uint64) (n int) { return sovDmworker(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } @@ -7466,670 +6620,25 @@ func (m *StartSubTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StartSubTaskRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StartSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Task = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateRelayRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateRelayRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Content = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MigrateRelayRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MigrateRelayRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MigrateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BinlogName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BinlogName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BinlogPos", wireType) - } - m.BinlogPos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BinlogPos |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OperateSubTaskRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OperateSubTaskRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OperateSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - m.Op = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Op |= TaskOp(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OperateSubTaskResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OperateSubTaskResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OperateSubTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Meta == nil { - m.Meta = &CommonWorkerResponse{} - } - if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - m.Op = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Op |= TaskOp(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LogID", wireType) - } - m.LogID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LogID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTaskOperationRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTaskOperationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTaskOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LogID", wireType) - } - m.LogID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LogID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTaskOperationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTaskOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTaskOperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Meta == nil { - m.Meta = &CommonWorkerResponse{} - } - if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartSubTaskRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8139,27 +6648,20 @@ func (m *QueryTaskOperationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Log == nil { - m.Log = &TaskLog{} - } - if err := m.Log.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Task = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8170,9 +6672,6 @@ func (m *QueryTaskOperationResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8185,7 +6684,7 @@ func (m *QueryTaskOperationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateRelayRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8200,7 +6699,7 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8208,15 +6707,15 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateSubTaskRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateRelayRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8228,7 +6727,7 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8238,13 +6737,10 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Task = string(dAtA[iNdEx:postIndex]) + m.Content = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8255,9 +6751,6 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8270,7 +6763,7 @@ func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { +func (m *MigrateRelayRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8285,7 +6778,7 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8293,15 +6786,15 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MigrateRelayRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MigrateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BinlogName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8313,7 +6806,7 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8323,14 +6816,30 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.BinlogName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BinlogPos", wireType) + } + m.BinlogPos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BinlogPos |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -8340,9 +6849,6 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8355,7 +6861,7 @@ func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { +func (m *OperateSubTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8370,7 +6876,7 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8378,13 +6884,32 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryErrorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: OperateSubTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryErrorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OperateSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + } + m.Op = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Op |= (TaskOp(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } @@ -8398,7 +6923,7 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8408,9 +6933,6 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -8425,9 +6947,6 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8440,7 +6959,7 @@ func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { +func (m *OperateSubTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8455,7 +6974,7 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8463,17 +6982,17 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HandleSubTaskSQLsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: OperateSubTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HandleSubTaskSQLsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OperateSubTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) } - var stringLen uint64 + m.Op = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8483,29 +7002,16 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Op |= (TaskOp(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - m.Op = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8515,14 +7021,15 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= SQLOp(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + m.Result = bool(v != 0) case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8534,7 +7041,7 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8544,17 +7051,14 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) + m.Worker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BinlogPos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8566,7 +7070,7 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8576,17 +7080,143 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDmworker + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateSubTaskRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateSubTaskRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateSubTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.BinlogPos = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: + m.Task = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDmworker + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlPattern", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8598,7 +7228,7 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8608,13 +7238,10 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.SqlPattern = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8625,9 +7252,6 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8640,7 +7264,7 @@ func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { +func (m *QueryErrorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8655,7 +7279,7 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8663,67 +7287,15 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CommonWorkerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryErrorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CommonWorkerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryErrorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Worker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8735,7 +7307,7 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8745,13 +7317,10 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8762,9 +7331,6 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -8777,7 +7343,7 @@ func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { +func (m *HandleSubTaskSQLsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8792,7 +7358,7 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8800,35 +7366,15 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStatusResponse: wiretype end group for non-group") + return fmt.Errorf("proto: HandleSubTaskSQLsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HandleSubTaskSQLsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8840,7 +7386,7 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8850,19 +7396,16 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Worker = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) } - var stringLen uint64 + m.Op = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8872,29 +7415,16 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Op |= (SQLOp(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Msg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubTaskStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8904,31 +7434,26 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.SubTaskStatus = append(m.SubTaskStatus, &SubTaskStatus{}) - if err := m.SubTaskStatus[len(m.SubTaskStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BinlogPos", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -8938,31 +7463,24 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.RelayStatus == nil { - m.RelayStatus = &RelayStatus{} - } - if err := m.RelayStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.BinlogPos = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SqlPattern", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8974,7 +7492,7 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -8984,13 +7502,10 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.SourceID = string(dAtA[iNdEx:postIndex]) + m.SqlPattern = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9001,9 +7516,6 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9016,7 +7528,7 @@ func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { +func (m *CommonWorkerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9031,77 +7543,25 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryErrorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Worker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommonWorkerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommonWorkerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9111,29 +7571,17 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Msg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + m.Result = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubTaskError", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9143,31 +7591,26 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.SubTaskError = append(m.SubTaskError, &SubTaskError{}) - if err := m.SubTaskError[len(m.SubTaskError)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Worker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayError", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9177,27 +7620,20 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.RelayError == nil { - m.RelayError = &RelayError{} - } - if err := m.RelayError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9208,9 +7644,6 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9223,7 +7656,7 @@ func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *CheckStatus) Unmarshal(dAtA []byte) error { +func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9238,7 +7671,7 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9246,15 +7679,15 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckStatus: wiretype end group for non-group") + return fmt.Errorf("proto: QueryStatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Passed", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -9266,17 +7699,17 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - m.Passed = bool(v != 0) + m.Result = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) } - m.Total = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9286,16 +7719,26 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int32(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Worker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Successful", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - m.Successful = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9305,16 +7748,26 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Successful |= int32(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubTaskStatus", wireType) } - m.Failed = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9324,16 +7777,28 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Failed |= int32(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubTaskStatus = append(m.SubTaskStatus, &SubTaskStatus{}) + if err := m.SubTaskStatus[len(m.SubTaskStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayStatus", wireType) } - m.Warning = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9343,16 +7808,30 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Warning |= int32(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RelayStatus == nil { + m.RelayStatus = &RelayStatus{} + } + if err := m.RelayStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SourceID", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9362,25 +7841,20 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + byteLen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Detail = append(m.Detail[:0], dAtA[iNdEx:postIndex]...) - if m.Detail == nil { - m.Detail = []byte{} - } + m.SourceID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9391,62 +7865,6 @@ func (m *CheckStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DumpStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DumpStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DumpStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9459,7 +7877,7 @@ func (m *DumpStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *LoadStatus) Unmarshal(dAtA []byte) error { +func (m *QueryErrorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9474,7 +7892,7 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9482,17 +7900,17 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LoadStatus: wiretype end group for non-group") + return fmt.Errorf("proto: QueryErrorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LoadStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FinishedBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - m.FinishedBytes = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9502,16 +7920,46 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FinishedBytes |= int64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + m.Result = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBytes", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF } - m.TotalBytes = 0 + m.Worker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9521,16 +7969,26 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalBytes |= int64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - case 3: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SubTaskError", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9540,29 +7998,28 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Progress = string(dAtA[iNdEx:postIndex]) + m.SubTaskError = append(m.SubTaskError, &SubTaskError{}) + if err := m.SubTaskError[len(m.SubTaskError)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetaBinlog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RelayError", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9572,23 +8029,24 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.MetaBinlog = string(dAtA[iNdEx:postIndex]) + if m.RelayError == nil { + m.RelayError = &RelayError{} + } + if err := m.RelayError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9599,9 +8057,6 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -9614,7 +8069,7 @@ func (m *LoadStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ShardingGroup) Unmarshal(dAtA []byte) error { +func (m *CheckStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9629,7 +8084,7 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9637,17 +8092,17 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ShardingGroup: wiretype end group for non-group") + return fmt.Errorf("proto: CheckStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ShardingGroup: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CheckStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Passed", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9657,29 +8112,17 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Target = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Passed = bool(v != 0) case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - var stringLen uint64 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9689,29 +8132,16 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Total |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FirstPos", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Successful", wireType) } - var stringLen uint64 + m.Successful = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9721,29 +8151,16 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Successful |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FirstPos = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Synced", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) } - var stringLen uint64 + m.Failed = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9753,29 +8170,35 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Failed |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Warning = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Warning |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } } - m.Synced = append(m.Synced, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unsynced", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9785,23 +8208,22 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if byteLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Unsynced = append(m.Unsynced, string(dAtA[iNdEx:postIndex])) + m.Detail = append(m.Detail[:0], dAtA[iNdEx:postIndex]...) + if m.Detail == nil { + m.Detail = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -9812,7 +8234,54 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DumpStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DumpStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DumpStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { return ErrInvalidLengthDmworker } if (iNdEx + skippy) > l { @@ -9827,7 +8296,7 @@ func (m *ShardingGroup) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncStatus) Unmarshal(dAtA []byte) error { +func (m *LoadStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9842,7 +8311,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9850,17 +8319,17 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncStatus: wiretype end group for non-group") + return fmt.Errorf("proto: LoadStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LoadStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalEvents", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FinishedBytes", wireType) } - m.TotalEvents = 0 + m.FinishedBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9870,16 +8339,16 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalEvents |= int64(b&0x7F) << shift + m.FinishedBytes |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalTps", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalBytes", wireType) } - m.TotalTps = 0 + m.TotalBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -9889,33 +8358,14 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalTps |= int64(b&0x7F) << shift + m.TotalBytes |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RecentTps", wireType) - } - m.RecentTps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RecentTps |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9927,7 +8377,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9937,17 +8387,14 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.MasterBinlog = string(dAtA[iNdEx:postIndex]) + m.Progress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlogGtid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetaBinlog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9959,7 +8406,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -9969,17 +8416,64 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.MasterBinlogGtid = string(dAtA[iNdEx:postIndex]) + m.MetaBinlog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDmworker + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ShardingGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ShardingGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShardingGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncerBinlog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9991,7 +8485,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10001,17 +8495,14 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.SyncerBinlog = string(dAtA[iNdEx:postIndex]) + m.Target = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncerBinlogGtid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10023,7 +8514,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10033,17 +8524,14 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.SyncerBinlogGtid = string(dAtA[iNdEx:postIndex]) + m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 8: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockingDDLs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FirstPos", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10055,7 +8543,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10065,19 +8553,16 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockingDDLs = append(m.BlockingDDLs, string(dAtA[iNdEx:postIndex])) + m.FirstPos = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnresolvedGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Synced", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10087,31 +8572,26 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.UnresolvedGroups = append(m.UnresolvedGroups, &ShardingGroup{}) - if err := m.UnresolvedGroups[len(m.UnresolvedGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Synced = append(m.Synced, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Synced", wireType) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unsynced", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10121,12 +8601,21 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.Synced = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Unsynced = append(m.Unsynced, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -10136,9 +8625,6 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10151,7 +8637,7 @@ func (m *SyncStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *RelayStatus) Unmarshal(dAtA []byte) error { +func (m *SyncStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10166,7 +8652,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10174,17 +8660,17 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelayStatus: wiretype end group for non-group") + return fmt.Errorf("proto: SyncStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelayStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SyncStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlog", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalEvents", wireType) } - var stringLen uint64 + m.TotalEvents = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10194,27 +8680,52 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TotalEvents |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalTps", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker + m.TotalTps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalTps |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecentTps", wireType) } - m.MasterBinlog = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + m.RecentTps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RecentTps |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlogGtid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10226,7 +8737,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10236,17 +8747,14 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.MasterBinlogGtid = string(dAtA[iNdEx:postIndex]) + m.MasterBinlog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelaySubDir", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlogGtid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10258,7 +8766,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10268,17 +8776,14 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.RelaySubDir = string(dAtA[iNdEx:postIndex]) + m.MasterBinlogGtid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayBinlog", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SyncerBinlog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10290,7 +8795,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10300,17 +8805,14 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.RelayBinlog = string(dAtA[iNdEx:postIndex]) + m.SyncerBinlog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayBinlogGtid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SyncerBinlogGtid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10322,7 +8824,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10332,19 +8834,16 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.RelayBinlogGtid = string(dAtA[iNdEx:postIndex]) + m.SyncerBinlogGtid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayCatchUpMaster", wireType) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockingDDLs", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10354,17 +8853,26 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.RelayCatchUpMaster = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker } - m.Stage = 0 + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockingDDLs = append(m.BlockingDDLs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnresolvedGroups", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10374,16 +8882,28 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Stage |= Stage(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + if msglen < 0 { + return ErrInvalidLengthDmworker } - var msglen int + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnresolvedGroups = append(m.UnresolvedGroups, &ShardingGroup{}) + if err := m.UnresolvedGroups[len(m.UnresolvedGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Synced", wireType) + } + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10393,28 +8913,12 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &ProcessResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.Synced = bool(v != 0) default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -10424,9 +8928,6 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10439,7 +8940,7 @@ func (m *RelayStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { +func (m *RelayStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10454,7 +8955,7 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10462,15 +8963,15 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubTaskStatus: wiretype end group for non-group") + return fmt.Errorf("proto: RelayStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubTaskStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RelayStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10482,7 +8983,7 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10492,91 +8993,14 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.MasterBinlog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) - } - m.Stage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Stage |= Stage(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - m.Unit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Unit |= UnitType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &ProcessResult{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnresolvedDDLLockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MasterBinlogGtid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10588,7 +9012,7 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10598,17 +9022,14 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.UnresolvedDDLLockID = string(dAtA[iNdEx:postIndex]) + m.MasterBinlogGtid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RelaySubDir", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10620,7 +9041,7 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10630,19 +9051,16 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = &SubTaskStatus_Msg{string(dAtA[iNdEx:postIndex])} + m.RelaySubDir = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RelayBinlog", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10652,32 +9070,26 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - v := &CheckStatus{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &SubTaskStatus_Check{v} + m.RelayBinlog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RelayBinlogGtid", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10687,32 +9099,26 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - v := &DumpStatus{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &SubTaskStatus_Dump{v} + m.RelayBinlogGtid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Load", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayCatchUpMaster", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10722,32 +9128,17 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &LoadStatus{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &SubTaskStatus_Load{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) + m.RelayCatchUpMaster = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) } - var msglen int + m.Stage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -10757,83 +9148,14 @@ func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Stage |= (Stage(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SyncStatus{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &SubTaskStatus_Sync{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubTaskStatusList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubTaskStatusList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10845,7 +9167,7 @@ func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -10854,14 +9176,13 @@ func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = append(m.Status, &SubTaskStatus{}) - if err := m.Status[len(m.Status)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Result == nil { + m.Result = &ProcessResult{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10874,9 +9195,6 @@ func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -10889,7 +9207,7 @@ func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { } return nil } -func (m *CheckError) Unmarshal(dAtA []byte) error { +func (m *SubTaskStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10904,7 +9222,7 @@ func (m *CheckError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10912,15 +9230,15 @@ func (m *CheckError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckError: wiretype end group for non-group") + return fmt.Errorf("proto: SubTaskStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubTaskStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10932,7 +9250,7 @@ func (m *CheckError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -10942,70 +9260,85 @@ func (m *CheckError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) } - if skippy < 0 { - return ErrInvalidLengthDmworker + m.Stage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Stage |= (Stage(b) & 0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.Unit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unit |= (UnitType(b) & 0x7F) << shift + if b < 0x80 { + break + } } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DumpError) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - if iNdEx >= l { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.Result == nil { + m.Result = &ProcessResult{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DumpError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DumpError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnresolvedDDLLockID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11017,7 +9350,7 @@ func (m *DumpError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11027,68 +9360,12 @@ func (m *DumpError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.UnresolvedDDLLockID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadError) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } @@ -11102,7 +9379,7 @@ func (m *LoadError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11112,72 +9389,48 @@ func (m *LoadError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.Status = &SubTaskStatus_Msg{string(dAtA[iNdEx:postIndex])} iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) } - if skippy < 0 { - return ErrInvalidLengthDmworker + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SyncSQLError) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SyncSQLError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SyncSQLError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + v := &CheckStatus{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Status = &SubTaskStatus_Check{v} + iNdEx = postIndex + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11187,29 +9440,29 @@ func (m *SyncSQLError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + v := &DumpStatus{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Status = &SubTaskStatus_Dump{v} iNdEx = postIndex - case 2: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FailedBinlogPosition", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Load", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11219,29 +9472,29 @@ func (m *SyncSQLError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.FailedBinlogPosition = string(dAtA[iNdEx:postIndex]) + v := &LoadStatus{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Status = &SubTaskStatus_Load{v} iNdEx = postIndex - case 3: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSQL", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11251,23 +9504,23 @@ func (m *SyncSQLError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.ErrorSQL = string(dAtA[iNdEx:postIndex]) + v := &SyncStatus{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Status = &SubTaskStatus_Sync{v} iNdEx = postIndex default: iNdEx = preIndex @@ -11278,9 +9531,6 @@ func (m *SyncSQLError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11293,7 +9543,7 @@ func (m *SyncSQLError) Unmarshal(dAtA []byte) error { } return nil } -func (m *SyncError) Unmarshal(dAtA []byte) error { +func (m *SubTaskStatusList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11308,7 +9558,7 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11316,15 +9566,15 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SyncError: wiretype end group for non-group") + return fmt.Errorf("proto: SubTaskStatusList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SyncError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubTaskStatusList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11336,7 +9586,7 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -11345,14 +9595,11 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Errors = append(m.Errors, &SyncSQLError{}) - if err := m.Errors[len(m.Errors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Status = append(m.Status, &SubTaskStatus{}) + if err := m.Status[len(m.Status)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11365,9 +9612,6 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11380,7 +9624,7 @@ func (m *SyncError) Unmarshal(dAtA []byte) error { } return nil } -func (m *RelayError) Unmarshal(dAtA []byte) error { +func (m *CheckError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11395,7 +9639,7 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11403,10 +9647,10 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelayError: wiretype end group for non-group") + return fmt.Errorf("proto: CheckError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelayError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CheckError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -11423,7 +9667,7 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11433,9 +9677,6 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -11450,9 +9691,6 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11465,7 +9703,7 @@ func (m *RelayError) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubTaskError) Unmarshal(dAtA []byte) error { +func (m *DumpError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11480,7 +9718,7 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11488,15 +9726,15 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubTaskError: wiretype end group for non-group") + return fmt.Errorf("proto: DumpError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubTaskError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DumpError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11508,7 +9746,7 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11518,53 +9756,62 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err } - m.Stage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Stage |= Stage(b&0x7F) << shift - if b < 0x80 { - break - } + if skippy < 0 { + return ErrInvalidLengthDmworker } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.Unit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Unit |= UnitType(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LoadError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker } - case 4: + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LoadError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LoadError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } @@ -11578,7 +9825,7 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11588,54 +9835,66 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = &SubTaskError_Msg{string(dAtA[iNdEx:postIndex])} + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if skippy < 0 { return ErrInvalidLengthDmworker } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SyncSQLError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - v := &CheckError{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break } - m.Error = &SubTaskError_Check{v} - iNdEx = postIndex - case 6: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SyncSQLError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SyncSQLError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11645,32 +9904,26 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - v := &DumpError{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Error = &SubTaskError_Dump{v} + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Load", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FailedBinlogPosition", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11680,32 +9933,26 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - v := &LoadError{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Error = &SubTaskError_Load{v} + m.FailedBinlogPosition = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ErrorSQL", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11715,26 +9962,20 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - v := &SyncError{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Error = &SubTaskError_Sync{v} + m.ErrorSQL = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11745,9 +9986,6 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11760,7 +9998,7 @@ func (m *SubTaskError) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { +func (m *SyncError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11775,7 +10013,7 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11783,15 +10021,15 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubTaskErrorList: wiretype end group for non-group") + return fmt.Errorf("proto: SyncError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubTaskErrorList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SyncError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11803,7 +10041,7 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -11812,14 +10050,11 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = append(m.Error, &SubTaskError{}) - if err := m.Error[len(m.Error)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Errors = append(m.Errors, &SyncSQLError{}) + if err := m.Errors[len(m.Errors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11832,9 +10067,6 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11847,7 +10079,7 @@ func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProcessResult) Unmarshal(dAtA []byte) error { +func (m *RelayError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11862,7 +10094,7 @@ func (m *ProcessResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -11870,71 +10102,17 @@ func (m *ProcessResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProcessResult: wiretype end group for non-group") + return fmt.Errorf("proto: RelayError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProcessResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RelayError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsCanceled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsCanceled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Errors = append(m.Errors, &ProcessError{}) - if err := m.Errors[len(m.Errors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -11944,25 +10122,20 @@ func (m *ProcessResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + byteLen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Detail = append(m.Detail[:0], dAtA[iNdEx:postIndex]...) - if m.Detail == nil { - m.Detail = []byte{} - } + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11973,9 +10146,6 @@ func (m *ProcessResult) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -11988,7 +10158,7 @@ func (m *ProcessResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *TError) Unmarshal(dAtA []byte) error { +func (m *SubTaskError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12003,7 +10173,7 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12011,17 +10181,17 @@ func (m *TError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TError: wiretype end group for non-group") + return fmt.Errorf("proto: SubTaskError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubTaskError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - m.ErrCode = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12031,16 +10201,26 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrCode |= int32(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrClass", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) } - m.ErrClass = 0 + m.Stage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12050,16 +10230,16 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrClass |= int32(b&0x7F) << shift + m.Stage |= (Stage(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrScope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) } - m.ErrScope = 0 + m.Unit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12069,16 +10249,77 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrScope |= int32(b&0x7F) << shift + m.Unit |= (UnitType(b) & 0x7F) << shift if b < 0x80 { break } } case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrLevel", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - m.ErrLevel = 0 + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = &SubTaskError_Msg{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &CheckError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Error = &SubTaskError_Check{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12088,16 +10329,29 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrLevel |= int32(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - case 5: + if msglen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &DumpError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Error = &SubTaskError_Dump{v} + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Load", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12107,29 +10361,29 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + v := &LoadError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Error = &SubTaskError_Load{v} iNdEx = postIndex - case 6: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RawCause", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12139,23 +10393,23 @@ func (m *TError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.RawCause = string(dAtA[iNdEx:postIndex]) + v := &SyncError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Error = &SubTaskError_Sync{v} iNdEx = postIndex default: iNdEx = preIndex @@ -12166,9 +10420,6 @@ func (m *TError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -12181,7 +10432,7 @@ func (m *TError) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProcessError) Unmarshal(dAtA []byte) error { +func (m *SubTaskErrorList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12196,7 +10447,7 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12204,64 +10455,13 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProcessError: wiretype end group for non-group") + return fmt.Errorf("proto: SubTaskErrorList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProcessError: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubTaskErrorList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ErrorType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Msg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } @@ -12275,7 +10475,7 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -12284,16 +10484,11 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &TError{} - } - if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Error = append(m.Error, &SubTaskError{}) + if err := m.Error[len(m.Error)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12306,9 +10501,6 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -12321,7 +10513,7 @@ func (m *ProcessError) Unmarshal(dAtA []byte) error { } return nil } -func (m *DDLInfo) Unmarshal(dAtA []byte) error { +func (m *ProcessResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12336,7 +10528,7 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12344,17 +10536,17 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DDLInfo: wiretype end group for non-group") + return fmt.Errorf("proto: ProcessResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DDLInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ProcessResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsCanceled", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12364,29 +10556,17 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Task = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.IsCanceled = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12396,29 +10576,28 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Schema = string(dAtA[iNdEx:postIndex]) + m.Errors = append(m.Errors, &ProcessError{}) + if err := m.Errors[len(m.Errors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12428,55 +10607,22 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if byteLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Table = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Detail = append(m.Detail[:0], dAtA[iNdEx:postIndex]...) + if m.Detail == nil { + m.Detail = []byte{} } - m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -12487,9 +10633,6 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -12502,7 +10645,7 @@ func (m *DDLInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { +func (m *TError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12512,28 +10655,104 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowDmworker } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType) + } + m.ErrCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrClass", wireType) + } + m.ErrClass = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrClass |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrScope", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.ErrScope = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrScope |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DDLLockInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DDLLockInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrLevel", wireType) + } + m.ErrLevel = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrLevel |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12545,7 +10764,7 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12555,17 +10774,14 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Task = string(dAtA[iNdEx:postIndex]) + m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawCause", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12577,7 +10793,7 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12587,13 +10803,10 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.ID = string(dAtA[iNdEx:postIndex]) + m.RawCause = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -12604,9 +10817,6 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -12619,7 +10829,7 @@ func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { +func (m *ProcessError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12634,7 +10844,7 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12642,17 +10852,17 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExecDDLRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ProcessError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExecDDLRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ProcessError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12662,27 +10872,14 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Type |= (ErrorType(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Task = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12694,7 +10891,7 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12704,39 +10901,16 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.LockID = string(dAtA[iNdEx:postIndex]) + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exec = bool(v != 0) - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceGID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12746,55 +10920,24 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.TraceGID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker + if m.Error == nil { + m.Error = &TError{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -12805,9 +10948,6 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -12820,7 +10960,7 @@ func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { +func (m *DDLInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12835,7 +10975,7 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12843,10 +10983,10 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BreakDDLLockRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DDLInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BreakDDLLockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DDLInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -12863,7 +11003,7 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12873,9 +11013,6 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -12883,7 +11020,7 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoveLockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12895,7 +11032,7 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12905,19 +11042,16 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.RemoveLockID = string(dAtA[iNdEx:postIndex]) + m.Schema = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecDDL", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12927,17 +11061,26 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.ExecDDL = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Table = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SkipDDL", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -12947,65 +11090,21 @@ func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.SkipDDL = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipDmworker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDmworker - } - if (iNdEx + skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwitchRelayMasterRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SwitchRelayMasterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwitchRelayMasterRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -13015,9 +11114,6 @@ func (m *SwitchRelayMasterRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13030,7 +11126,7 @@ func (m *SwitchRelayMasterRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { +func (m *DDLLockInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13045,7 +11141,7 @@ func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13053,17 +11149,46 @@ func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OperateRelayRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DDLLockInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OperateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DDLLockInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) } - m.Op = 0 + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Task = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13073,11 +11198,21 @@ func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= RelayOp(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -13087,9 +11222,6 @@ func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13102,7 +11234,7 @@ func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { +func (m *ExecDDLRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13117,7 +11249,7 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13125,17 +11257,17 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OperateRelayResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ExecDDLRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OperateRelayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExecDDLRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) } - m.Op = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13145,14 +11277,53 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= RelayOp(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Task = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -13164,15 +11335,15 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - m.Result = bool(v != 0) - case 3: + m.Exec = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TraceGID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13184,7 +11355,7 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13194,17 +11365,14 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Worker = string(dAtA[iNdEx:postIndex]) + m.TraceGID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DDLs", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13216,7 +11384,7 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13226,13 +11394,10 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.DDLs = append(m.DDLs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -13243,9 +11408,6 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13258,7 +11420,7 @@ func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { +func (m *BreakDDLLockRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13273,7 +11435,7 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13281,17 +11443,17 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PurgeRelayRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BreakDDLLockRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PurgeRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BreakDDLLockRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13301,17 +11463,26 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.Inactive = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Task = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveLockID", wireType) } - m.Time = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13321,16 +11492,26 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Time |= int64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RemoveLockID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecDDL", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13340,29 +11521,17 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filename = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.ExecDDL = bool(v != 0) case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubDir", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipDDL", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13372,24 +11541,62 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker + m.SkipDDL = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if skippy < 0 { return ErrInvalidLengthDmworker } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.SubDir = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SwitchRelayMasterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SwitchRelayMasterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SwitchRelayMasterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -13399,9 +11606,6 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13414,7 +11618,7 @@ func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { +func (m *OperateRelayRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13429,7 +11633,7 @@ func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13437,12 +11641,31 @@ func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryWorkerConfigRequest: wiretype end group for non-group") + return fmt.Errorf("proto: OperateRelayRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryWorkerConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OperateRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + } + m.Op = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Op |= (RelayOp(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDmworker(dAtA[iNdEx:]) @@ -13452,9 +11675,6 @@ func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13467,7 +11687,7 @@ func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { +func (m *OperateRelayResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13482,7 +11702,7 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13490,17 +11710,17 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryWorkerConfigResponse: wiretype end group for non-group") + return fmt.Errorf("proto: OperateRelayResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryWorkerConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OperateRelayResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) } - var v int + m.Op = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13510,17 +11730,16 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Op |= (RelayOp(b) & 0x7F) << shift if b < 0x80 { break } } - m.Result = bool(v != 0) case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13530,27 +11749,15 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Worker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Result = bool(v != 0) case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13562,7 +11769,7 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13572,49 +11779,14 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Msg = string(dAtA[iNdEx:postIndex]) + m.Worker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDmworker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourceID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13626,7 +11798,7 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13636,13 +11808,10 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Content = string(dAtA[iNdEx:postIndex]) + m.Msg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -13653,9 +11822,6 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -13668,7 +11834,7 @@ func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TaskMeta) Unmarshal(dAtA []byte) error { +func (m *PurgeRelayRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13683,7 +11849,7 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13691,17 +11857,17 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TaskMeta: wiretype end group for non-group") + return fmt.Errorf("proto: PurgeRelayRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TaskMeta: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PurgeRelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) } - m.Op = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13711,16 +11877,17 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Op |= TaskOp(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + m.Inactive = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - m.Stage = 0 + m.Time = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13730,14 +11897,14 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Stage |= Stage(b&0x7F) << shift + m.Time |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13749,7 +11916,7 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13759,19 +11926,16 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SubDir", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13781,25 +11945,20 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + byteLen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Task = append(m.Task[:0], dAtA[iNdEx:postIndex]...) - if m.Task == nil { - m.Task = []byte{} - } + m.SubDir = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -13810,7 +11969,54 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWorkerConfigRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDmworker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryWorkerConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWorkerConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDmworker(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { return ErrInvalidLengthDmworker } if (iNdEx + skippy) > l { @@ -13825,7 +12031,7 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { } return nil } -func (m *TaskLog) Unmarshal(dAtA []byte) error { +func (m *QueryWorkerConfigResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13840,7 +12046,7 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13848,17 +12054,17 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TaskLog: wiretype end group for non-group") + return fmt.Errorf("proto: QueryWorkerConfigResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TaskLog: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryWorkerConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - m.Id = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13868,16 +12074,17 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= int64(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + m.Result = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13887,33 +12094,26 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthDmworker - } - postIndex := iNdEx + msglen - if postIndex < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthDmworker } + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Task == nil { - m.Task = &TaskMeta{} - } - if err := m.Task.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Worker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) } - m.Ts = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13923,16 +12123,26 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ts |= int64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceID", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDmworker @@ -13942,15 +12152,24 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.Success = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDmworker + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13962,7 +12181,7 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13972,13 +12191,10 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDmworker } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDmworker - } if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.Content = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -13989,9 +12205,6 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthDmworker } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDmworker - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -14007,7 +12220,6 @@ func (m *TaskLog) Unmarshal(dAtA []byte) error { func skipDmworker(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -14039,8 +12251,10 @@ func skipDmworker(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -14057,34 +12271,198 @@ func skipDmworker(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthDmworker } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDmworker + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDmworker + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipDmworker(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthDmworker - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthDmworker = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDmworker = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDmworker = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthDmworker = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDmworker = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("dmworker.proto", fileDescriptor_dmworker_84482ac67274de9a) } + +var fileDescriptor_dmworker_84482ac67274de9a = []byte{ + // 2210 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcf, 0x6f, 0x23, 0x59, + 0xf1, 0x77, 0xb7, 0x7f, 0xc4, 0x2e, 0x3b, 0x99, 0xce, 0x4b, 0x36, 0xeb, 0xf1, 0x77, 0x37, 0xdf, + 0xd0, 0xb3, 0xda, 0xcd, 0xe6, 0x10, 0xed, 0x06, 0x10, 0x12, 0xb0, 0xc0, 0xc6, 0xce, 0x64, 0x0c, + 0xce, 0x4c, 0xd2, 0xce, 0x00, 0xb7, 0x55, 0xa7, 0xfd, 0xe2, 0xb4, 0xd2, 0xee, 0xee, 0xe9, 0x1f, + 0xc9, 0xe6, 0x06, 0xe2, 0x88, 0x84, 0x90, 0x90, 0x90, 0x10, 0x67, 0x6e, 0xfc, 0x09, 0xdc, 0xe1, + 0xb8, 0x47, 0x6e, 0xa0, 0x99, 0x7f, 0x83, 0x03, 0xaa, 0x7a, 0xaf, 0xbb, 0x5f, 0x27, 0xb6, 0x77, + 0x0f, 0xc3, 0x25, 0x72, 0xfd, 0x78, 0xf5, 0xea, 0x7d, 0xaa, 0xba, 0xea, 0xbd, 0x0a, 0xac, 0x4d, + 0x66, 0xb7, 0x41, 0x74, 0xcd, 0xa3, 0xfd, 0x30, 0x0a, 0x92, 0x80, 0xe9, 0xe1, 0x85, 0xf9, 0x31, + 0x6c, 0x8c, 0x13, 0x3b, 0x4a, 0xc6, 0xe9, 0xc5, 0xb9, 0x1d, 0x5f, 0x5b, 0xfc, 0x55, 0xca, 0xe3, + 0x84, 0x31, 0xa8, 0x25, 0x76, 0x7c, 0xdd, 0xd5, 0x76, 0xb4, 0xdd, 0x96, 0x45, 0xbf, 0xcd, 0x7d, + 0x60, 0x2f, 0xc3, 0x89, 0x9d, 0x70, 0x8b, 0x7b, 0xf6, 0x5d, 0xa6, 0xd9, 0x85, 0x15, 0x27, 0xf0, + 0x13, 0xee, 0x27, 0x52, 0x39, 0x23, 0xcd, 0x31, 0x6c, 0x9c, 0xb8, 0xd3, 0xe8, 0xfe, 0x82, 0x6d, + 0x80, 0x43, 0xd7, 0xf7, 0x82, 0xe9, 0x73, 0x7b, 0xc6, 0xe5, 0x1a, 0x85, 0xc3, 0xde, 0x83, 0x96, + 0xa0, 0x4e, 0x83, 0xb8, 0xab, 0xef, 0x68, 0xbb, 0xab, 0x56, 0xc1, 0x30, 0x8f, 0xe1, 0x9d, 0x17, + 0x21, 0x47, 0xa3, 0xf7, 0x3c, 0xee, 0x81, 0x1e, 0x84, 0x64, 0x6e, 0xed, 0x00, 0xf6, 0xc3, 0x8b, + 0x7d, 0x14, 0xbe, 0x08, 0x2d, 0x3d, 0x08, 0xf1, 0x34, 0x3e, 0x6e, 0xa6, 0x8b, 0xd3, 0xe0, 0x6f, + 0xf3, 0x06, 0xb6, 0xee, 0x1b, 0x8a, 0xc3, 0xc0, 0x8f, 0xf9, 0x52, 0x4b, 0x5b, 0xd0, 0x88, 0x78, + 0x9c, 0x7a, 0x09, 0xd9, 0x6a, 0x5a, 0x92, 0x42, 0xbe, 0x80, 0xb6, 0x5b, 0xa5, 0x3d, 0x24, 0xc5, + 0x0c, 0xa8, 0xce, 0xe2, 0x69, 0xb7, 0x46, 0x4c, 0xfc, 0x69, 0xee, 0xc1, 0xa6, 0x40, 0xf1, 0x1b, + 0x20, 0xbe, 0x0b, 0xec, 0x2c, 0xe5, 0xd1, 0xdd, 0x38, 0xb1, 0x93, 0x34, 0x56, 0x34, 0xfd, 0x02, + 0x3a, 0x71, 0x9a, 0x8f, 0x60, 0x9d, 0x34, 0x8f, 0xa2, 0x28, 0x88, 0x96, 0x29, 0xfe, 0x59, 0x83, + 0xee, 0x33, 0xdb, 0x9f, 0x78, 0xd9, 0xfe, 0xe3, 0xb3, 0xd1, 0x32, 0xcb, 0xec, 0x31, 0xa1, 0xa1, + 0x13, 0x1a, 0x2d, 0x44, 0x63, 0x7c, 0x36, 0x2a, 0x60, 0xb5, 0xa3, 0x69, 0xdc, 0xad, 0xee, 0x54, + 0x51, 0x1d, 0x7f, 0x63, 0xf4, 0x2e, 0xf2, 0xe8, 0x89, 0x63, 0x17, 0x0c, 0x8c, 0x7d, 0xfc, 0xca, + 0x3b, 0xb5, 0x93, 0x84, 0x47, 0x7e, 0xb7, 0x2e, 0x62, 0x5f, 0x70, 0xcc, 0x5f, 0xc2, 0x66, 0x3f, + 0x98, 0xcd, 0x02, 0xff, 0x17, 0x04, 0x5f, 0x1e, 0x92, 0x02, 0x76, 0x6d, 0x01, 0xec, 0xfa, 0x3c, + 0xd8, 0xab, 0x05, 0xec, 0xff, 0xd2, 0x60, 0xa3, 0x84, 0xe5, 0xdb, 0xb2, 0xcc, 0xbe, 0x07, 0xab, + 0xb1, 0x84, 0x92, 0x4c, 0x77, 0x6b, 0x3b, 0xd5, 0xdd, 0xf6, 0xc1, 0x3a, 0x61, 0xa5, 0x0a, 0xac, + 0xb2, 0x1e, 0xfb, 0x14, 0xda, 0x11, 0x7e, 0x18, 0x72, 0x19, 0xa2, 0xd1, 0x3e, 0x78, 0x84, 0xcb, + 0xac, 0x82, 0x6d, 0xa9, 0x3a, 0xac, 0x07, 0xcd, 0x38, 0x48, 0x23, 0x87, 0x0f, 0x07, 0xdd, 0x06, + 0xb9, 0x90, 0xd3, 0xe6, 0xdf, 0x34, 0x99, 0x2d, 0x32, 0x07, 0xde, 0xda, 0x01, 0xbf, 0x03, 0x1d, + 0xe9, 0x38, 0x59, 0x96, 0xe7, 0x33, 0x94, 0xf3, 0x89, 0x1d, 0x4b, 0x5a, 0x6c, 0x1f, 0x80, 0x8e, + 0x21, 0xd6, 0x88, 0xc3, 0xad, 0xe5, 0x87, 0x13, 0x2b, 0x14, 0x0d, 0xf3, 0x2f, 0x1a, 0xb4, 0xfb, + 0x57, 0xdc, 0xc9, 0xd0, 0xd9, 0x82, 0x46, 0x68, 0xc7, 0x31, 0x9f, 0x64, 0x7e, 0x0b, 0x8a, 0x6d, + 0x42, 0x3d, 0x09, 0x12, 0xdb, 0x23, 0xb7, 0xeb, 0x96, 0x20, 0x28, 0xb1, 0x52, 0xc7, 0xe1, 0x71, + 0x7c, 0x99, 0x7a, 0xe4, 0x7c, 0xdd, 0x52, 0x38, 0x68, 0xed, 0xd2, 0x76, 0x3d, 0x3e, 0xa1, 0x9c, + 0xac, 0x5b, 0x92, 0xc2, 0xea, 0x75, 0x6b, 0x47, 0xbe, 0xeb, 0x4f, 0xc9, 0xc5, 0xba, 0x95, 0x91, + 0xb8, 0x62, 0xc2, 0x13, 0xdb, 0xf5, 0x08, 0xe8, 0x8e, 0x25, 0x29, 0xb3, 0x03, 0x30, 0x48, 0x67, + 0xa1, 0xf0, 0xd2, 0xfc, 0x9d, 0x06, 0x30, 0x0a, 0xec, 0x89, 0x74, 0xfa, 0x03, 0x58, 0xbd, 0x74, + 0x7d, 0x37, 0xbe, 0xe2, 0x93, 0xc3, 0xbb, 0x84, 0xc7, 0xe4, 0x7b, 0xd5, 0x2a, 0x33, 0xd1, 0x59, + 0xf2, 0x5a, 0xa8, 0xe8, 0xa4, 0xa2, 0x70, 0x30, 0xca, 0x61, 0x14, 0x4c, 0x23, 0x1e, 0xc7, 0x32, + 0x0e, 0x39, 0x8d, 0x6b, 0x67, 0x3c, 0xb1, 0x45, 0x41, 0x94, 0x1f, 0x98, 0xc2, 0x31, 0x7f, 0xab, + 0xc1, 0xea, 0xf8, 0xca, 0x8e, 0x26, 0xae, 0x3f, 0x3d, 0x8e, 0x82, 0x94, 0x4a, 0x56, 0x62, 0x47, + 0x53, 0x9e, 0xd5, 0x67, 0x49, 0xe1, 0xd7, 0x3b, 0x18, 0x8c, 0x70, 0x7f, 0xfa, 0x7a, 0xf1, 0x37, + 0xee, 0x7c, 0xe9, 0x46, 0x71, 0x82, 0x1f, 0xaf, 0xdc, 0x39, 0xa3, 0xd1, 0x4e, 0x7c, 0xe7, 0x3b, + 0x04, 0x21, 0xae, 0x90, 0x14, 0xae, 0x49, 0x7d, 0x29, 0xa9, 0x93, 0x24, 0xa7, 0xcd, 0xdf, 0x54, + 0x01, 0xc6, 0x77, 0xbe, 0x23, 0xe1, 0xd9, 0x81, 0x36, 0x1d, 0xf3, 0xe8, 0x86, 0xfb, 0x49, 0x06, + 0x8e, 0xca, 0x42, 0x63, 0x44, 0x9e, 0x87, 0x19, 0x30, 0x39, 0x8d, 0xa5, 0x25, 0xe2, 0x0e, 0xf7, + 0x13, 0x14, 0x56, 0x49, 0x58, 0x30, 0x98, 0x09, 0x9d, 0x99, 0x1d, 0x27, 0x3c, 0x2a, 0x41, 0x53, + 0xe2, 0xb1, 0x3d, 0x30, 0x54, 0xfa, 0x38, 0x71, 0x27, 0xb2, 0x08, 0x3d, 0xe0, 0xa3, 0x3d, 0x3a, + 0x44, 0x66, 0x4f, 0x7c, 0x6e, 0x25, 0x1e, 0xda, 0x53, 0x69, 0xb2, 0xb7, 0x22, 0xec, 0xdd, 0xe7, + 0xa3, 0xbd, 0x0b, 0x2f, 0x70, 0xae, 0x5d, 0x7f, 0x4a, 0xb0, 0x37, 0x09, 0xaa, 0x12, 0x8f, 0x7d, + 0x06, 0x46, 0xea, 0x47, 0x3c, 0x0e, 0xbc, 0x1b, 0x3e, 0xa1, 0xe8, 0xc5, 0xdd, 0x96, 0x52, 0x4d, + 0xd4, 0xb8, 0x5a, 0x0f, 0x54, 0x95, 0x08, 0x81, 0xf8, 0x64, 0x64, 0x14, 0xfe, 0xae, 0x43, 0x5b, + 0x29, 0x29, 0x0f, 0xa0, 0xd2, 0xbe, 0x21, 0x54, 0xfa, 0x02, 0xa8, 0x76, 0xb2, 0x42, 0x96, 0x5e, + 0x0c, 0xdc, 0xac, 0x03, 0xaa, 0xac, 0x5c, 0xa3, 0x14, 0x1b, 0x95, 0xc5, 0x76, 0xe1, 0x91, 0x42, + 0x2a, 0x91, 0xb9, 0xcf, 0x66, 0xfb, 0xc0, 0x88, 0xd5, 0xb7, 0x13, 0xe7, 0xea, 0x65, 0x78, 0x42, + 0xde, 0x50, 0x78, 0x9a, 0xd6, 0x1c, 0x09, 0xfb, 0x7f, 0xa8, 0xc7, 0x89, 0x3d, 0xe5, 0x14, 0x99, + 0xac, 0x87, 0x21, 0xc3, 0x12, 0x7c, 0xf6, 0x71, 0x5e, 0x21, 0x9b, 0x54, 0xa5, 0x08, 0xeb, 0xd3, + 0x28, 0xc0, 0xda, 0x61, 0x91, 0x20, 0x2b, 0x9a, 0xe6, 0x7f, 0x74, 0x58, 0x2d, 0xd5, 0xf4, 0xb9, + 0x2d, 0x33, 0xdf, 0x51, 0x5f, 0xb0, 0xe3, 0x0e, 0xd4, 0x52, 0xdf, 0x4d, 0x08, 0xa9, 0xb5, 0x83, + 0x0e, 0xca, 0x5f, 0xfa, 0x6e, 0x72, 0x7e, 0x17, 0x72, 0x8b, 0x24, 0x8a, 0x4f, 0xb5, 0xaf, 0xf1, + 0x89, 0x7d, 0x02, 0x1b, 0x45, 0x26, 0x0c, 0x06, 0xa3, 0x51, 0xe0, 0x5c, 0x0f, 0x07, 0x12, 0xbd, + 0x79, 0x22, 0xc6, 0x44, 0x89, 0xa7, 0x8c, 0x7e, 0x56, 0x11, 0x45, 0xfe, 0x23, 0xa8, 0x3b, 0x58, + 0x7d, 0x09, 0x25, 0xd9, 0x86, 0x94, 0x72, 0xfc, 0xac, 0x62, 0x09, 0x39, 0xfb, 0x00, 0x6a, 0x93, + 0x74, 0x16, 0x4a, 0xac, 0xa8, 0xa2, 0x17, 0xf5, 0xf0, 0x59, 0xc5, 0x22, 0x29, 0x6a, 0x79, 0x81, + 0x3d, 0xe9, 0xb6, 0x0a, 0xad, 0xa2, 0x4c, 0xa2, 0x16, 0x4a, 0x51, 0x0b, 0x53, 0x94, 0xd2, 0x55, + 0x6a, 0x15, 0xd5, 0x02, 0xb5, 0x50, 0x7a, 0xd8, 0x84, 0x46, 0x2c, 0xaa, 0xed, 0x8f, 0x60, 0xbd, + 0x84, 0xfe, 0xc8, 0x8d, 0x09, 0x2a, 0x21, 0xee, 0x6a, 0x8b, 0x1a, 0x6f, 0xb6, 0x7e, 0x1b, 0x80, + 0xce, 0x24, 0x3a, 0x94, 0xec, 0x74, 0x5a, 0x71, 0x49, 0x78, 0x1f, 0x5a, 0x78, 0x96, 0x25, 0x62, + 0x3c, 0xc4, 0x22, 0x71, 0x08, 0x1d, 0xf2, 0xfe, 0x6c, 0xb4, 0x40, 0x83, 0x1d, 0xc0, 0xa6, 0xe8, + 0x3b, 0xf9, 0x7d, 0xd6, 0x4d, 0xdc, 0xc0, 0x97, 0x1f, 0xd6, 0x5c, 0x19, 0x56, 0x44, 0x8e, 0xe6, + 0xc6, 0x67, 0xa3, 0xac, 0x24, 0x67, 0xb4, 0xf9, 0x5d, 0x68, 0xe1, 0x8e, 0x62, 0xbb, 0x5d, 0x68, + 0x90, 0x20, 0xc3, 0xc1, 0xc8, 0xe1, 0x94, 0x0e, 0x59, 0x52, 0x8e, 0x30, 0x14, 0x8d, 0x77, 0xce, + 0x41, 0xfe, 0xa4, 0x43, 0x47, 0xed, 0xec, 0xff, 0xab, 0x24, 0x67, 0xca, 0xe5, 0x38, 0xcb, 0xc3, + 0x0f, 0xb3, 0x3c, 0x54, 0x6e, 0x0c, 0x45, 0xcc, 0x8a, 0x34, 0x7c, 0x22, 0xd3, 0xb0, 0x41, 0x6a, + 0xab, 0x59, 0x1a, 0x66, 0x5a, 0x22, 0x0b, 0x9f, 0xc8, 0x2c, 0x5c, 0x29, 0x94, 0xf2, 0x00, 0xe6, + 0x49, 0xf8, 0x44, 0x26, 0x61, 0xb3, 0x50, 0xca, 0x41, 0xcd, 0x73, 0x70, 0x05, 0xea, 0x04, 0x9e, + 0xf9, 0x7d, 0x30, 0x54, 0x68, 0x28, 0x03, 0x3f, 0x94, 0xc2, 0x12, 0xf0, 0xea, 0xcd, 0x48, 0xae, + 0x7d, 0x05, 0xab, 0xa5, 0x4f, 0x18, 0x9b, 0xb9, 0x1b, 0xf7, 0x6d, 0xdf, 0xe1, 0x5e, 0x7e, 0xcf, + 0x51, 0x38, 0x4a, 0x48, 0xf5, 0xc2, 0xb2, 0x34, 0x51, 0x0a, 0xa9, 0x72, 0x5b, 0xa9, 0x96, 0x6e, + 0x2b, 0x7f, 0xd5, 0xa0, 0x71, 0x2e, 0x82, 0xd8, 0x85, 0x95, 0xa3, 0x28, 0xea, 0x07, 0x13, 0x11, + 0xc7, 0xba, 0x95, 0x91, 0x98, 0x62, 0xf8, 0xd3, 0xb3, 0xe3, 0x58, 0xde, 0xaa, 0x72, 0x5a, 0xca, + 0xc6, 0x4e, 0x10, 0x72, 0x79, 0xad, 0xca, 0x69, 0x29, 0x1b, 0xf1, 0x1b, 0xee, 0xc9, 0x6b, 0x55, + 0x4e, 0xe3, 0x6e, 0x27, 0x3c, 0x8e, 0x31, 0x41, 0x44, 0x25, 0xca, 0x48, 0x5c, 0x65, 0xd9, 0xb7, + 0x7d, 0x3b, 0x8d, 0x79, 0x76, 0x87, 0xcd, 0x68, 0x93, 0x43, 0x47, 0x3d, 0x1e, 0xfb, 0x16, 0xd4, + 0x30, 0x5f, 0xe4, 0x63, 0x8c, 0x62, 0x43, 0x02, 0x91, 0x44, 0xf8, 0x37, 0x4b, 0x5f, 0xbd, 0xf8, + 0xca, 0x76, 0xb2, 0x70, 0x54, 0x29, 0xa2, 0xe2, 0x09, 0x57, 0x0a, 0xc4, 0x17, 0xb0, 0x32, 0x18, + 0x8c, 0x86, 0xfe, 0x65, 0x30, 0xef, 0xd9, 0x45, 0x7d, 0xd4, 0xb9, 0xe2, 0x33, 0x3b, 0xbb, 0x1a, + 0x0b, 0x8a, 0xae, 0x9e, 0xf6, 0x85, 0xc7, 0xe5, 0x77, 0x28, 0x88, 0xfc, 0x1e, 0x55, 0x2b, 0xee, + 0x51, 0xe6, 0xa7, 0xd0, 0xce, 0xca, 0xed, 0xa2, 0x4d, 0xd6, 0x40, 0x1f, 0x0e, 0xe4, 0x06, 0xfa, + 0x70, 0x60, 0xfe, 0x4a, 0x83, 0xb5, 0xa3, 0x2f, 0xb9, 0x33, 0x18, 0x8c, 0x96, 0x3c, 0x09, 0xd1, + 0x37, 0x4f, 0x14, 0x78, 0xe9, 0x9b, 0x97, 0xd5, 0xf4, 0x1a, 0xff, 0x92, 0x3b, 0xe4, 0x5a, 0xd3, + 0xa2, 0xdf, 0x74, 0x99, 0x8a, 0x6c, 0x87, 0x1f, 0x0f, 0x07, 0xb2, 0xe5, 0xe6, 0x74, 0xee, 0x75, + 0x5d, 0xf1, 0xfa, 0xd7, 0x1a, 0x6c, 0x1c, 0x46, 0xdc, 0xbe, 0x96, 0xbe, 0x2f, 0xf3, 0xc3, 0x84, + 0x4e, 0xc4, 0x67, 0xc1, 0x0d, 0x1f, 0xa9, 0xde, 0x94, 0x78, 0x98, 0x03, 0x5c, 0x9c, 0x48, 0xba, + 0x95, 0x91, 0x28, 0x89, 0xaf, 0xdd, 0x10, 0x25, 0x35, 0x21, 0x91, 0xa4, 0xd9, 0x83, 0xee, 0xf8, + 0xd6, 0x4d, 0x9c, 0x2b, 0xaa, 0x50, 0xa2, 0x85, 0x4b, 0x3f, 0xcc, 0x03, 0xd8, 0x90, 0x4f, 0xf6, + 0xd2, 0x40, 0xe1, 0xff, 0x94, 0xf7, 0x7a, 0x3b, 0x7f, 0x61, 0x88, 0x37, 0xaa, 0x99, 0xc2, 0x66, + 0x79, 0x8d, 0x7c, 0x16, 0x2d, 0x5b, 0xf4, 0x16, 0x5e, 0xf9, 0xb7, 0xb0, 0x7e, 0x9a, 0x46, 0xd3, + 0xb2, 0xa3, 0x3d, 0x68, 0xba, 0xbe, 0xed, 0x24, 0xee, 0x0d, 0x97, 0x1f, 0x7b, 0x4e, 0x13, 0xc6, + 0xae, 0x1c, 0x51, 0x54, 0x2d, 0xfa, 0x2d, 0x6e, 0xe3, 0x1e, 0xa7, 0xd2, 0x9b, 0xdf, 0xc6, 0x05, + 0x4d, 0x39, 0x2a, 0xae, 0x5b, 0x35, 0x99, 0xa3, 0x44, 0x21, 0x7e, 0xf4, 0x08, 0x14, 0x0f, 0xe8, + 0x7e, 0xe0, 0x5f, 0xba, 0xd3, 0x0c, 0xbf, 0x3f, 0x68, 0xf0, 0x78, 0x8e, 0xf0, 0xad, 0x3d, 0x14, + 0xd5, 0xd7, 0x69, 0xad, 0xfc, 0x3a, 0x55, 0xc7, 0x44, 0xf5, 0xd2, 0x98, 0x68, 0xef, 0x0b, 0x68, + 0x88, 0x01, 0x0b, 0x5b, 0x85, 0xd6, 0xd0, 0xbf, 0xb1, 0x3d, 0x77, 0xf2, 0x22, 0x34, 0x2a, 0xac, + 0x09, 0xb5, 0x71, 0x12, 0x84, 0x86, 0xc6, 0x5a, 0x50, 0x3f, 0xc5, 0xfa, 0x60, 0xe8, 0x0c, 0xa0, + 0x81, 0xc5, 0x73, 0xc6, 0x8d, 0x2a, 0xb2, 0x69, 0x76, 0x65, 0xd4, 0x90, 0x2d, 0xa6, 0x2a, 0x46, + 0x9d, 0xad, 0x01, 0x7c, 0x9e, 0x26, 0x81, 0x54, 0x6b, 0xec, 0xed, 0x41, 0x9d, 0x66, 0x16, 0x64, + 0xf0, 0x67, 0xc3, 0x53, 0xa3, 0xc2, 0xda, 0xb0, 0x62, 0x1d, 0x9d, 0x8e, 0x3e, 0xef, 0x1f, 0x19, + 0x1a, 0xae, 0x1d, 0x3e, 0xff, 0xe9, 0x51, 0xff, 0xdc, 0xd0, 0xf7, 0x7e, 0x4e, 0x26, 0xa7, 0x58, + 0x56, 0x3a, 0xd2, 0x17, 0xa2, 0x8d, 0x0a, 0x5b, 0x81, 0xea, 0x73, 0x7e, 0x6b, 0x68, 0xb4, 0x38, + 0xf5, 0xf1, 0x91, 0x28, 0xfc, 0x21, 0xd7, 0x26, 0x46, 0x15, 0x05, 0xe8, 0x70, 0xc8, 0x27, 0x46, + 0x8d, 0x75, 0xa0, 0xf9, 0x54, 0xbe, 0xfa, 0x8c, 0xfa, 0xde, 0x0b, 0x68, 0x66, 0xcd, 0x8f, 0x3d, + 0x82, 0xb6, 0x34, 0x8d, 0x2c, 0xa3, 0x82, 0xe7, 0xa0, 0x16, 0x67, 0x68, 0xe8, 0x22, 0xb6, 0x31, + 0x43, 0xc7, 0x5f, 0xd8, 0xab, 0x8c, 0x2a, 0xb9, 0x7d, 0xe7, 0x3b, 0x46, 0x0d, 0x15, 0x29, 0xa1, + 0x8c, 0xc9, 0xde, 0x0f, 0xa0, 0x95, 0x57, 0x42, 0x74, 0xf6, 0xa5, 0x7f, 0xed, 0x07, 0xb7, 0x3e, + 0xf1, 0xc4, 0x01, 0xb1, 0x98, 0x8c, 0xcf, 0x46, 0x86, 0x86, 0x1b, 0x92, 0xfd, 0xa7, 0x74, 0xbf, + 0x30, 0xf4, 0xbd, 0x13, 0x58, 0x91, 0xe9, 0xce, 0x18, 0xac, 0x49, 0x67, 0x24, 0xc7, 0xa8, 0x60, + 0x1c, 0xf0, 0x1c, 0x62, 0x2b, 0x0d, 0xf1, 0xa4, 0x23, 0x0a, 0x5a, 0x47, 0x73, 0x02, 0x5b, 0xc1, + 0xa8, 0x1e, 0xfc, 0xb1, 0x09, 0x0d, 0x91, 0x52, 0xac, 0x0f, 0x1d, 0x75, 0x9c, 0xc8, 0xde, 0x95, + 0xd7, 0x82, 0xfb, 0x03, 0xc6, 0x5e, 0x97, 0x1a, 0xfb, 0x9c, 0x59, 0x8f, 0x59, 0x61, 0x43, 0x58, + 0x2b, 0x8f, 0xe6, 0xd8, 0x63, 0xd4, 0x9e, 0x3b, 0xf7, 0xeb, 0xf5, 0xe6, 0x89, 0x72, 0x53, 0x47, + 0xb0, 0x5a, 0x9a, 0xb6, 0x31, 0xda, 0x77, 0xde, 0x00, 0x6e, 0xa9, 0x47, 0x3f, 0x81, 0xb6, 0x32, + 0x3c, 0x62, 0x5b, 0xa8, 0xfa, 0x70, 0x32, 0xd7, 0x7b, 0xf7, 0x01, 0x3f, 0xb7, 0xf0, 0x19, 0x40, + 0x31, 0x9c, 0x61, 0xef, 0xe4, 0x8a, 0xea, 0xc0, 0xae, 0xb7, 0x75, 0x9f, 0x9d, 0x2f, 0x7f, 0x0a, + 0x20, 0xa7, 0x76, 0x67, 0xa3, 0x98, 0xbd, 0x87, 0x7a, 0x8b, 0xa6, 0x78, 0x4b, 0x0f, 0x72, 0x00, + 0x9d, 0xa7, 0x3c, 0x71, 0xae, 0xb2, 0xf6, 0x47, 0xf7, 0x7c, 0xa5, 0x55, 0xf5, 0xda, 0x92, 0x81, + 0x84, 0x59, 0xd9, 0xd5, 0x3e, 0xd1, 0xd8, 0x0f, 0x01, 0x30, 0x97, 0xd2, 0x84, 0x63, 0xe9, 0x66, + 0xd4, 0x84, 0x4b, 0x8d, 0x6a, 0xe9, 0x8e, 0x7d, 0xe8, 0xa8, 0x3d, 0x45, 0x64, 0xc4, 0x9c, 0x2e, + 0xb3, 0xd4, 0xc8, 0x09, 0xac, 0x3f, 0xe8, 0x0a, 0x02, 0x85, 0x45, 0xcd, 0xe2, 0xeb, 0x7c, 0x52, + 0x9b, 0x82, 0xf0, 0x69, 0x4e, 0x6b, 0x11, 0x46, 0xe6, 0xf5, 0x0f, 0xb3, 0xc2, 0x7e, 0x0c, 0x50, + 0x94, 0x78, 0x11, 0xd1, 0x07, 0x25, 0x7f, 0xa9, 0x17, 0xc7, 0xb0, 0xae, 0xcc, 0xd3, 0x45, 0x35, + 0x16, 0xa9, 0xf5, 0x70, 0xcc, 0xbe, 0xd4, 0x90, 0x25, 0x87, 0xbf, 0x6a, 0x59, 0x17, 0xe8, 0x2c, + 0x6a, 0x05, 0xbd, 0xf7, 0x17, 0x48, 0x55, 0x88, 0xd4, 0xe1, 0xbd, 0x80, 0x68, 0xce, 0x38, 0x7f, + 0x99, 0x63, 0x87, 0xdd, 0x7f, 0xbc, 0xde, 0xd6, 0xbe, 0x7a, 0xbd, 0xad, 0xfd, 0xfb, 0xf5, 0xb6, + 0xf6, 0xfb, 0x37, 0xdb, 0x95, 0xaf, 0xde, 0x6c, 0x57, 0xfe, 0xf9, 0x66, 0xbb, 0x72, 0xd1, 0xa0, + 0xff, 0x40, 0x7c, 0xfb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x74, 0x29, 0x1e, 0x93, 0x18, + 0x00, 0x00, +} diff --git a/dm/pb/tracer.pb.go b/dm/pb/tracer.pb.go index ed4e99f436..4646582de1 100644 --- a/dm/pb/tracer.pb.go +++ b/dm/pb/tracer.pb.go @@ -4,16 +4,17 @@ package pb import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" + "fmt" proto "github.com/gogo/protobuf/proto" + + math "math" + + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + + io "io" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +26,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type GetTSORequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -35,7 +36,7 @@ func (m *GetTSORequest) Reset() { *m = GetTSORequest{} } func (m *GetTSORequest) String() string { return proto.CompactTextString(m) } func (*GetTSORequest) ProtoMessage() {} func (*GetTSORequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6d422d7c66fbbd8f, []int{0} + return fileDescriptor_tracer_1adb952205408096, []int{0} } func (m *GetTSORequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -45,15 +46,15 @@ func (m *GetTSORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_GetTSORequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *GetTSORequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTSORequest.Merge(m, src) +func (dst *GetTSORequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTSORequest.Merge(dst, src) } func (m *GetTSORequest) XXX_Size() int { return m.Size() @@ -81,7 +82,7 @@ func (m *GetTSOResponse) Reset() { *m = GetTSOResponse{} } func (m *GetTSOResponse) String() string { return proto.CompactTextString(m) } func (*GetTSOResponse) ProtoMessage() {} func (*GetTSOResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6d422d7c66fbbd8f, []int{1} + return fileDescriptor_tracer_1adb952205408096, []int{1} } func (m *GetTSOResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -91,15 +92,15 @@ func (m *GetTSOResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_GetTSOResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *GetTSOResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTSOResponse.Merge(m, src) +func (dst *GetTSOResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTSOResponse.Merge(dst, src) } func (m *GetTSOResponse) XXX_Size() int { return m.Size() @@ -140,7 +141,7 @@ func (m *CommonUploadResponse) Reset() { *m = CommonUploadResponse{} } func (m *CommonUploadResponse) String() string { return proto.CompactTextString(m) } func (*CommonUploadResponse) ProtoMessage() {} func (*CommonUploadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6d422d7c66fbbd8f, []int{2} + return fileDescriptor_tracer_1adb952205408096, []int{2} } func (m *CommonUploadResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -150,15 +151,15 @@ func (m *CommonUploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_CommonUploadResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *CommonUploadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommonUploadResponse.Merge(m, src) +func (dst *CommonUploadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonUploadResponse.Merge(dst, src) } func (m *CommonUploadResponse) XXX_Size() int { return m.Size() @@ -184,14 +185,14 @@ func (m *CommonUploadResponse) GetMsg() string { } type UploadSyncerBinlogEventRequest struct { - Events []*SyncerBinlogEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + Events []*SyncerBinlogEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` } func (m *UploadSyncerBinlogEventRequest) Reset() { *m = UploadSyncerBinlogEventRequest{} } func (m *UploadSyncerBinlogEventRequest) String() string { return proto.CompactTextString(m) } func (*UploadSyncerBinlogEventRequest) ProtoMessage() {} func (*UploadSyncerBinlogEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6d422d7c66fbbd8f, []int{3} + return fileDescriptor_tracer_1adb952205408096, []int{3} } func (m *UploadSyncerBinlogEventRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -201,15 +202,15 @@ func (m *UploadSyncerBinlogEventRequest) XXX_Marshal(b []byte, deterministic boo return xxx_messageInfo_UploadSyncerBinlogEventRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UploadSyncerBinlogEventRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UploadSyncerBinlogEventRequest.Merge(m, src) +func (dst *UploadSyncerBinlogEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UploadSyncerBinlogEventRequest.Merge(dst, src) } func (m *UploadSyncerBinlogEventRequest) XXX_Size() int { return m.Size() @@ -228,14 +229,14 @@ func (m *UploadSyncerBinlogEventRequest) GetEvents() []*SyncerBinlogEvent { } type UploadSyncerJobEventRequest struct { - Events []*SyncerJobEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + Events []*SyncerJobEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` } func (m *UploadSyncerJobEventRequest) Reset() { *m = UploadSyncerJobEventRequest{} } func (m *UploadSyncerJobEventRequest) String() string { return proto.CompactTextString(m) } func (*UploadSyncerJobEventRequest) ProtoMessage() {} func (*UploadSyncerJobEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6d422d7c66fbbd8f, []int{4} + return fileDescriptor_tracer_1adb952205408096, []int{4} } func (m *UploadSyncerJobEventRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,15 +246,15 @@ func (m *UploadSyncerJobEventRequest) XXX_Marshal(b []byte, deterministic bool) return xxx_messageInfo_UploadSyncerJobEventRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *UploadSyncerJobEventRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UploadSyncerJobEventRequest.Merge(m, src) +func (dst *UploadSyncerJobEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UploadSyncerJobEventRequest.Merge(dst, src) } func (m *UploadSyncerJobEventRequest) XXX_Size() int { return m.Size() @@ -279,33 +280,6 @@ func init() { proto.RegisterType((*UploadSyncerJobEventRequest)(nil), "pb.UploadSyncerJobEventRequest") } -func init() { proto.RegisterFile("tracer.proto", fileDescriptor_6d422d7c66fbbd8f) } - -var fileDescriptor_6d422d7c66fbbd8f = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x4b, 0xc3, 0x30, - 0x18, 0x86, 0x9b, 0x16, 0x8a, 0x7e, 0xea, 0xd0, 0xcf, 0xa9, 0x61, 0x42, 0x36, 0x72, 0x1a, 0x82, - 0x03, 0xe7, 0x1f, 0x90, 0x89, 0x88, 0xbb, 0x0c, 0xba, 0x79, 0xf0, 0x24, 0xab, 0x0b, 0x63, 0xb0, - 0x35, 0xb5, 0xc9, 0x04, 0xff, 0x85, 0x3f, 0xcb, 0xe3, 0x8e, 0x1e, 0xa5, 0x3d, 0xfa, 0x27, 0x24, - 0x6d, 0x37, 0xb7, 0x3a, 0x07, 0xde, 0xf2, 0x7d, 0x79, 0xdf, 0x87, 0xbc, 0x2f, 0x81, 0x5d, 0x1d, - 0xf5, 0x9f, 0x44, 0xd4, 0x08, 0x23, 0xa9, 0x25, 0xda, 0xa1, 0x5f, 0x39, 0xcc, 0x36, 0x8f, 0xea, - 0x35, 0x58, 0x5c, 0xf0, 0x2a, 0xec, 0xdd, 0x0a, 0xdd, 0xeb, 0x76, 0x3c, 0xf1, 0x3c, 0x15, 0x4a, - 0x63, 0x09, 0xec, 0xd1, 0x80, 0x92, 0x1a, 0xa9, 0x6f, 0x7b, 0xf6, 0x68, 0xc0, 0xdb, 0x50, 0x9a, - 0x0b, 0x54, 0x28, 0x03, 0x25, 0xf0, 0x18, 0xdc, 0x48, 0xa8, 0xe9, 0x58, 0xa7, 0xaa, 0x2d, 0x2f, - 0x9f, 0x70, 0x1f, 0x9c, 0x89, 0x1a, 0x52, 0x3b, 0xb5, 0x9a, 0xa3, 0x61, 0x69, 0x45, 0x9d, 0x1a, - 0xa9, 0x3b, 0x9e, 0xad, 0x15, 0xbf, 0x82, 0xf2, 0xb5, 0x9c, 0x4c, 0x64, 0x70, 0x1f, 0x8e, 0x65, - 0x7f, 0xf0, 0x7f, 0x22, 0xef, 0x00, 0xcb, 0xbc, 0xdd, 0x34, 0x44, 0x6b, 0x14, 0x8c, 0xe5, 0xf0, - 0xe6, 0x45, 0x04, 0x7a, 0xfe, 0xfe, 0x73, 0x70, 0x85, 0x99, 0x15, 0x25, 0x35, 0xa7, 0xbe, 0xd3, - 0x3c, 0x6a, 0x84, 0x7e, 0xe3, 0xb7, 0x3a, 0x17, 0xf1, 0x3b, 0x38, 0x5d, 0x06, 0xb6, 0xa5, 0xbf, - 0x42, 0x3b, 0x2b, 0xd0, 0xf0, 0x87, 0xb6, 0x90, 0xe6, 0x8a, 0xe6, 0x17, 0x01, 0xb7, 0x97, 0x56, - 0x8c, 0x17, 0xe0, 0x66, 0xa5, 0xe1, 0x81, 0x31, 0xac, 0x34, 0x5c, 0xc1, 0xe5, 0x55, 0xd6, 0x00, - 0xb7, 0xf0, 0x01, 0x4e, 0xfe, 0x48, 0x86, 0xdc, 0x18, 0x36, 0xc7, 0xae, 0x50, 0xa3, 0x59, 0x57, - 0x2e, 0xb7, 0xb0, 0x0b, 0xe5, 0x75, 0x19, 0xb1, 0x5a, 0xe4, 0x16, 0xd2, 0x6f, 0x82, 0xb6, 0xe8, - 0x7b, 0xcc, 0xc8, 0x2c, 0x66, 0xe4, 0x33, 0x66, 0xe4, 0x2d, 0x61, 0xd6, 0x2c, 0x61, 0xd6, 0x47, - 0xc2, 0x2c, 0xdf, 0x4d, 0x7f, 0xd6, 0xe5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x04, 0x0e, - 0x15, 0x82, 0x02, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -365,20 +339,6 @@ type TracerServer interface { UploadSyncerJobEvent(context.Context, *UploadSyncerJobEventRequest) (*CommonUploadResponse, error) } -// UnimplementedTracerServer can be embedded to have forward compatible implementations. -type UnimplementedTracerServer struct { -} - -func (*UnimplementedTracerServer) GetTSO(ctx context.Context, req *GetTSORequest) (*GetTSOResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTSO not implemented") -} -func (*UnimplementedTracerServer) UploadSyncerBinlogEvent(ctx context.Context, req *UploadSyncerBinlogEventRequest) (*CommonUploadResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadSyncerBinlogEvent not implemented") -} -func (*UnimplementedTracerServer) UploadSyncerJobEvent(ctx context.Context, req *UploadSyncerJobEventRequest) (*CommonUploadResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadSyncerJobEvent not implemented") -} - func RegisterTracerServer(s *grpc.Server, srv TracerServer) { s.RegisterService(&_Tracer_serviceDesc, srv) } @@ -461,7 +421,7 @@ var _Tracer_serviceDesc = grpc.ServiceDesc{ func (m *GetTSORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -469,29 +429,23 @@ func (m *GetTSORequest) Marshal() (dAtA []byte, err error) { } func (m *GetTSORequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTSORequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTracer(dAtA, i, uint64(len(m.Id))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTracer(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) } - return len(dAtA) - i, nil + return i, nil } func (m *GetTSOResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -499,44 +453,38 @@ func (m *GetTSOResponse) Marshal() (dAtA []byte, err error) { } func (m *GetTSOResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTSOResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Ts != 0 { - i = encodeVarintTracer(dAtA, i, uint64(m.Ts)) - i-- - dAtA[i] = 0x18 - } - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintTracer(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ + } + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTracer(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + if m.Ts != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTracer(dAtA, i, uint64(m.Ts)) } - return len(dAtA) - i, nil + return i, nil } func (m *CommonUploadResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -544,39 +492,33 @@ func (m *CommonUploadResponse) Marshal() (dAtA []byte, err error) { } func (m *CommonUploadResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommonUploadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintTracer(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x12 - } if m.Result { - i-- + dAtA[i] = 0x8 + i++ if m.Result { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x8 + i++ } - return len(dAtA) - i, nil + if len(m.Msg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTracer(dAtA, i, uint64(len(m.Msg))) + i += copy(dAtA[i:], m.Msg) + } + return i, nil } func (m *UploadSyncerBinlogEventRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -584,36 +526,29 @@ func (m *UploadSyncerBinlogEventRequest) Marshal() (dAtA []byte, err error) { } func (m *UploadSyncerBinlogEventRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UploadSyncerBinlogEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracer(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Events { dAtA[i] = 0xa + i++ + i = encodeVarintTracer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + return i, nil } func (m *UploadSyncerJobEventRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -621,42 +556,33 @@ func (m *UploadSyncerJobEventRequest) Marshal() (dAtA []byte, err error) { } func (m *UploadSyncerJobEventRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UploadSyncerJobEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracer(dAtA, i, uint64(size)) - } - i-- + for _, msg := range m.Events { dAtA[i] = 0xa + i++ + i = encodeVarintTracer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return len(dAtA) - i, nil + return i, nil } func encodeVarintTracer(dAtA []byte, offset int, v uint64) int { - offset -= sovTracer(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *GetTSORequest) Size() (n int) { if m == nil { @@ -737,7 +663,14 @@ func (m *UploadSyncerJobEventRequest) Size() (n int) { } func sovTracer(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTracer(x uint64) (n int) { return sovTracer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -757,7 +690,7 @@ func (m *GetTSORequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -785,7 +718,7 @@ func (m *GetTSORequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -795,9 +728,6 @@ func (m *GetTSORequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -812,9 +742,6 @@ func (m *GetTSORequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -842,7 +769,7 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -870,7 +797,7 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -890,7 +817,7 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -900,9 +827,6 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -922,7 +846,7 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ts |= int64(b&0x7F) << shift + m.Ts |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -936,9 +860,6 @@ func (m *GetTSOResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -966,7 +887,7 @@ func (m *CommonUploadResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -994,7 +915,7 @@ func (m *CommonUploadResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1014,7 +935,7 @@ func (m *CommonUploadResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1024,9 +945,6 @@ func (m *CommonUploadResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1041,9 +959,6 @@ func (m *CommonUploadResponse) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1071,7 +986,7 @@ func (m *UploadSyncerBinlogEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1099,7 +1014,7 @@ func (m *UploadSyncerBinlogEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1108,9 +1023,6 @@ func (m *UploadSyncerBinlogEventRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1128,9 +1040,6 @@ func (m *UploadSyncerBinlogEventRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1158,7 +1067,7 @@ func (m *UploadSyncerJobEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1186,7 +1095,7 @@ func (m *UploadSyncerJobEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1195,9 +1104,6 @@ func (m *UploadSyncerJobEventRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1215,9 +1121,6 @@ func (m *UploadSyncerJobEventRequest) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1233,7 +1136,6 @@ func (m *UploadSyncerJobEventRequest) Unmarshal(dAtA []byte) error { func skipTracer(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1265,8 +1167,10 @@ func skipTracer(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1283,34 +1187,80 @@ func skipTracer(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthTracer } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTracer + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTracer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipTracer(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthTracer - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthTracer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTracer = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTracer = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTracer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTracer = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("tracer.proto", fileDescriptor_tracer_1adb952205408096) } + +var fileDescriptor_tracer_1adb952205408096 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x4b, 0xc3, 0x30, + 0x18, 0x86, 0x9b, 0x16, 0x8a, 0x7e, 0xea, 0xd0, 0xcf, 0xa9, 0x61, 0x42, 0x36, 0x72, 0x1a, 0x82, + 0x03, 0xe7, 0x1f, 0x90, 0x89, 0x88, 0xbb, 0x0c, 0xba, 0x79, 0xf0, 0x24, 0xab, 0x0b, 0x63, 0xb0, + 0x35, 0xb5, 0xc9, 0x04, 0xff, 0x85, 0x3f, 0xcb, 0xe3, 0x8e, 0x1e, 0xa5, 0x3d, 0xfa, 0x27, 0x24, + 0x6d, 0x37, 0xb7, 0x3a, 0x07, 0xde, 0xf2, 0x7d, 0x79, 0xdf, 0x87, 0xbc, 0x2f, 0x81, 0x5d, 0x1d, + 0xf5, 0x9f, 0x44, 0xd4, 0x08, 0x23, 0xa9, 0x25, 0xda, 0xa1, 0x5f, 0x39, 0xcc, 0x36, 0x8f, 0xea, + 0x35, 0x58, 0x5c, 0xf0, 0x2a, 0xec, 0xdd, 0x0a, 0xdd, 0xeb, 0x76, 0x3c, 0xf1, 0x3c, 0x15, 0x4a, + 0x63, 0x09, 0xec, 0xd1, 0x80, 0x92, 0x1a, 0xa9, 0x6f, 0x7b, 0xf6, 0x68, 0xc0, 0xdb, 0x50, 0x9a, + 0x0b, 0x54, 0x28, 0x03, 0x25, 0xf0, 0x18, 0xdc, 0x48, 0xa8, 0xe9, 0x58, 0xa7, 0xaa, 0x2d, 0x2f, + 0x9f, 0x70, 0x1f, 0x9c, 0x89, 0x1a, 0x52, 0x3b, 0xb5, 0x9a, 0xa3, 0x61, 0x69, 0x45, 0x9d, 0x1a, + 0xa9, 0x3b, 0x9e, 0xad, 0x15, 0xbf, 0x82, 0xf2, 0xb5, 0x9c, 0x4c, 0x64, 0x70, 0x1f, 0x8e, 0x65, + 0x7f, 0xf0, 0x7f, 0x22, 0xef, 0x00, 0xcb, 0xbc, 0xdd, 0x34, 0x44, 0x6b, 0x14, 0x8c, 0xe5, 0xf0, + 0xe6, 0x45, 0x04, 0x7a, 0xfe, 0xfe, 0x73, 0x70, 0x85, 0x99, 0x15, 0x25, 0x35, 0xa7, 0xbe, 0xd3, + 0x3c, 0x6a, 0x84, 0x7e, 0xe3, 0xb7, 0x3a, 0x17, 0xf1, 0x3b, 0x38, 0x5d, 0x06, 0xb6, 0xa5, 0xbf, + 0x42, 0x3b, 0x2b, 0xd0, 0xf0, 0x87, 0xb6, 0x90, 0xe6, 0x8a, 0xe6, 0x17, 0x01, 0xb7, 0x97, 0x56, + 0x8c, 0x17, 0xe0, 0x66, 0xa5, 0xe1, 0x81, 0x31, 0xac, 0x34, 0x5c, 0xc1, 0xe5, 0x55, 0xd6, 0x00, + 0xb7, 0xf0, 0x01, 0x4e, 0xfe, 0x48, 0x86, 0xdc, 0x18, 0x36, 0xc7, 0xae, 0x50, 0xa3, 0x59, 0x57, + 0x2e, 0xb7, 0xb0, 0x0b, 0xe5, 0x75, 0x19, 0xb1, 0x5a, 0xe4, 0x16, 0xd2, 0x6f, 0x82, 0xb6, 0xe8, + 0x7b, 0xcc, 0xc8, 0x2c, 0x66, 0xe4, 0x33, 0x66, 0xe4, 0x2d, 0x61, 0xd6, 0x2c, 0x61, 0xd6, 0x47, + 0xc2, 0x2c, 0xdf, 0x4d, 0x7f, 0xd6, 0xe5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x04, 0x0e, + 0x15, 0x82, 0x02, 0x00, 0x00, +} diff --git a/dm/pb/tracer_base.pb.go b/dm/pb/tracer_base.pb.go index 176eb34bc3..77e5367bc3 100644 --- a/dm/pb/tracer_base.pb.go +++ b/dm/pb/tracer_base.pb.go @@ -4,12 +4,13 @@ package pb import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" + "fmt" proto "github.com/gogo/protobuf/proto" + + math "math" + + io "io" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type TraceType int32 @@ -36,7 +37,6 @@ var TraceType_name = map[int32]string{ 1: "BinlogEvent", 2: "JobEvent", } - var TraceType_value = map[string]int32{ "DummyEvent": 0, "BinlogEvent": 1, @@ -46,9 +46,8 @@ var TraceType_value = map[string]int32{ func (x TraceType) String() string { return proto.EnumName(TraceType_name, int32(x)) } - func (TraceType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_be09eaf025e7bb5c, []int{0} + return fileDescriptor_tracer_base_eb78fe39c9a10136, []int{0} } type BaseEvent struct { @@ -64,7 +63,7 @@ func (m *BaseEvent) Reset() { *m = BaseEvent{} } func (m *BaseEvent) String() string { return proto.CompactTextString(m) } func (*BaseEvent) ProtoMessage() {} func (*BaseEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be09eaf025e7bb5c, []int{0} + return fileDescriptor_tracer_base_eb78fe39c9a10136, []int{0} } func (m *BaseEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,15 +73,15 @@ func (m *BaseEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BaseEvent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *BaseEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_BaseEvent.Merge(m, src) +func (dst *BaseEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_BaseEvent.Merge(dst, src) } func (m *BaseEvent) XXX_Size() int { return m.Size() @@ -136,36 +135,13 @@ func (m *BaseEvent) GetType() TraceType { } func init() { - proto.RegisterEnum("pb.TraceType", TraceType_name, TraceType_value) proto.RegisterType((*BaseEvent)(nil), "pb.BaseEvent") + proto.RegisterEnum("pb.TraceType", TraceType_name, TraceType_value) } - -func init() { proto.RegisterFile("tracer_base.proto", fileDescriptor_be09eaf025e7bb5c) } - -var fileDescriptor_be09eaf025e7bb5c = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xb1, 0x4e, 0x84, 0x40, - 0x10, 0x86, 0x19, 0xe0, 0xce, 0x63, 0xd4, 0xf3, 0x9c, 0x6a, 0x63, 0xb1, 0x41, 0x2b, 0x62, 0x41, - 0xa1, 0x9d, 0x25, 0xc1, 0xe2, 0x2c, 0xc9, 0xf5, 0x86, 0x35, 0xeb, 0x85, 0x04, 0xd8, 0x0d, 0xec, - 0x99, 0xf0, 0x16, 0x3e, 0x84, 0x0f, 0x63, 0x79, 0xa5, 0xa5, 0x81, 0x17, 0x31, 0x2c, 0x1e, 0xdd, - 0xff, 0xfd, 0x5f, 0x76, 0x67, 0x32, 0x78, 0x6d, 0x9a, 0xfc, 0x4d, 0x36, 0xaf, 0x22, 0x6f, 0x65, - 0xac, 0x1b, 0x65, 0x14, 0xb9, 0x5a, 0xdc, 0x7d, 0x01, 0x06, 0x49, 0xde, 0xca, 0xe7, 0x0f, 0x59, - 0x1b, 0xba, 0xc1, 0xd5, 0x7b, 0x51, 0xca, 0x3a, 0xaf, 0x24, 0x83, 0x10, 0xa2, 0x20, 0x9b, 0x99, - 0x08, 0xfd, 0xb2, 0xa8, 0x25, 0x73, 0x43, 0x88, 0x16, 0x99, 0xcd, 0xb4, 0x41, 0xcf, 0xb4, 0x8a, - 0x79, 0x21, 0x44, 0x5e, 0x36, 0x46, 0x62, 0x78, 0x66, 0x07, 0x6d, 0x53, 0xe6, 0xdb, 0x0f, 0x4e, - 0x38, 0x9a, 0x7d, 0xa3, 0x0e, 0x7a, 0x9b, 0xb2, 0xc5, 0x64, 0xfe, 0x91, 0x6e, 0xd1, 0x37, 0x9d, - 0x96, 0x6c, 0x19, 0x42, 0xb4, 0x7e, 0xb8, 0x8c, 0xb5, 0x88, 0x77, 0xe3, 0xa3, 0x5d, 0xa7, 0x65, - 0x66, 0xd5, 0xfd, 0x13, 0x06, 0x73, 0x45, 0x6b, 0xc4, 0xf4, 0x50, 0x55, 0x9d, 0xdd, 0x79, 0xe3, - 0xd0, 0x15, 0x9e, 0x27, 0x45, 0x5d, 0xaa, 0xfd, 0x54, 0x00, 0x5d, 0xe0, 0xea, 0x45, 0x89, 0x89, - 0xdc, 0x84, 0x7d, 0xf7, 0x1c, 0x8e, 0x3d, 0x87, 0xdf, 0x9e, 0xc3, 0xe7, 0xc0, 0x9d, 0xe3, 0xc0, - 0x9d, 0x9f, 0x81, 0x3b, 0x62, 0x69, 0xef, 0xf0, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff, 0x25, 0x73, - 0x7a, 0x49, 0x1c, 0x01, 0x00, 0x00, -} - func (m *BaseEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -173,64 +149,54 @@ func (m *BaseEvent) Marshal() (dAtA []byte, err error) { } func (m *BaseEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BaseEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Type != 0 { - i = encodeVarintTracerBase(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x30 - } - if len(m.GroupID) > 0 { - i -= len(m.GroupID) - copy(dAtA[i:], m.GroupID) - i = encodeVarintTracerBase(dAtA, i, uint64(len(m.GroupID))) - i-- - dAtA[i] = 0x2a + if len(m.Filename) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(len(m.Filename))) + i += copy(dAtA[i:], m.Filename) } - if len(m.TraceID) > 0 { - i -= len(m.TraceID) - copy(dAtA[i:], m.TraceID) - i = encodeVarintTracerBase(dAtA, i, uint64(len(m.TraceID))) - i-- - dAtA[i] = 0x22 + if m.Line != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(m.Line)) } if m.Tso != 0 { - i = encodeVarintTracerBase(dAtA, i, uint64(m.Tso)) - i-- dAtA[i] = 0x18 + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(m.Tso)) } - if m.Line != 0 { - i = encodeVarintTracerBase(dAtA, i, uint64(m.Line)) - i-- - dAtA[i] = 0x10 + if len(m.TraceID) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(len(m.TraceID))) + i += copy(dAtA[i:], m.TraceID) } - if len(m.Filename) > 0 { - i -= len(m.Filename) - copy(dAtA[i:], m.Filename) - i = encodeVarintTracerBase(dAtA, i, uint64(len(m.Filename))) - i-- - dAtA[i] = 0xa + if len(m.GroupID) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(len(m.GroupID))) + i += copy(dAtA[i:], m.GroupID) } - return len(dAtA) - i, nil + if m.Type != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintTracerBase(dAtA, i, uint64(m.Type)) + } + return i, nil } func encodeVarintTracerBase(dAtA []byte, offset int, v uint64) int { - offset -= sovTracerBase(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *BaseEvent) Size() (n int) { if m == nil { @@ -263,7 +229,14 @@ func (m *BaseEvent) Size() (n int) { } func sovTracerBase(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTracerBase(x uint64) (n int) { return sovTracerBase(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -283,7 +256,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -311,7 +284,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -321,9 +294,6 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerBase } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerBase - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -343,7 +313,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Line |= int32(b&0x7F) << shift + m.Line |= (int32(b) & 0x7F) << shift if b < 0x80 { break } @@ -362,7 +332,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Tso |= int64(b&0x7F) << shift + m.Tso |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -381,7 +351,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -391,9 +361,6 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerBase } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerBase - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -413,7 +380,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -423,9 +390,6 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerBase } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerBase - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -445,7 +409,7 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= TraceType(b&0x7F) << shift + m.Type |= (TraceType(b) & 0x7F) << shift if b < 0x80 { break } @@ -459,9 +423,6 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerBase } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerBase - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -477,7 +438,6 @@ func (m *BaseEvent) Unmarshal(dAtA []byte) error { func skipTracerBase(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -509,8 +469,10 @@ func skipTracerBase(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -527,34 +489,75 @@ func skipTracerBase(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthTracerBase } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTracerBase + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTracerBase + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipTracerBase(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthTracerBase - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthTracerBase = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTracerBase = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTracerBase = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTracerBase = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTracerBase = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("tracer_base.proto", fileDescriptor_tracer_base_eb78fe39c9a10136) } + +var fileDescriptor_tracer_base_eb78fe39c9a10136 = []byte{ + // 246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xb1, 0x4e, 0x84, 0x40, + 0x10, 0x86, 0x19, 0xe0, 0xce, 0x63, 0xd4, 0xf3, 0x9c, 0x6a, 0x63, 0xb1, 0x41, 0x2b, 0x62, 0x41, + 0xa1, 0x9d, 0x25, 0xc1, 0xe2, 0x2c, 0xc9, 0xf5, 0x86, 0x35, 0xeb, 0x85, 0x04, 0xd8, 0x0d, 0xec, + 0x99, 0xf0, 0x16, 0x3e, 0x84, 0x0f, 0x63, 0x79, 0xa5, 0xa5, 0x81, 0x17, 0x31, 0x2c, 0x1e, 0xdd, + 0xff, 0xfd, 0x5f, 0x76, 0x67, 0x32, 0x78, 0x6d, 0x9a, 0xfc, 0x4d, 0x36, 0xaf, 0x22, 0x6f, 0x65, + 0xac, 0x1b, 0x65, 0x14, 0xb9, 0x5a, 0xdc, 0x7d, 0x01, 0x06, 0x49, 0xde, 0xca, 0xe7, 0x0f, 0x59, + 0x1b, 0xba, 0xc1, 0xd5, 0x7b, 0x51, 0xca, 0x3a, 0xaf, 0x24, 0x83, 0x10, 0xa2, 0x20, 0x9b, 0x99, + 0x08, 0xfd, 0xb2, 0xa8, 0x25, 0x73, 0x43, 0x88, 0x16, 0x99, 0xcd, 0xb4, 0x41, 0xcf, 0xb4, 0x8a, + 0x79, 0x21, 0x44, 0x5e, 0x36, 0x46, 0x62, 0x78, 0x66, 0x07, 0x6d, 0x53, 0xe6, 0xdb, 0x0f, 0x4e, + 0x38, 0x9a, 0x7d, 0xa3, 0x0e, 0x7a, 0x9b, 0xb2, 0xc5, 0x64, 0xfe, 0x91, 0x6e, 0xd1, 0x37, 0x9d, + 0x96, 0x6c, 0x19, 0x42, 0xb4, 0x7e, 0xb8, 0x8c, 0xb5, 0x88, 0x77, 0xe3, 0xa3, 0x5d, 0xa7, 0x65, + 0x66, 0xd5, 0xfd, 0x13, 0x06, 0x73, 0x45, 0x6b, 0xc4, 0xf4, 0x50, 0x55, 0x9d, 0xdd, 0x79, 0xe3, + 0xd0, 0x15, 0x9e, 0x27, 0x45, 0x5d, 0xaa, 0xfd, 0x54, 0x00, 0x5d, 0xe0, 0xea, 0x45, 0x89, 0x89, + 0xdc, 0x84, 0x7d, 0xf7, 0x1c, 0x8e, 0x3d, 0x87, 0xdf, 0x9e, 0xc3, 0xe7, 0xc0, 0x9d, 0xe3, 0xc0, + 0x9d, 0x9f, 0x81, 0x3b, 0x62, 0x69, 0xef, 0xf0, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff, 0x25, 0x73, + 0x7a, 0x49, 0x1c, 0x01, 0x00, 0x00, +} diff --git a/dm/pb/tracer_syncer.pb.go b/dm/pb/tracer_syncer.pb.go index 136951eb84..864be1a33a 100644 --- a/dm/pb/tracer_syncer.pb.go +++ b/dm/pb/tracer_syncer.pb.go @@ -4,12 +4,13 @@ package pb import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" + "fmt" proto "github.com/gogo/protobuf/proto" + + math "math" + + io "io" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type SyncerJobState int32 @@ -38,7 +39,6 @@ var SyncerJobState_name = map[int32]string{ 2: "success", 3: "error", } - var SyncerJobState_value = map[string]int32{ "init": 0, "queued": 1, @@ -49,9 +49,8 @@ var SyncerJobState_value = map[string]int32{ func (x SyncerJobState) String() string { return proto.EnumName(SyncerJobState_name, int32(x)) } - func (SyncerJobState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{0} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{0} } type MySQLPosition struct { @@ -63,7 +62,7 @@ func (m *MySQLPosition) Reset() { *m = MySQLPosition{} } func (m *MySQLPosition) String() string { return proto.CompactTextString(m) } func (*MySQLPosition) ProtoMessage() {} func (*MySQLPosition) Descriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{0} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{0} } func (m *MySQLPosition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,15 +72,15 @@ func (m *MySQLPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_MySQLPosition.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *MySQLPosition) XXX_Merge(src proto.Message) { - xxx_messageInfo_MySQLPosition.Merge(m, src) +func (dst *MySQLPosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MySQLPosition.Merge(dst, src) } func (m *MySQLPosition) XXX_Size() int { return m.Size() @@ -109,15 +108,15 @@ func (m *MySQLPosition) GetPos() uint32 { type SyncerState struct { SafeMode bool `protobuf:"varint,1,opt,name=safeMode,proto3" json:"safeMode,omitempty"` TryReSync bool `protobuf:"varint,2,opt,name=tryReSync,proto3" json:"tryReSync,omitempty"` - LastPos *MySQLPosition `protobuf:"bytes,3,opt,name=lastPos,proto3" json:"lastPos,omitempty"` - CurrentPos *MySQLPosition `protobuf:"bytes,4,opt,name=currentPos,proto3" json:"currentPos,omitempty"` + LastPos *MySQLPosition `protobuf:"bytes,3,opt,name=lastPos" json:"lastPos,omitempty"` + CurrentPos *MySQLPosition `protobuf:"bytes,4,opt,name=currentPos" json:"currentPos,omitempty"` } func (m *SyncerState) Reset() { *m = SyncerState{} } func (m *SyncerState) String() string { return proto.CompactTextString(m) } func (*SyncerState) ProtoMessage() {} func (*SyncerState) Descriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{1} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{1} } func (m *SyncerState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -127,15 +126,15 @@ func (m *SyncerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_SyncerState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncerState) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncerState.Merge(m, src) +func (dst *SyncerState) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncerState.Merge(dst, src) } func (m *SyncerState) XXX_Size() int { return m.Size() @@ -183,7 +182,7 @@ func (m *ExecDDLInfo) Reset() { *m = ExecDDLInfo{} } func (m *ExecDDLInfo) String() string { return proto.CompactTextString(m) } func (*ExecDDLInfo) ProtoMessage() {} func (*ExecDDLInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{2} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{2} } func (m *ExecDDLInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -193,15 +192,15 @@ func (m *ExecDDLInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ExecDDLInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *ExecDDLInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecDDLInfo.Merge(m, src) +func (dst *ExecDDLInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecDDLInfo.Merge(dst, src) } func (m *ExecDDLInfo) XXX_Size() int { return m.Size() @@ -227,8 +226,8 @@ func (m *ExecDDLInfo) GetExec() bool { } type SyncerBinlogEvent struct { - Base *BaseEvent `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - State *SyncerState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Base *BaseEvent `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"` + State *SyncerState `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` EventType int32 `protobuf:"varint,3,opt,name=eventType,proto3" json:"eventType,omitempty"` OpType int32 `protobuf:"varint,4,opt,name=opType,proto3" json:"opType,omitempty"` } @@ -237,7 +236,7 @@ func (m *SyncerBinlogEvent) Reset() { *m = SyncerBinlogEvent{} } func (m *SyncerBinlogEvent) String() string { return proto.CompactTextString(m) } func (*SyncerBinlogEvent) ProtoMessage() {} func (*SyncerBinlogEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{3} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{3} } func (m *SyncerBinlogEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,15 +246,15 @@ func (m *SyncerBinlogEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_SyncerBinlogEvent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncerBinlogEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncerBinlogEvent.Merge(m, src) +func (dst *SyncerBinlogEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncerBinlogEvent.Merge(dst, src) } func (m *SyncerBinlogEvent) XXX_Size() int { return m.Size() @@ -295,14 +294,14 @@ func (m *SyncerBinlogEvent) GetOpType() int32 { } type SyncerJobEvent struct { - Base *BaseEvent `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Base *BaseEvent `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"` OpType int32 `protobuf:"varint,2,opt,name=opType,proto3" json:"opType,omitempty"` - Pos *MySQLPosition `protobuf:"bytes,3,opt,name=pos,proto3" json:"pos,omitempty"` - CurrentPos *MySQLPosition `protobuf:"bytes,4,opt,name=currentPos,proto3" json:"currentPos,omitempty"` + Pos *MySQLPosition `protobuf:"bytes,3,opt,name=pos" json:"pos,omitempty"` + CurrentPos *MySQLPosition `protobuf:"bytes,4,opt,name=currentPos" json:"currentPos,omitempty"` Sql string `protobuf:"bytes,5,opt,name=sql,proto3" json:"sql,omitempty"` - Ddls []string `protobuf:"bytes,6,rep,name=ddls,proto3" json:"ddls,omitempty"` + Ddls []string `protobuf:"bytes,6,rep,name=ddls" json:"ddls,omitempty"` ArgsChecksum uint32 `protobuf:"varint,7,opt,name=argsChecksum,proto3" json:"argsChecksum,omitempty"` - DdlInfo *ExecDDLInfo `protobuf:"bytes,8,opt,name=ddlInfo,proto3" json:"ddlInfo,omitempty"` + DdlInfo *ExecDDLInfo `protobuf:"bytes,8,opt,name=ddlInfo" json:"ddlInfo,omitempty"` QueueBucket string `protobuf:"bytes,9,opt,name=queueBucket,proto3" json:"queueBucket,omitempty"` State SyncerJobState `protobuf:"varint,10,opt,name=state,proto3,enum=pb.SyncerJobState" json:"state,omitempty"` } @@ -311,7 +310,7 @@ func (m *SyncerJobEvent) Reset() { *m = SyncerJobEvent{} } func (m *SyncerJobEvent) String() string { return proto.CompactTextString(m) } func (*SyncerJobEvent) ProtoMessage() {} func (*SyncerJobEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_aa4988ddb6d489fb, []int{4} + return fileDescriptor_tracer_syncer_1170dba324220d8f, []int{4} } func (m *SyncerJobEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -321,15 +320,15 @@ func (m *SyncerJobEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_SyncerJobEvent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } -func (m *SyncerJobEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncerJobEvent.Merge(m, src) +func (dst *SyncerJobEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncerJobEvent.Merge(dst, src) } func (m *SyncerJobEvent) XXX_Size() int { return m.Size() @@ -411,56 +410,17 @@ func (m *SyncerJobEvent) GetState() SyncerJobState { } func init() { - proto.RegisterEnum("pb.SyncerJobState", SyncerJobState_name, SyncerJobState_value) proto.RegisterType((*MySQLPosition)(nil), "pb.MySQLPosition") proto.RegisterType((*SyncerState)(nil), "pb.SyncerState") proto.RegisterType((*ExecDDLInfo)(nil), "pb.ExecDDLInfo") proto.RegisterType((*SyncerBinlogEvent)(nil), "pb.SyncerBinlogEvent") proto.RegisterType((*SyncerJobEvent)(nil), "pb.SyncerJobEvent") + proto.RegisterEnum("pb.SyncerJobState", SyncerJobState_name, SyncerJobState_value) } - -func init() { proto.RegisterFile("tracer_syncer.proto", fileDescriptor_aa4988ddb6d489fb) } - -var fileDescriptor_aa4988ddb6d489fb = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xce, 0xe6, 0x7f, 0xc6, 0xbf, 0xf4, 0x97, 0x0c, 0x12, 0xb2, 0x2a, 0x64, 0x19, 0x23, 0xa4, - 0x00, 0x52, 0x24, 0x82, 0x38, 0x70, 0xe1, 0x10, 0xd2, 0x43, 0xab, 0x56, 0x2a, 0x1b, 0xee, 0xc8, - 0x7f, 0xa6, 0x25, 0x8a, 0xeb, 0x75, 0x77, 0xd7, 0xa8, 0x79, 0x0b, 0x24, 0x1e, 0x82, 0x57, 0xe1, - 0xd8, 0x23, 0x47, 0x94, 0xf0, 0x20, 0x68, 0xd7, 0x09, 0x71, 0x0f, 0x95, 0x10, 0xb7, 0xd9, 0xf9, - 0x66, 0x3e, 0xcf, 0x7c, 0xdf, 0x18, 0x1e, 0x68, 0x19, 0xc6, 0x24, 0x3f, 0xaa, 0x55, 0x16, 0x93, - 0x1c, 0xe7, 0x52, 0x68, 0x81, 0xf5, 0x3c, 0x3a, 0x1c, 0x6e, 0x81, 0x28, 0x54, 0x54, 0xa6, 0x83, - 0xd7, 0xd0, 0x3f, 0x5b, 0xcd, 0xdf, 0x9f, 0x9e, 0x0b, 0xb5, 0xd0, 0x0b, 0x91, 0x21, 0x42, 0x33, - 0x0b, 0xaf, 0xc8, 0x65, 0x3e, 0x1b, 0xf5, 0xb8, 0x8d, 0x71, 0x00, 0x8d, 0x5c, 0x28, 0xb7, 0xee, - 0xb3, 0x51, 0x9f, 0x9b, 0x30, 0xf8, 0xc6, 0xc0, 0x99, 0x5b, 0xfa, 0xb9, 0x0e, 0x35, 0xe1, 0x21, - 0x74, 0x55, 0x78, 0x41, 0x67, 0x22, 0x29, 0x3b, 0xbb, 0xfc, 0xcf, 0x1b, 0x1f, 0x41, 0x4f, 0xcb, - 0x15, 0x27, 0x53, 0x6f, 0x39, 0xba, 0x7c, 0x9f, 0xc0, 0x17, 0xd0, 0x49, 0x43, 0xa5, 0xcf, 0x85, - 0x72, 0x1b, 0x3e, 0x1b, 0x39, 0x93, 0xe1, 0x38, 0x8f, 0xc6, 0x77, 0x66, 0xe2, 0xbb, 0x0a, 0x7c, - 0x09, 0x10, 0x17, 0x52, 0x52, 0x66, 0xeb, 0x9b, 0xf7, 0xd5, 0x57, 0x8a, 0x82, 0x37, 0xe0, 0x1c, - 0xdd, 0x50, 0x3c, 0x9b, 0x9d, 0x1e, 0x67, 0x17, 0x02, 0x1f, 0x42, 0x3b, 0x15, 0xf1, 0xf2, 0x78, - 0xb6, 0x5d, 0x70, 0xfb, 0x32, 0x6b, 0xd3, 0x0d, 0xed, 0xe6, 0xb3, 0x71, 0xf0, 0x95, 0xc1, 0xb0, - 0x5c, 0x72, 0xba, 0xc8, 0x52, 0x71, 0x79, 0xf4, 0x99, 0x32, 0x8d, 0x8f, 0xa1, 0x69, 0xf4, 0xb3, - 0xfd, 0xce, 0xa4, 0x6f, 0xbe, 0x3e, 0x0d, 0x15, 0x59, 0x90, 0x5b, 0x08, 0x9f, 0x42, 0x4b, 0x19, - 0x59, 0x2c, 0x9b, 0x33, 0xf9, 0xdf, 0xd4, 0x54, 0xd4, 0xe2, 0x25, 0x6a, 0x84, 0x21, 0xd3, 0xf5, - 0x61, 0x95, 0x93, 0x5d, 0xbe, 0xc5, 0xf7, 0x09, 0x33, 0xa9, 0xc8, 0x2d, 0xd4, 0xb4, 0xd0, 0xf6, - 0x15, 0xfc, 0xaa, 0xc3, 0x41, 0x49, 0x76, 0x22, 0xa2, 0xbf, 0x1e, 0x69, 0xcf, 0x56, 0xaf, 0xb2, - 0xe1, 0x93, 0xd2, 0xda, 0x7b, 0xa5, 0x37, 0xe8, 0x3f, 0xc8, 0x6e, 0x4e, 0x46, 0x5d, 0xa7, 0x6e, - 0xcb, 0x8a, 0x6c, 0x42, 0xa3, 0x70, 0x92, 0xa4, 0xca, 0x6d, 0xfb, 0x0d, 0x73, 0x58, 0x26, 0xc6, - 0x00, 0xfe, 0x0b, 0xe5, 0xa5, 0x7a, 0xf7, 0x89, 0xe2, 0xa5, 0x2a, 0xae, 0xdc, 0x8e, 0xbd, 0xb0, - 0x3b, 0x39, 0x7c, 0x06, 0x9d, 0x24, 0x49, 0x8d, 0x79, 0x6e, 0x77, 0x2f, 0x67, 0xc5, 0x53, 0xbe, - 0xc3, 0xd1, 0x07, 0xe7, 0xba, 0xa0, 0x82, 0xa6, 0x45, 0xbc, 0x24, 0xed, 0xf6, 0xec, 0xc7, 0xab, - 0x29, 0x1c, 0xed, 0x9c, 0x01, 0x9f, 0x8d, 0x0e, 0x26, 0xb8, 0x77, 0xe6, 0x44, 0x44, 0x55, 0x73, - 0x9e, 0xbf, 0xad, 0xa8, 0x5c, 0xde, 0x78, 0x17, 0x9a, 0x8b, 0x6c, 0xa1, 0x07, 0x35, 0x04, 0x68, - 0x5b, 0xd2, 0x64, 0xc0, 0xd0, 0x81, 0x8e, 0x2a, 0xe2, 0x98, 0x94, 0x1a, 0xd4, 0xb1, 0x07, 0x2d, - 0x92, 0x52, 0xc8, 0x41, 0x63, 0xea, 0x7e, 0x5f, 0x7b, 0xec, 0x76, 0xed, 0xb1, 0x9f, 0x6b, 0x8f, - 0x7d, 0xd9, 0x78, 0xb5, 0xdb, 0x8d, 0x57, 0xfb, 0xb1, 0xf1, 0x6a, 0x51, 0xdb, 0xfe, 0x79, 0xaf, - 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xae, 0x90, 0xfe, 0xb8, 0xa7, 0x03, 0x00, 0x00, -} - func (m *MySQLPosition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -468,34 +428,28 @@ func (m *MySQLPosition) Marshal() (dAtA []byte, err error) { } func (m *MySQLPosition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MySQLPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.Pos != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.Pos)) - i-- - dAtA[i] = 0x10 - } if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.Name))) - i-- dAtA[i] = 0xa + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Pos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.Pos)) } - return len(dAtA) - i, nil + return i, nil } func (m *SyncerState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -503,66 +457,57 @@ func (m *SyncerState) Marshal() (dAtA []byte, err error) { } func (m *SyncerState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncerState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.CurrentPos != nil { - { - size, err := m.CurrentPos.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.LastPos != nil { - { - size, err := m.LastPos.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) + if m.SafeMode { + dAtA[i] = 0x8 + i++ + if m.SafeMode { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i-- - dAtA[i] = 0x1a + i++ } if m.TryReSync { - i-- + dAtA[i] = 0x10 + i++ if m.TryReSync { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if m.SafeMode { - i-- - if m.SafeMode { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.LastPos != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.LastPos.Size())) + n1, err := m.LastPos.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x8 + i += n1 + } + if m.CurrentPos != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.CurrentPos.Size())) + n2, err := m.CurrentPos.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 } - return len(dAtA) - i, nil + return i, nil } func (m *ExecDDLInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -570,39 +515,33 @@ func (m *ExecDDLInfo) Marshal() (dAtA []byte, err error) { } func (m *ExecDDLInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecDDLInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l + if len(m.LockID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.LockID))) + i += copy(dAtA[i:], m.LockID) + } if m.Exec { - i-- + dAtA[i] = 0x10 + i++ if m.Exec { dAtA[i] = 1 } else { dAtA[i] = 0 } - i-- - dAtA[i] = 0x10 + i++ } - if len(m.LockID) > 0 { - i -= len(m.LockID) - copy(dAtA[i:], m.LockID) - i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.LockID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return i, nil } func (m *SyncerBinlogEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -610,56 +549,47 @@ func (m *SyncerBinlogEvent) Marshal() (dAtA []byte, err error) { } func (m *SyncerBinlogEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncerBinlogEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.OpType != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.OpType)) - i-- - dAtA[i] = 0x20 - } - if m.EventType != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.EventType)) - i-- - dAtA[i] = 0x18 + if m.Base != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.Base.Size())) + n3, err := m.Base.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x12 - } - if m.Base != nil { - { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.State.Size())) + n4, err := m.State.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i += n4 } - return len(dAtA) - i, nil + if m.EventType != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.EventType)) + } + if m.OpType != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.OpType)) + } + return i, nil } func (m *SyncerJobEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } @@ -667,114 +597,103 @@ func (m *SyncerJobEvent) Marshal() (dAtA []byte, err error) { } func (m *SyncerJobEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncerJobEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) + var i int _ = i var l int _ = l - if m.State != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x50 + if m.Base != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.Base.Size())) + n5, err := m.Base.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 } - if len(m.QueueBucket) > 0 { - i -= len(m.QueueBucket) - copy(dAtA[i:], m.QueueBucket) - i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.QueueBucket))) - i-- - dAtA[i] = 0x4a + if m.OpType != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.OpType)) } - if m.DdlInfo != nil { - { - size, err := m.DdlInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) + if m.Pos != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.Pos.Size())) + n6, err := m.Pos.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x42 - } - if m.ArgsChecksum != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.ArgsChecksum)) - i-- - dAtA[i] = 0x38 + i += n6 } - if len(m.Ddls) > 0 { - for iNdEx := len(m.Ddls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ddls[iNdEx]) - copy(dAtA[i:], m.Ddls[iNdEx]) - i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.Ddls[iNdEx]))) - i-- - dAtA[i] = 0x32 + if m.CurrentPos != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.CurrentPos.Size())) + n7, err := m.CurrentPos.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n7 } if len(m.Sql) > 0 { - i -= len(m.Sql) - copy(dAtA[i:], m.Sql) - i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.Sql))) - i-- dAtA[i] = 0x2a + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.Sql))) + i += copy(dAtA[i:], m.Sql) } - if m.CurrentPos != nil { - { - size, err := m.CurrentPos.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) + if len(m.Ddls) > 0 { + for _, s := range m.Ddls { + dAtA[i] = 0x32 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) } - i-- - dAtA[i] = 0x22 } - if m.Pos != nil { - { - size, err := m.Pos.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) + if m.ArgsChecksum != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.ArgsChecksum)) + } + if m.DdlInfo != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.DdlInfo.Size())) + n8, err := m.DdlInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i += n8 } - if m.OpType != 0 { - i = encodeVarintTracerSyncer(dAtA, i, uint64(m.OpType)) - i-- - dAtA[i] = 0x10 + if len(m.QueueBucket) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(len(m.QueueBucket))) + i += copy(dAtA[i:], m.QueueBucket) } - if m.Base != nil { - { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTracerSyncer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.State != 0 { + dAtA[i] = 0x50 + i++ + i = encodeVarintTracerSyncer(dAtA, i, uint64(m.State)) } - return len(dAtA) - i, nil + return i, nil } func encodeVarintTracerSyncer(dAtA []byte, offset int, v uint64) int { - offset -= sovTracerSyncer(v) - base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return base + return offset + 1 } func (m *MySQLPosition) Size() (n int) { if m == nil { @@ -903,7 +822,14 @@ func (m *SyncerJobEvent) Size() (n int) { } func sovTracerSyncer(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n } func sozTracerSyncer(x uint64) (n int) { return sovTracerSyncer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -923,7 +849,7 @@ func (m *MySQLPosition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -951,7 +877,7 @@ func (m *MySQLPosition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -961,9 +887,6 @@ func (m *MySQLPosition) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -983,7 +906,7 @@ func (m *MySQLPosition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Pos |= uint32(b&0x7F) << shift + m.Pos |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } @@ -997,9 +920,6 @@ func (m *MySQLPosition) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerSyncer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerSyncer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1027,7 +947,7 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1055,7 +975,7 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1075,7 +995,7 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1095,7 +1015,7 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1104,9 +1024,6 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1131,7 +1048,7 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1140,9 +1057,6 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1162,9 +1076,6 @@ func (m *SyncerState) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerSyncer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerSyncer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1192,7 +1103,7 @@ func (m *ExecDDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1220,7 +1131,7 @@ func (m *ExecDDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1230,9 +1141,6 @@ func (m *ExecDDLInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1252,7 +1160,7 @@ func (m *ExecDDLInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1267,9 +1175,6 @@ func (m *ExecDDLInfo) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerSyncer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerSyncer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1297,7 +1202,7 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1325,7 +1230,7 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1334,9 +1239,6 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1361,7 +1263,7 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1370,9 +1272,6 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1397,7 +1296,7 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EventType |= int32(b&0x7F) << shift + m.EventType |= (int32(b) & 0x7F) << shift if b < 0x80 { break } @@ -1416,7 +1315,7 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.OpType |= int32(b&0x7F) << shift + m.OpType |= (int32(b) & 0x7F) << shift if b < 0x80 { break } @@ -1430,9 +1329,6 @@ func (m *SyncerBinlogEvent) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerSyncer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerSyncer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1460,7 +1356,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1488,7 +1384,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1497,9 +1393,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1524,7 +1417,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.OpType |= int32(b&0x7F) << shift + m.OpType |= (int32(b) & 0x7F) << shift if b < 0x80 { break } @@ -1543,7 +1436,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1552,9 +1445,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1579,7 +1469,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1588,9 +1478,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1615,7 +1502,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1625,9 +1512,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1647,7 +1531,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1657,9 +1541,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1679,7 +1560,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ArgsChecksum |= uint32(b&0x7F) << shift + m.ArgsChecksum |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } @@ -1698,7 +1579,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } @@ -1707,9 +1588,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1734,7 +1612,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -1744,9 +1622,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTracerSyncer } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTracerSyncer - } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1766,7 +1641,7 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= SyncerJobState(b&0x7F) << shift + m.State |= (SyncerJobState(b) & 0x7F) << shift if b < 0x80 { break } @@ -1780,9 +1655,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthTracerSyncer } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTracerSyncer - } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } @@ -1798,7 +1670,6 @@ func (m *SyncerJobEvent) Unmarshal(dAtA []byte) error { func skipTracerSyncer(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1830,8 +1701,10 @@ func skipTracerSyncer(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1848,34 +1721,91 @@ func skipTracerSyncer(dAtA []byte) (n int, err error) { break } } + iNdEx += length if length < 0 { return 0, ErrInvalidLengthTracerSyncer } - iNdEx += length + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTracerSyncer + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTracerSyncer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipTracerSyncer(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthTracerSyncer - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthTracerSyncer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTracerSyncer = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTracerSyncer = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTracerSyncer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTracerSyncer = fmt.Errorf("proto: integer overflow") ) + +func init() { proto.RegisterFile("tracer_syncer.proto", fileDescriptor_tracer_syncer_1170dba324220d8f) } + +var fileDescriptor_tracer_syncer_1170dba324220d8f = []byte{ + // 510 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xce, 0xe6, 0x7f, 0xc6, 0xbf, 0xf4, 0x97, 0x0c, 0x12, 0xb2, 0x2a, 0x64, 0x19, 0x23, 0xa4, + 0x00, 0x52, 0x24, 0x82, 0x38, 0x70, 0xe1, 0x10, 0xd2, 0x43, 0xab, 0x56, 0x2a, 0x1b, 0xee, 0xc8, + 0x7f, 0xa6, 0x25, 0x8a, 0xeb, 0x75, 0x77, 0xd7, 0xa8, 0x79, 0x0b, 0x24, 0x1e, 0x82, 0x57, 0xe1, + 0xd8, 0x23, 0x47, 0x94, 0xf0, 0x20, 0x68, 0xd7, 0x09, 0x71, 0x0f, 0x95, 0x10, 0xb7, 0xd9, 0xf9, + 0x66, 0x3e, 0xcf, 0x7c, 0xdf, 0x18, 0x1e, 0x68, 0x19, 0xc6, 0x24, 0x3f, 0xaa, 0x55, 0x16, 0x93, + 0x1c, 0xe7, 0x52, 0x68, 0x81, 0xf5, 0x3c, 0x3a, 0x1c, 0x6e, 0x81, 0x28, 0x54, 0x54, 0xa6, 0x83, + 0xd7, 0xd0, 0x3f, 0x5b, 0xcd, 0xdf, 0x9f, 0x9e, 0x0b, 0xb5, 0xd0, 0x0b, 0x91, 0x21, 0x42, 0x33, + 0x0b, 0xaf, 0xc8, 0x65, 0x3e, 0x1b, 0xf5, 0xb8, 0x8d, 0x71, 0x00, 0x8d, 0x5c, 0x28, 0xb7, 0xee, + 0xb3, 0x51, 0x9f, 0x9b, 0x30, 0xf8, 0xc6, 0xc0, 0x99, 0x5b, 0xfa, 0xb9, 0x0e, 0x35, 0xe1, 0x21, + 0x74, 0x55, 0x78, 0x41, 0x67, 0x22, 0x29, 0x3b, 0xbb, 0xfc, 0xcf, 0x1b, 0x1f, 0x41, 0x4f, 0xcb, + 0x15, 0x27, 0x53, 0x6f, 0x39, 0xba, 0x7c, 0x9f, 0xc0, 0x17, 0xd0, 0x49, 0x43, 0xa5, 0xcf, 0x85, + 0x72, 0x1b, 0x3e, 0x1b, 0x39, 0x93, 0xe1, 0x38, 0x8f, 0xc6, 0x77, 0x66, 0xe2, 0xbb, 0x0a, 0x7c, + 0x09, 0x10, 0x17, 0x52, 0x52, 0x66, 0xeb, 0x9b, 0xf7, 0xd5, 0x57, 0x8a, 0x82, 0x37, 0xe0, 0x1c, + 0xdd, 0x50, 0x3c, 0x9b, 0x9d, 0x1e, 0x67, 0x17, 0x02, 0x1f, 0x42, 0x3b, 0x15, 0xf1, 0xf2, 0x78, + 0xb6, 0x5d, 0x70, 0xfb, 0x32, 0x6b, 0xd3, 0x0d, 0xed, 0xe6, 0xb3, 0x71, 0xf0, 0x95, 0xc1, 0xb0, + 0x5c, 0x72, 0xba, 0xc8, 0x52, 0x71, 0x79, 0xf4, 0x99, 0x32, 0x8d, 0x8f, 0xa1, 0x69, 0xf4, 0xb3, + 0xfd, 0xce, 0xa4, 0x6f, 0xbe, 0x3e, 0x0d, 0x15, 0x59, 0x90, 0x5b, 0x08, 0x9f, 0x42, 0x4b, 0x19, + 0x59, 0x2c, 0x9b, 0x33, 0xf9, 0xdf, 0xd4, 0x54, 0xd4, 0xe2, 0x25, 0x6a, 0x84, 0x21, 0xd3, 0xf5, + 0x61, 0x95, 0x93, 0x5d, 0xbe, 0xc5, 0xf7, 0x09, 0x33, 0xa9, 0xc8, 0x2d, 0xd4, 0xb4, 0xd0, 0xf6, + 0x15, 0xfc, 0xaa, 0xc3, 0x41, 0x49, 0x76, 0x22, 0xa2, 0xbf, 0x1e, 0x69, 0xcf, 0x56, 0xaf, 0xb2, + 0xe1, 0x93, 0xd2, 0xda, 0x7b, 0xa5, 0x37, 0xe8, 0x3f, 0xc8, 0x6e, 0x4e, 0x46, 0x5d, 0xa7, 0x6e, + 0xcb, 0x8a, 0x6c, 0x42, 0xa3, 0x70, 0x92, 0xa4, 0xca, 0x6d, 0xfb, 0x0d, 0x73, 0x58, 0x26, 0xc6, + 0x00, 0xfe, 0x0b, 0xe5, 0xa5, 0x7a, 0xf7, 0x89, 0xe2, 0xa5, 0x2a, 0xae, 0xdc, 0x8e, 0xbd, 0xb0, + 0x3b, 0x39, 0x7c, 0x06, 0x9d, 0x24, 0x49, 0x8d, 0x79, 0x6e, 0x77, 0x2f, 0x67, 0xc5, 0x53, 0xbe, + 0xc3, 0xd1, 0x07, 0xe7, 0xba, 0xa0, 0x82, 0xa6, 0x45, 0xbc, 0x24, 0xed, 0xf6, 0xec, 0xc7, 0xab, + 0x29, 0x1c, 0xed, 0x9c, 0x01, 0x9f, 0x8d, 0x0e, 0x26, 0xb8, 0x77, 0xe6, 0x44, 0x44, 0x55, 0x73, + 0x9e, 0xbf, 0xad, 0xa8, 0x5c, 0xde, 0x78, 0x17, 0x9a, 0x8b, 0x6c, 0xa1, 0x07, 0x35, 0x04, 0x68, + 0x5b, 0xd2, 0x64, 0xc0, 0xd0, 0x81, 0x8e, 0x2a, 0xe2, 0x98, 0x94, 0x1a, 0xd4, 0xb1, 0x07, 0x2d, + 0x92, 0x52, 0xc8, 0x41, 0x63, 0xea, 0x7e, 0x5f, 0x7b, 0xec, 0x76, 0xed, 0xb1, 0x9f, 0x6b, 0x8f, + 0x7d, 0xd9, 0x78, 0xb5, 0xdb, 0x8d, 0x57, 0xfb, 0xb1, 0xf1, 0x6a, 0x51, 0xdb, 0xfe, 0x79, 0xaf, + 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xae, 0x90, 0xfe, 0xb8, 0xa7, 0x03, 0x00, 0x00, +} diff --git a/dm/pbmock/dmworker.go b/dm/pbmock/dmworker.go index 871677951e..5d046b6c43 100644 --- a/dm/pbmock/dmworker.go +++ b/dm/pbmock/dmworker.go @@ -236,26 +236,6 @@ func (mr *MockWorkerClientMockRecorder) QueryStatus(arg0, arg1 interface{}, arg2 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStatus", reflect.TypeOf((*MockWorkerClient)(nil).QueryStatus), varargs...) } -// QueryTaskOperation mocks base method -func (m *MockWorkerClient) QueryTaskOperation(arg0 context.Context, arg1 *pb.QueryTaskOperationRequest, arg2 ...grpc.CallOption) (*pb.QueryTaskOperationResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "QueryTaskOperation", varargs...) - ret0, _ := ret[0].(*pb.QueryTaskOperationResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// QueryTaskOperation indicates an expected call of QueryTaskOperation -func (mr *MockWorkerClientMockRecorder) QueryTaskOperation(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTaskOperation", reflect.TypeOf((*MockWorkerClient)(nil).QueryTaskOperation), varargs...) -} - // QueryWorkerConfig mocks base method func (m *MockWorkerClient) QueryWorkerConfig(arg0 context.Context, arg1 *pb.QueryWorkerConfigRequest, arg2 ...grpc.CallOption) (*pb.QueryWorkerConfigResponse, error) { m.ctrl.T.Helper() @@ -277,14 +257,14 @@ func (mr *MockWorkerClientMockRecorder) QueryWorkerConfig(arg0, arg1 interface{} } // StartSubTask mocks base method -func (m *MockWorkerClient) StartSubTask(arg0 context.Context, arg1 *pb.StartSubTaskRequest, arg2 ...grpc.CallOption) (*pb.OperateSubTaskResponse, error) { +func (m *MockWorkerClient) StartSubTask(arg0 context.Context, arg1 *pb.StartSubTaskRequest, arg2 ...grpc.CallOption) (*pb.CommonWorkerResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "StartSubTask", varargs...) - ret0, _ := ret[0].(*pb.OperateSubTaskResponse) + ret0, _ := ret[0].(*pb.CommonWorkerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -337,14 +317,14 @@ func (mr *MockWorkerClientMockRecorder) UpdateRelayConfig(arg0, arg1 interface{} } // UpdateSubTask mocks base method -func (m *MockWorkerClient) UpdateSubTask(arg0 context.Context, arg1 *pb.UpdateSubTaskRequest, arg2 ...grpc.CallOption) (*pb.OperateSubTaskResponse, error) { +func (m *MockWorkerClient) UpdateSubTask(arg0 context.Context, arg1 *pb.UpdateSubTaskRequest, arg2 ...grpc.CallOption) (*pb.CommonWorkerResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "UpdateSubTask", varargs...) - ret0, _ := ret[0].(*pb.OperateSubTaskResponse) + ret0, _ := ret[0].(*pb.CommonWorkerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -665,21 +645,6 @@ func (mr *MockWorkerServerMockRecorder) QueryStatus(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStatus", reflect.TypeOf((*MockWorkerServer)(nil).QueryStatus), arg0, arg1) } -// QueryTaskOperation mocks base method -func (m *MockWorkerServer) QueryTaskOperation(arg0 context.Context, arg1 *pb.QueryTaskOperationRequest) (*pb.QueryTaskOperationResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "QueryTaskOperation", arg0, arg1) - ret0, _ := ret[0].(*pb.QueryTaskOperationResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// QueryTaskOperation indicates an expected call of QueryTaskOperation -func (mr *MockWorkerServerMockRecorder) QueryTaskOperation(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryTaskOperation", reflect.TypeOf((*MockWorkerServer)(nil).QueryTaskOperation), arg0, arg1) -} - // QueryWorkerConfig mocks base method func (m *MockWorkerServer) QueryWorkerConfig(arg0 context.Context, arg1 *pb.QueryWorkerConfigRequest) (*pb.QueryWorkerConfigResponse, error) { m.ctrl.T.Helper() @@ -696,10 +661,10 @@ func (mr *MockWorkerServerMockRecorder) QueryWorkerConfig(arg0, arg1 interface{} } // StartSubTask mocks base method -func (m *MockWorkerServer) StartSubTask(arg0 context.Context, arg1 *pb.StartSubTaskRequest) (*pb.OperateSubTaskResponse, error) { +func (m *MockWorkerServer) StartSubTask(arg0 context.Context, arg1 *pb.StartSubTaskRequest) (*pb.CommonWorkerResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StartSubTask", arg0, arg1) - ret0, _ := ret[0].(*pb.OperateSubTaskResponse) + ret0, _ := ret[0].(*pb.CommonWorkerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -741,10 +706,10 @@ func (mr *MockWorkerServerMockRecorder) UpdateRelayConfig(arg0, arg1 interface{} } // UpdateSubTask mocks base method -func (m *MockWorkerServer) UpdateSubTask(arg0 context.Context, arg1 *pb.UpdateSubTaskRequest) (*pb.OperateSubTaskResponse, error) { +func (m *MockWorkerServer) UpdateSubTask(arg0 context.Context, arg1 *pb.UpdateSubTaskRequest) (*pb.CommonWorkerResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateSubTask", arg0, arg1) - ret0, _ := ret[0].(*pb.OperateSubTaskResponse) + ret0, _ := ret[0].(*pb.CommonWorkerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/dm/proto/dmworker.proto b/dm/proto/dmworker.proto index 0d5aaa187d..1bd373a44b 100644 --- a/dm/proto/dmworker.proto +++ b/dm/proto/dmworker.proto @@ -4,13 +4,12 @@ package pb; service Worker { - rpc StartSubTask (StartSubTaskRequest) returns (OperateSubTaskResponse) {} + rpc StartSubTask (StartSubTaskRequest) returns (CommonWorkerResponse) {} rpc OperateSubTask (OperateSubTaskRequest) returns (OperateSubTaskResponse) {} - rpc UpdateSubTask (UpdateSubTaskRequest) returns (OperateSubTaskResponse) {} + rpc UpdateSubTask (UpdateSubTaskRequest) returns (CommonWorkerResponse) {} rpc QueryStatus (QueryStatusRequest) returns (QueryStatusResponse) {} rpc QueryError (QueryErrorRequest) returns (QueryErrorResponse) {} - rpc QueryTaskOperation(QueryTaskOperationRequest) returns (QueryTaskOperationResponse) {} rpc HandleSQLs (HandleSubTaskSQLsRequest) returns (CommonWorkerResponse) {} // FetchDDLInfo fetches DDL info from dm-worker by dm-master @@ -71,19 +70,10 @@ message OperateSubTaskRequest { } message OperateSubTaskResponse { - CommonWorkerResponse meta = 1; - TaskOp op = 2; - int64 logID = 3; -} - -message QueryTaskOperationRequest { - string name = 1; // sub task's name - int64 logID = 2; // operation log ID -} - -message QueryTaskOperationResponse { - CommonWorkerResponse meta = 1; - TaskLog log = 2; // sub task's operation log + TaskOp op = 1; + bool result = 2; + string worker = 3; // worker name, set by dm-master + string msg = 4; } message UpdateSubTaskRequest { @@ -458,19 +448,3 @@ message QueryWorkerConfigResponse { string sourceID = 4; // source ID string content = 5; // marshaled config content } - -message TaskMeta { - TaskOp op = 1; - Stage stage = 2; // the stage of sub-task after we apply some operations - string name = 3; // sub task's name - bytes task = 4; // (sub) task's configuration -} - -message TaskLog { - int64 id = 1; - TaskMeta task = 2; - int64 ts = 3; - // true means this log is applied successfully - bool success = 4; - string message = 5; -} diff --git a/dm/worker/db.go b/dm/worker/db.go deleted file mode 100644 index fb0ecdf9b1..0000000000 --- a/dm/worker/db.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" - - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/opt" - "go.uber.org/zap" -) - -// KVConfig is the configuration of goleveldb -type KVConfig struct { - BlockCacheCapacity int `toml:"block-cache-capacity" json:"block-cache-capacity"` - BlockRestartInterval int `toml:"block-restart-interval" json:"block-restart-interval"` - BlockSize int `toml:"block-size" json:"block-size"` - CompactionL0Trigger int `toml:"compaction-L0-trigger" json:"compaction-L0-trigger"` - CompactionTableSize int `toml:"compaction-table-size" json:"compaction-table-size"` - CompactionTotalSize int `toml:"compaction-total-size" json:"compaction-total-size"` - CompactionTotalSizeMultiplier float64 `toml:"compaction-total-size-multiplier" json:"compaction-total-size-multiplier"` - WriteBuffer int `toml:"write-buffer" json:"write-buffer"` - WriteL0PauseTrigger int `toml:"write-L0-pause-trigger" json:"write-L0-pause-trigger"` - WriteL0SlowdownTrigger int `toml:"write-L0-slowdown-trigger" json:"write-L0-slowdown-trigger"` -} - -// default leveldb config -var defaultKVConfig = &KVConfig{ - BlockCacheCapacity: 8388608, - BlockRestartInterval: 16, - BlockSize: 4096, - CompactionL0Trigger: 8, - CompactionTableSize: 67108864, - CompactionTotalSize: 536870912, - CompactionTotalSizeMultiplier: 8, - WriteBuffer: 67108864, - WriteL0PauseTrigger: 24, - WriteL0SlowdownTrigger: 17, -} - -func openDB(kvDir string, config *KVConfig) (*leveldb.DB, error) { - log.L().Info("", zap.Reflect("kv config", config)) - - var opts opt.Options - opts.BlockCacheCapacity = config.BlockCacheCapacity - opts.BlockRestartInterval = config.BlockRestartInterval - opts.BlockSize = config.BlockSize - opts.CompactionL0Trigger = config.CompactionL0Trigger - opts.CompactionTableSize = config.CompactionTableSize - opts.CompactionTotalSize = config.CompactionTotalSize - opts.CompactionTotalSizeMultiplier = config.CompactionTotalSizeMultiplier - opts.WriteBuffer = config.WriteBuffer - opts.WriteL0PauseTrigger = config.WriteL0PauseTrigger - opts.WriteL0SlowdownTrigger = config.WriteL0SlowdownTrigger - - db, err := leveldb.OpenFile(kvDir, &opts) - return db, terror.ErrWorkerOpenKVDBFile.Delegate(err) -} diff --git a/dm/worker/log.go b/dm/worker/log.go deleted file mode 100644 index d02225dd46..0000000000 --- a/dm/worker/log.go +++ /dev/null @@ -1,552 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "bytes" - "context" - "encoding/binary" - "fmt" - "sync/atomic" - "time" - - "github.com/golang/protobuf/proto" - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/iterator" - "github.com/syndtr/goleveldb/leveldb/opt" - "github.com/syndtr/goleveldb/leveldb/util" - "go.uber.org/zap" - - "github.com/pingcap/dm/dm/pb" - tcontext "github.com/pingcap/dm/pkg/context" - "github.com/pingcap/dm/pkg/helper" - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" -) - -var ( - // GCBatchSize is batch size for gc process - GCBatchSize = 1024 - // GCInterval is the interval to gc - GCInterval = time.Hour -) - -// dbOperator is an interface which used to do Get/Put/Delete operation on levelDB. -// It often can be an instance of leveldb.DB or leveldb.Transaction. -type dbOperator interface { - Get(key []byte, ro *opt.ReadOptions) ([]byte, error) - Put(key, value []byte, opts *opt.WriteOptions) error - Delete(key []byte, wo *opt.WriteOptions) error - Write(batch *leveldb.Batch, wo *opt.WriteOptions) error - NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator -} - -// HandledPointerKey is key of HandledPointer which point to the last handled log -var HandledPointerKey = []byte("!DM!handledPointer") - -// Pointer is a logic pointer that point to a location of log -type Pointer struct { - Location int64 -} - -// MarshalBinary never return not nil err now -func (p *Pointer) MarshalBinary() ([]byte, error) { - data := make([]byte, 8) - binary.BigEndian.PutUint64(data, uint64(p.Location)) - - return data, nil -} - -// UnmarshalBinary implement encoding.BinaryMarshal -func (p *Pointer) UnmarshalBinary(data []byte) error { - if len(data) != 8 { - return terror.ErrWorkerLogPointerInvalid.Generate(data) - } - - p.Location = int64(binary.BigEndian.Uint64(data)) - return nil -} - -// LoadHandledPointer loads handled pointer value from kv DB -func LoadHandledPointer(h dbOperator) (Pointer, error) { - var p Pointer - if helper.IsNil(h) { - return p, terror.ErrWorkerLogInvalidHandler.Generate() - } - - value, err := h.Get(HandledPointerKey, nil) - if err != nil { - // return zero value when not found - if err == leveldb.ErrNotFound { - return p, nil - } - - return p, terror.ErrWorkerLogFetchPointer.Delegate(err) - } - - err = p.UnmarshalBinary(value) - if err != nil { - return p, terror.ErrWorkerLogUnmarshalPointer.Delegate(err, value) - } - - return p, nil -} - -// ClearHandledPointer clears the handled pointer in kv DB. -func ClearHandledPointer(tctx *tcontext.Context, h dbOperator) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - err := h.Delete(HandledPointerKey, nil) - return terror.ErrWorkerLogClearPointer.Delegate(err) -} - -var ( - defaultGCForwardLog int64 = 10000 - - // TaskLogPrefix is prefix of task log key - TaskLogPrefix = []byte("!DM!TaskLog") -) - -// DecodeTaskLogKey decodes task log key and returns its log ID -func DecodeTaskLogKey(key []byte) (int64, error) { - if len(key) != len(TaskLogPrefix)+8 { - return 0, terror.ErrWorkerLogTaskKeyNotValid.Generate(key) - } - - return int64(binary.BigEndian.Uint64(key[len(TaskLogPrefix):])), nil -} - -// EncodeTaskLogKey encodes log ID into a task log key -func EncodeTaskLogKey(id int64) []byte { - key := make([]byte, 8+len(TaskLogPrefix)) - copy(key[:len(TaskLogPrefix)], TaskLogPrefix) - binary.BigEndian.PutUint64(key[len(TaskLogPrefix):], uint64(id)) - - return key -} - -// Logger manage task operation logs -type Logger struct { - endPointer Pointer - handledPointer Pointer - - l log.Logger -} - -// Initial initials Logger -func (logger *Logger) Initial(h dbOperator) ([]*pb.TaskLog, error) { - if helper.IsNil(h) { - return nil, terror.ErrWorkerLogInvalidHandler.Generate() - } - - handledPointer, err := LoadHandledPointer(h) - if err != nil { - return nil, err - } - - var ( - endPointer = Pointer{ - Location: handledPointer.Location + 1, - } - logs = make([]*pb.TaskLog, 0, 4) - ) - iter := h.NewIterator(util.BytesPrefix(TaskLogPrefix), nil) - startLocation := handledPointer.Location + 1 - for ok := iter.Seek(EncodeTaskLogKey(startLocation)); ok; ok = iter.Next() { - logBytes := iter.Value() - opLog := &pb.TaskLog{} - err = opLog.Unmarshal(logBytes) - if err != nil { - err = terror.ErrWorkerLogUnmarshalTaskKey.Delegate(err, logBytes) - break - } - - if opLog.Id >= endPointer.Location { - // move to next location - endPointer.Location = opLog.Id + 1 - logs = append(logs, opLog) - } else { - panic(fmt.Sprintf("out of sorted order from level db for task log key % X (log ID %d), start location %d, end location %d", - iter.Key(), opLog.Id, startLocation, endPointer.Location)) - } - } - iter.Release() - if err != nil { - return nil, err - } - - err = iter.Error() - if err != nil { - return nil, terror.ErrWorkerLogFetchLogIter.Delegate(err, handledPointer) - } - - logger.handledPointer = handledPointer - logger.endPointer = endPointer - - logger.l.Info("finish initialization", zap.Reflect("handle pointer", logger.handledPointer), zap.Reflect("end pointer", logger.endPointer)) - - return logs, nil -} - -// GetTaskLog returns task log by given log ID -func (logger *Logger) GetTaskLog(h dbOperator, id int64) (*pb.TaskLog, error) { - if helper.IsNil(h) { - return nil, terror.ErrWorkerLogInvalidHandler.Generate() - } - - logBytes, err := h.Get(EncodeTaskLogKey(id), nil) - if err != nil { - if err == leveldb.ErrNotFound { - return nil, nil - } - return nil, terror.ErrWorkerLogGetTaskLog.Delegate(err, id) - } - - opLog := &pb.TaskLog{} - err = opLog.Unmarshal(logBytes) - if err != nil { - return nil, terror.ErrWorkerLogUnmarshalBinary.Delegate(err, logBytes) - } - - return opLog, nil -} - -// ForwardTo forward handled pointer to specified ID location -// not thread safe -func (logger *Logger) ForwardTo(h dbOperator, ID int64) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - handledPointer := Pointer{ - Location: ID, - } - - handledPointerBytes, _ := handledPointer.MarshalBinary() - - err := h.Put(HandledPointerKey, handledPointerBytes, nil) - if err != nil { - return terror.ErrWorkerLogForwardPointer.Delegate(err, ID) - } - - logger.handledPointer = handledPointer - return nil -} - -// MarkAndForwardLog marks result success or not in log, and forwards handledPointer -func (logger *Logger) MarkAndForwardLog(h dbOperator, opLog *pb.TaskLog) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - logBytes, err := opLog.Marshal() - if err != nil { - return terror.ErrWorkerLogMarshalTask.Delegate(err, opLog) - } - - err = h.Put(EncodeTaskLogKey(opLog.Id), logBytes, nil) - if err != nil { - return terror.ErrWorkerLogSaveTask.Delegate(err, opLog.Id) - } - - return logger.ForwardTo(h, opLog.Id) -} - -// Append appends a task log -func (logger *Logger) Append(h dbOperator, opLog *pb.TaskLog) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - var id int64 - for { - id = atomic.LoadInt64(&logger.endPointer.Location) - if atomic.CompareAndSwapInt64(&logger.endPointer.Location, id, id+1) { - break - } - } - - opLog.Id = id - opLog.Ts = time.Now().UnixNano() - logBytes, err := opLog.Marshal() - if err != nil { - return terror.ErrWorkerLogMarshalTask.Delegate(err, opLog) - } - - err = h.Put(EncodeTaskLogKey(id), logBytes, nil) - if err != nil { - return terror.ErrWorkerLogSaveTask.Delegate(err, opLog) - } - - return nil -} - -// GC deletes useless log -func (logger *Logger) GC(ctx context.Context, h dbOperator) { - ticker := time.NewTicker(GCInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - logger.l.Info("gc routine exits!") - return - case <-ticker.C: - var gcID int64 - handledPointerLocaltion := atomic.LoadInt64(&logger.handledPointer.Location) - if handledPointerLocaltion > defaultGCForwardLog { - gcID = handledPointerLocaltion - defaultGCForwardLog - } - logger.doGC(h, gcID) - } - } -} - -func (logger *Logger) doGC(h dbOperator, id int64) { - if helper.IsNil(h) { - logger.l.Error(terror.ErrWorkerLogInvalidHandler.Error(), zap.String("feature", "gc")) - return - } - - firstKey := make([]byte, 0, len(TaskLogPrefix)+8) - endKey := EncodeTaskLogKey(id + 1) - irange := &util.Range{ - Start: EncodeTaskLogKey(0), - } - iter := h.NewIterator(irange, nil) - batch := new(leveldb.Batch) - for iter.Next() { - if bytes.Compare(endKey, iter.Key()) <= 0 { - break - } - - if len(firstKey) == 0 { - firstKey = append(firstKey, iter.Key()...) - } - - batch.Delete(iter.Key()) - if batch.Len() == GCBatchSize { - err := h.Write(batch, nil) - if err != nil { - logger.l.Error("fail to delete keys from kv db", zap.String("feature", "gc"), zap.Binary("binary key", iter.Key()), zap.ByteString("text key", iter.Key()), log.ShortError(err)) - } - logger.l.Info("delete range", zap.String("feature", "gc"), zap.ByteString("first key", firstKey), zap.Binary("raw first key", firstKey), zap.ByteString("end key", iter.Key()), zap.Binary("raw end key", iter.Key())) - firstKey = firstKey[:0] - batch.Reset() - } - } - iter.Release() - err := iter.Error() - if err != nil { - logger.l.Error("query logs from meta", zap.String("feature", "gc"), - zap.ByteString("first key", firstKey), zap.Binary("raw first key", firstKey), zap.ByteString("< end key", endKey), zap.Binary("< raw end key", endKey), log.ShortError(err)) - } - - if batch.Len() > 0 { - logger.l.Info("delete range", zap.String("feature", "gc"), zap.ByteString("first key", firstKey), zap.Binary("raw first key", firstKey), zap.ByteString("< end key", endKey), zap.Binary("< raw end key", endKey)) - err := h.Write(batch, nil) - if err != nil { - logger.l.Error("fail to delete keys from kv db", log.ShortError(err)) - } - } -} - -// ClearOperationLog clears the task operation log. -func ClearOperationLog(tctx *tcontext.Context, h dbOperator) error { - return terror.Annotate(clearByPrefix(tctx, h, TaskLogPrefix), "clear task operation log") -} - -// **************** task meta oepration *************** // - -// TaskMetaPrefix is prefix of task meta key -var TaskMetaPrefix = []byte("!DM!TaskMeta") - -// DecodeTaskMetaKey decodes task meta key and returns task name -func DecodeTaskMetaKey(key []byte) string { - return string(key[len(TaskMetaPrefix):]) -} - -// EncodeTaskMetaKey encodes take name into a task meta key -func EncodeTaskMetaKey(name string) []byte { - key := append([]byte{}, TaskMetaPrefix...) - return append(key, name...) -} - -// LoadTaskMetas loads all task metas from kv db -func LoadTaskMetas(h dbOperator) (map[string]*pb.TaskMeta, error) { - if helper.IsNil(h) { - return nil, terror.ErrWorkerLogInvalidHandler.Generate() - } - - var ( - tasks = make(map[string]*pb.TaskMeta) - err error - ) - - iter := h.NewIterator(util.BytesPrefix(TaskMetaPrefix), nil) - for iter.Next() { - taskBytes := iter.Value() - task := &pb.TaskMeta{} - err = task.Unmarshal(taskBytes) - if err != nil { - err = terror.ErrWorkerLogUnmarshalTaskMeta.Delegate(err, taskBytes) - break - } - - tasks[task.Name] = task - } - iter.Release() - if err != nil { - return nil, terror.ErrWorkerLogFetchTaskFromMeta.Delegate(err, TaskMetaPrefix) - } - - err = iter.Error() - if err != nil { - return nil, terror.ErrWorkerLogFetchTaskFromMeta.Delegate(err, TaskMetaPrefix) - } - - return tasks, nil -} - -// SetTaskMeta saves task meta into kv db -func SetTaskMeta(h dbOperator, task *pb.TaskMeta) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - err := VerifyTaskMeta(task) - if err != nil { - return terror.Annotatef(err, "verify task meta %+v", task) - } - - taskBytes, err := task.Marshal() - if err != nil { - return terror.ErrWorkerLogMarshalTask.Delegate(err, task) - } - - err = h.Put(EncodeTaskMetaKey(task.Name), taskBytes, nil) - if err != nil { - return terror.ErrWorkerLogSaveTaskMeta.Delegate(err, task.Name) - } - - return nil -} - -// GetTaskMeta returns task meta by given name -func GetTaskMeta(h dbOperator, name string) (*pb.TaskMeta, error) { - if helper.IsNil(h) { - return nil, terror.ErrWorkerLogInvalidHandler.Generate() - } - - taskBytes, err := h.Get(EncodeTaskMetaKey(name), nil) - if err != nil { - return nil, terror.ErrWorkerLogGetTaskMeta.Delegate(err, name) - } - - task := &pb.TaskMeta{} - err = task.Unmarshal(taskBytes) - if err != nil { - return nil, terror.ErrWorkerLogUnmarshalBinary.Delegate(err, taskBytes) - } - - return task, nil -} - -// DeleteTaskMeta delete task meta from kv DB -func DeleteTaskMeta(h dbOperator, name string) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - err := h.Delete(EncodeTaskMetaKey(name), nil) - if err != nil { - return terror.ErrWorkerLogDeleteTaskMeta.Delegate(err, name) - } - - return nil -} - -// ClearTaskMeta clears all task meta in kv DB. -func ClearTaskMeta(tctx *tcontext.Context, h dbOperator) error { - return terror.Annotate(clearByPrefix(tctx, h, TaskMetaPrefix), "clear task meta") -} - -// VerifyTaskMeta verify legality of take meta -func VerifyTaskMeta(task *pb.TaskMeta) error { - if task == nil { - return terror.ErrWorkerLogVerifyTaskMeta.New("empty task not valid") - } - - if len(task.Name) == 0 { - return terror.ErrWorkerLogVerifyTaskMeta.New("empty task name not valid") - } - - if len(task.Task) == 0 { - return terror.ErrWorkerLogVerifyTaskMeta.New("empty task config not valid") - } - - if task.Stage == pb.Stage_InvalidStage { - return terror.ErrWorkerLogVerifyTaskMeta.Generatef("stage %s not valid", task.Stage) - } - - if task.Op == pb.TaskOp_InvalidOp { - return terror.ErrWorkerLogVerifyTaskMeta.Generatef("task operation %s not valid", task.Op) - } - - return nil -} - -// CloneTaskMeta returns a task meta copy -func CloneTaskMeta(task *pb.TaskMeta) *pb.TaskMeta { - return proto.Clone(task).(*pb.TaskMeta) -} - -// CloneTaskLog returns a task log copy -func CloneTaskLog(log *pb.TaskLog) *pb.TaskLog { - return proto.Clone(log).(*pb.TaskLog) -} - -// clearByPrefix clears all keys with the specified prefix. -func clearByPrefix(tctx *tcontext.Context, h dbOperator, prefix []byte) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - var err error - iter := h.NewIterator(util.BytesPrefix(prefix), nil) - batch := new(leveldb.Batch) - for iter.Next() { - batch.Delete(iter.Key()) - if batch.Len() >= GCBatchSize { - err = h.Write(batch, nil) - if err != nil { - iter.Release() - return terror.ErrWorkerLogDeleteKV.Delegate(err, prefix, iter.Key()) - } - tctx.L().Info("delete task operation log kv", zap.Binary("with prefix", prefix), zap.Binary("< key", iter.Key())) - batch.Reset() - } - } - iter.Release() - err = iter.Error() - if err != nil { - return terror.ErrWorkerLogDeleteKVIter.Delegate(err, prefix) - } - - if batch.Len() > 0 { - err = h.Write(batch, nil) - } - return terror.ErrWorkerLogDeleteKV.Delegate(err, prefix, iter.Key()) -} diff --git a/dm/worker/log_test.go b/dm/worker/log_test.go deleted file mode 100644 index b73b022ed4..0000000000 --- a/dm/worker/log_test.go +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "bytes" - - . "github.com/pingcap/check" - "github.com/pingcap/errors" - "github.com/syndtr/goleveldb/leveldb" - - "github.com/pingcap/dm/dm/pb" - tcontext "github.com/pingcap/dm/pkg/context" - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" -) - -type testLog struct{} - -var _ = Suite(&testLog{}) - -func (t *testLog) TestPointer(c *C) { - p := &Pointer{ - Location: 2, - } - - np := new(Pointer) - - bs, _ := p.MarshalBinary() - c.Assert(np.UnmarshalBinary(bs), IsNil) - c.Assert(np, DeepEquals, p) - c.Assert(np.UnmarshalBinary([]byte("xx")), NotNil) -} - -func (t *testLog) TestHandledPointer(c *C) { - p, err := LoadHandledPointer(nil) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - c.Assert(p.Location, Equals, int64(0)) - - db, _ := testSetUpDB(c) - defer db.Close() - p, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(p.Location, Equals, int64(0)) - - p = Pointer{ - Location: 1, - } - - bs, _ := p.MarshalBinary() - c.Assert(db.Put(HandledPointerKey, bs, nil), IsNil) - p, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(p.Location, Equals, int64(1)) - - c.Assert(db.Put(HandledPointerKey, []byte("xx"), nil), IsNil) - _, err = LoadHandledPointer(db) - c.Assert(err, ErrorMatches, ".*not valid length data as.*") - - // clear the handled pointer - txn, err := db.OpenTransaction() - c.Assert(err, IsNil) - c.Assert(ClearHandledPointer(tcontext.Background(), txn), IsNil) - c.Assert(txn.Commit(), IsNil) - - // try load handled pointer again - p, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(p.Location, Equals, int64(0)) - - // clear with nil txn - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(ClearHandledPointer(tcontext.Background(), nil)), IsTrue) -} - -func (t *testLog) TestTaskLogKey(c *C) { - var id int64 = 1 - idc, err := DecodeTaskLogKey(EncodeTaskLogKey(id)) - c.Assert(err, IsNil) - c.Assert(idc, Equals, id) - - _, err = DecodeTaskLogKey([]byte("xx")) - c.Assert(err, ErrorMatches, ".*not valid length data as.*") - - // test compare - b23 := EncodeTaskLogKey(23) - b534 := EncodeTaskLogKey(534) - c.Assert(bytes.Compare(b23, b534), Less, 0) -} - -func (t *testLog) TestTaskLog(c *C) { - logger := &Logger{ - l: log.L(), - } - - _, err := logger.Initial(nil) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - - db, _ := testSetUpDB(c) - defer db.Close() - logs, err := logger.Initial(db) - c.Assert(logs, HasLen, 0) - c.Assert(err, IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(0)) - c.Assert(logger.endPointer.Location, Equals, int64(1)) - - // try to get log from empty queue - l, err := logger.GetTaskLog(nil, 0) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - - l, err = logger.GetTaskLog(db, 0) - c.Assert(err, IsNil) - c.Assert(l, IsNil) - - // try to append log - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(logger.Append(nil, nil)), IsTrue) - - taskLog1 := &pb.TaskLog{ - Id: 100, - Task: testTask1Meta, - } - - c.Assert(logger.Append(db, taskLog1), IsNil) - c.Assert(taskLog1.Id, Equals, int64(1)) - c.Assert(taskLog1.Ts, Greater, int64(0)) - c.Assert(taskLog1.Task.Name, Equals, "task1") - - taskLog2 := &pb.TaskLog{ - Id: 200, - Task: testTask1Meta, - } - - c.Assert(logger.Append(db, taskLog2), IsNil) - c.Assert(taskLog2.Id, Equals, int64(2)) - c.Assert(taskLog2.Ts, Greater, int64(0)) - c.Assert(taskLog2.Task.Name, Equals, "task1") - - // try to get log - l, err = logger.GetTaskLog(db, 0) - c.Assert(err, IsNil) - c.Assert(l, IsNil) - - l, err = logger.GetTaskLog(db, 1) - c.Assert(err, IsNil) - c.Assert(l, DeepEquals, taskLog1) - - l, err = logger.GetTaskLog(db, 2) - c.Assert(err, IsNil) - c.Assert(l, DeepEquals, taskLog2) - - logs, err = logger.Initial(db) - c.Assert(err, IsNil) - c.Assert(logs, DeepEquals, []*pb.TaskLog{taskLog1, taskLog2}) - c.Assert(logger.handledPointer.Location, Equals, int64(0)) - c.Assert(logger.endPointer.Location, Equals, int64(3)) - - // try to forward - c.Assert(logger.ForwardTo(db, 1), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(1)) - hp, err := LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(hp.Location, Equals, int64(1)) - - c.Assert(logger.ForwardTo(db, 2), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(2)) - hp, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(hp.Location, Equals, int64(2)) - - c.Assert(logger.ForwardTo(db, 0), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(0)) - hp, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(hp.Location, Equals, int64(0)) - - // try to mark and forward - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(logger.MarkAndForwardLog(nil, nil)), IsTrue) - c.Assert(logger.MarkAndForwardLog(db, taskLog1), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(1)) - hp, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(hp.Location, Equals, int64(1)) - c.Assert(logger.endPointer.Location, Equals, int64(3)) - - c.Assert(logger.MarkAndForwardLog(db, taskLog2), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(2)) - hp, err = LoadHandledPointer(db) - c.Assert(err, IsNil) - c.Assert(hp.Location, Equals, int64(2)) - c.Assert(logger.endPointer.Location, Equals, int64(3)) - - // append again - taskLog3 := &pb.TaskLog{ - Id: 300, - Task: testTask1Meta, - } - - c.Assert(logger.Append(db, taskLog3), IsNil) - c.Assert(taskLog3.Id, Equals, int64(3)) - c.Assert(taskLog3.Ts, Greater, int64(0)) - c.Assert(taskLog3.Task.Name, Equals, "task1") - c.Assert(logger.endPointer.Location, Equals, int64(4)) - c.Assert(logger.handledPointer.Location, Equals, int64(2)) - - logs, err = logger.Initial(db) - c.Assert(err, IsNil) - c.Assert(logs, DeepEquals, []*pb.TaskLog{taskLog3}) - c.Assert(logger.handledPointer.Location, Equals, int64(2)) - c.Assert(logger.endPointer.Location, Equals, int64(4)) - - // clear operation log - c.Assert(ClearOperationLog(tcontext.Background(), db), IsNil) - - // try initial again - logs, err = logger.Initial(db) - c.Assert(err, IsNil) - c.Assert(logs, HasLen, 0) -} - -func (t *testLog) TestTaskLogGC(c *C) { - logger := &Logger{ - l: log.L(), - } - - db, _ := testSetUpDB(c) - defer db.Close() - - // append logs - taskLog1 := &pb.TaskLog{ - Id: 1, - Task: testTask1Meta, - Ts: 10, - } - log1Bytes, err := taskLog1.Marshal() - c.Assert(err, IsNil) - c.Assert(db.Put(EncodeTaskLogKey(1), log1Bytes, nil), IsNil) - - taskLog2 := &pb.TaskLog{ - Id: 30, - Task: testTask1Meta, - Ts: 30, - } - log2Bytes, err := taskLog2.Marshal() - c.Assert(err, IsNil) - c.Assert(db.Put(EncodeTaskLogKey(30), log2Bytes, nil), IsNil) - - taskLog3 := &pb.TaskLog{ - Id: 40, - Task: testTask1Meta, - Ts: 40, - } - log3Bytes, err := taskLog3.Marshal() - c.Assert(err, IsNil) - c.Assert(db.Put(EncodeTaskLogKey(40), log3Bytes, nil), IsNil) - - taskLog4 := &pb.TaskLog{ - Id: 60, - Task: testTask1Meta, - Ts: 60, - } - log4Bytes, err := taskLog4.Marshal() - c.Assert(err, IsNil) - c.Assert(db.Put(EncodeTaskLogKey(60), log4Bytes, nil), IsNil) - - // forward - c.Assert(logger.ForwardTo(db, 59), IsNil) - - // gc - GCBatchSize = 2 - logger.doGC(db, 59) - - logs, err := logger.Initial(db) - c.Assert(err, IsNil) - c.Assert(logs, DeepEquals, []*pb.TaskLog{taskLog4}) - c.Assert(logger.handledPointer.Location, Equals, int64(59)) - c.Assert(logger.endPointer.Location, Equals, int64(61)) -} - -func (t *testLog) TestTaskMeta(c *C) { - db, _ := testSetUpDB(c) - defer db.Close() - - // set task meta - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(SetTaskMeta(nil, nil)), IsTrue) - err := SetTaskMeta(db, nil) - c.Assert(err, ErrorMatches, ".*empty task.*") - - err = SetTaskMeta(db, &pb.TaskMeta{}) - c.Assert(err, ErrorMatches, ".*empty task.*") - - c.Assert(SetTaskMeta(db, testTask1Meta), IsNil) - c.Assert(SetTaskMeta(db, testTask2Meta), IsNil) - - // load task meta - _, err = LoadTaskMetas(nil) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - tasks, err := LoadTaskMetas(db) - c.Assert(err, IsNil) - c.Assert(tasks, DeepEquals, map[string]*pb.TaskMeta{ - "task1": testTask1Meta, - "task2": testTask2Meta, - }) - - // get task meta - t1, err := GetTaskMeta(db, "task1") - c.Assert(err, IsNil) - c.Assert(t1, DeepEquals, testTask1Meta) - t2, err := GetTaskMeta(db, "task2") - c.Assert(err, IsNil) - c.Assert(t2, DeepEquals, testTask2Meta) - - // delete task meta - c.Assert(DeleteTaskMeta(db, "task1"), IsNil) - - // load task meta - tasks, err = LoadTaskMetas(db) - c.Assert(err, IsNil) - c.Assert(tasks, DeepEquals, map[string]*pb.TaskMeta{ - "task2": testTask2Meta, - }) - - // get task meta - t1, err = GetTaskMeta(db, "task1") - c.Assert(err, NotNil) - t2, err = GetTaskMeta(db, "task2") - c.Assert(err, IsNil) - c.Assert(t2, DeepEquals, testTask2Meta) - - // delete task meta - c.Assert(DeleteTaskMeta(db, "task2"), IsNil) - - // load task meta - tasks, err = LoadTaskMetas(db) - c.Assert(err, IsNil) - c.Assert(tasks, HasLen, 0) - - // get task meta - t1, err = GetTaskMeta(db, "task1") - c.Assert(err, NotNil) - t2, err = GetTaskMeta(db, "task2") - c.Assert(err, NotNil) - - // add some task meta again - c.Assert(SetTaskMeta(db, testTask1Meta), IsNil) - c.Assert(SetTaskMeta(db, testTask2Meta), IsNil) - c.Assert(SetTaskMeta(db, testTask3Meta), IsNil) - - // clear task meta - GCBatchSize = 2 // < 3 - c.Assert(ClearTaskMeta(tcontext.Background(), db), IsNil) - - // try to get task meta back - _, err = GetTaskMeta(db, "task1") - c.Assert(errors.Cause(err), Equals, leveldb.ErrNotFound) - _, err = GetTaskMeta(db, "task2") - c.Assert(errors.Cause(err), Equals, leveldb.ErrNotFound) - _, err = GetTaskMeta(db, "task3") - c.Assert(errors.Cause(err), Equals, leveldb.ErrNotFound) - - // clear with nil txn - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(ClearTaskMeta(tcontext.Background(), nil)), IsTrue) -} diff --git a/dm/worker/meta.go b/dm/worker/meta.go deleted file mode 100644 index b361699fed..0000000000 --- a/dm/worker/meta.go +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "bytes" - "context" - "io/ioutil" - "os" - "path" - "sync" - - "github.com/pingcap/dm/dm/config" - "github.com/pingcap/dm/dm/pb" - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" - - "github.com/BurntSushi/toml" - "github.com/syndtr/goleveldb/leveldb" - "go.uber.org/zap" -) - -// Meta information contains (deprecated, instead of proto.WorkMeta) -// * sub-task -type Meta struct { - SubTasks map[string]*config.SubTaskConfig `json:"sub-tasks" toml:"sub-tasks"` -} - -// Toml returns TOML format representation of config -func (m *Meta) Toml() (string, error) { - var b bytes.Buffer - enc := toml.NewEncoder(&b) - err := enc.Encode(m) - if err != nil { - return "", terror.ErrWorkerMetaTomlTransform.Delegate(err) - } - return b.String(), nil -} - -// DecodeFile loads and decodes config from file -func (m *Meta) DecodeFile(fpath string) error { - _, err := toml.DecodeFile(fpath, m) - if err != nil { - return terror.ErrWorkerMetaTomlTransform.Delegate(err) - } - - return m.adjust() -} - -// Decode loads config from file data -func (m *Meta) Decode(data string) error { - _, err := toml.Decode(data, m) - if err != nil { - return terror.ErrWorkerMetaTomlTransform.Delegate(err) - } - - return m.adjust() -} - -func (m *Meta) adjust() error { - // adjust the config - for name, subTask := range m.SubTasks { - err := subTask.Adjust() - if err != nil { - return terror.Annotatef(err, "task %s", name) - } - } - return nil -} - -// Metadata stores metadata and log of task -// it also provides logger feature -// * append log -// * forward to specified log location -type Metadata struct { - sync.RWMutex // we need to ensure only a thread can access to `metaDB` at a time - wg sync.WaitGroup - ctx context.Context - cancel context.CancelFunc - - // cache - tasks map[string]*pb.TaskMeta - logs []*pb.TaskLog - - // task operation log - log *Logger - - // record log - l log.Logger - - dir string - db *leveldb.DB -} - -// NewMetadata returns a metadata object -func NewMetadata(dir string, db *leveldb.DB) (*Metadata, error) { - meta := &Metadata{ - dir: dir, - db: db, - log: &Logger{ - l: log.With(zap.String("component", "operator log")), - }, - l: log.With(zap.String("component", "metadata")), - } - - // restore from old metadata - oldPath := path.Join(dir, "meta") - err := meta.tryToRecoverMetaFromOldFashion(oldPath) - if err != nil { - meta.l.Error("fail to recover from old metadata file, meta file may be corrupt", zap.String("old meta file", oldPath), log.ShortError(err)) - return nil, err - } - - err = meta.loadFromDB() - if err != nil { - return nil, err - } - - meta.ctx, meta.cancel = context.WithCancel(context.Background()) - - meta.wg.Add(1) - go func() { - defer meta.wg.Done() - meta.log.GC(meta.ctx, meta.db) - }() - - return meta, nil -} - -// Close closes meta DB -func (meta *Metadata) Close() { - if meta.cancel != nil { - meta.cancel() - } - - meta.wg.Wait() -} - -// LoadTaskMeta returns meta of all tasks -func (meta *Metadata) LoadTaskMeta() map[string]*pb.TaskMeta { - meta.Lock() - defer meta.Unlock() - - tasks := make(map[string]*pb.TaskMeta, len(meta.tasks)) - - for name, task := range meta.tasks { - tasks[name] = CloneTaskMeta(task) - } - - return tasks -} - -// GetTask returns task meta by given name -func (meta *Metadata) GetTask(name string) (task *pb.TaskMeta) { - meta.RLock() - t, ok := meta.tasks[name] - if ok { - task = CloneTaskMeta(t) - } - meta.RUnlock() - - return -} - -// GetTaskLog returns task log by give log ID -func (meta *Metadata) GetTaskLog(opLogID int64) (*pb.TaskLog, error) { - log, err := meta.log.GetTaskLog(meta.db, opLogID) - return log, err -} - -// PeekLog returns first need to be handled task log -func (meta *Metadata) PeekLog() (log *pb.TaskLog) { - meta.RLock() - if len(meta.logs) > 0 { - log = CloneTaskLog(meta.logs[0]) - } - meta.RUnlock() - - return -} - -// AppendOperation appends operation into task log -func (meta *Metadata) AppendOperation(subTask *pb.TaskMeta) (int64, error) { - meta.Lock() - defer meta.Unlock() - - opLog := &pb.TaskLog{ - Task: CloneTaskMeta(subTask), - } - - if err := meta.log.Append(meta.db, opLog); err != nil { - return 0, err - } - - meta.logs = append(meta.logs, opLog) - return opLog.Id, nil -} - -// MarkOperation marks operation result -func (meta *Metadata) MarkOperation(log *pb.TaskLog) error { - meta.Lock() - defer meta.Unlock() - - if len(meta.logs) == 0 { - return terror.ErrWorkerMetaTaskLogNotFound.Generate() - } - - if meta.logs[0].Id != log.Id { - return terror.ErrWorkerMetaHandleTaskOrder.Generate(meta.logs[0], log) - } - - txn, err := meta.db.OpenTransaction() - if err != nil { - return terror.ErrWorkerMetaOpenTxn.Delegate(err) - } - - err = meta.log.MarkAndForwardLog(txn, log) - if err != nil { - txn.Discard() - return err - } - - if log.Success { - if log.Task.Op == pb.TaskOp_Stop { - err = DeleteTaskMeta(txn, log.Task.Name) - } else { - err = SetTaskMeta(txn, log.Task) - } - if err != nil { - txn.Discard() - return err - } - } - - err = txn.Commit() - if err != nil { - return terror.ErrWorkerMetaCommitTxn.Delegate(err) - } - - if log.Success { - if log.Task.Op == pb.TaskOp_Stop { - delete(meta.tasks, log.Task.Name) - } else { - meta.tasks[log.Task.Name] = log.Task - } - } - meta.logs = meta.logs[1:] - return nil -} - -func (meta *Metadata) loadFromDB() (err error) { - meta.logs, err = meta.log.Initial(meta.db) - if err != nil { - return err - } - - meta.tasks, err = LoadTaskMetas(meta.db) - if err != nil { - return err - } - - return nil -} - -// to be compatible with the old fashion meta -func (meta *Metadata) tryToRecoverMetaFromOldFashion(path string) error { - _, err := os.Stat(path) - if err != nil { - if !os.IsNotExist(err) { - return terror.ErrWorkerMetaOldFileStat.Delegate(err) - } - return nil - } - - // old metadata file exists, recover metadata from it - data, err := ioutil.ReadFile(path) - if err != nil { - return terror.ErrWorkerMetaOldReadFile.Delegate(err, path) - } - - oldMeta := &Meta{} - err = oldMeta.Decode(string(data)) - if err != nil { - return terror.Annotatef(err, "decode old metadata file %s", path) - } - - meta.l.Info("find tasks from old metadata file", zap.Int("task number", len(oldMeta.SubTasks))) - - for name, task := range oldMeta.SubTasks { - meta.l.Info("from old metadata file", zap.String("task name", name), zap.Stringer("task config", task)) - var b bytes.Buffer - enc := toml.NewEncoder(&b) - err = enc.Encode(task) - if err != nil { - return terror.ErrWorkerMetaEncodeTask.Delegate(err, task) - } - - taskMeta := &pb.TaskMeta{ - Name: name, - Op: pb.TaskOp_Start, - Stage: pb.Stage_New, - Task: b.Bytes(), - } - - err := SetTaskMeta(meta.db, taskMeta) - if err != nil { - return terror.Annotatef(err, "failed to set task meta %s", taskMeta.Name) - } - } - - return terror.ErrWorkerMetaRemoveOldDir.Delegate(os.Remove(path)) -} diff --git a/dm/worker/meta_test.go b/dm/worker/meta_test.go deleted file mode 100644 index 31db03f001..0000000000 --- a/dm/worker/meta_test.go +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "io/ioutil" - "os" - "path" - - "github.com/pingcap/dm/dm/config" - "github.com/pingcap/dm/dm/pb" - - . "github.com/pingcap/check" - "github.com/pingcap/errors" - "github.com/syndtr/goleveldb/leveldb" -) - -var ( - testTask1 = &config.SubTaskConfig{ - Name: "task1", - SourceID: "replica-1", - } - testTask1Meta *pb.TaskMeta - testTask1Bytes []byte - - testTask2 = &config.SubTaskConfig{ - Name: "task2", - SourceID: "replica-1", - } - testTask2Meta *pb.TaskMeta - testTask2Bytes []byte - - testTask3 = &config.SubTaskConfig{ - Name: "task3", - SourceID: "replica-1", - } - testTask3Meta *pb.TaskMeta - testTask3Bytes []byte -) - -type testMeta struct{} - -var _ = Suite(&testMeta{}) - -func testSetUpDB(c *C) (*leveldb.DB, string) { - c.Assert(testTask1.Adjust(), IsNil) - c.Assert(testTask2.Adjust(), IsNil) - - testTask1Str, err := testTask1.Toml() - c.Assert(err, IsNil) - testTask1Bytes = []byte(testTask1Str) - testTask1Meta = &pb.TaskMeta{ - Op: pb.TaskOp_Start, - Name: testTask1.Name, - Stage: pb.Stage_New, - Task: testTask1Bytes, - } - - testTask2Str, err := testTask2.Toml() - c.Assert(err, IsNil) - testTask2Bytes = []byte(testTask2Str) - testTask2Meta = &pb.TaskMeta{ - Op: pb.TaskOp_Start, - Name: testTask2.Name, - Stage: pb.Stage_New, - Task: testTask2Bytes, - } - - testTask3Str, err := testTask3.Toml() - c.Assert(err, IsNil) - testTask3Bytes = []byte(testTask3Str) - testTask3Meta = &pb.TaskMeta{ - Op: pb.TaskOp_Start, - Name: testTask3.Name, - Stage: pb.Stage_New, - Task: testTask3Bytes, - } - - dir := c.MkDir() - dbDir := path.Join(dir, "kv") - db, err := openDB(dbDir, defaultKVConfig) - if err != nil { - c.Fatalf("fail to open leveldb %v", err) - } - - return db, dir -} - -func (t *testMeta) TestNewMetaDB(c *C) { - db, dir := testSetUpDB(c) - defer db.Close() - - metaDB, err := NewMetadata(dir, db) - c.Assert(err, IsNil) - c.Assert(metaDB.tasks, HasLen, 0) - c.Assert(metaDB.logs, HasLen, 0) - c.Assert(metaDB.log, NotNil) - - // test fail to recover from old fashion meta - err = ioutil.WriteFile(path.Join(dir, "meta"), []byte("xxxx"), 0644) - c.Assert(err, IsNil) - _, err = NewMetadata(dir, db) - c.Assert(err, NotNil) - c.Assert(err, ErrorMatches, ".*decode old metadata.*") - - // normal old fashion meta - oldMeta := &Meta{ - SubTasks: map[string]*config.SubTaskConfig{ - "task1": testTask1, - "task2": testTask2, - }, - } - data, err := oldMeta.Toml() - c.Assert(err, IsNil) - err = ioutil.WriteFile(path.Join(dir, "meta"), []byte(data), 0644) - c.Assert(err, IsNil) - - // recover from old fashion meta - metaDB, err = NewMetadata(dir, db) - c.Assert(err, IsNil) - c.Assert(len(metaDB.tasks), Equals, 2) - c.Assert(metaDB.logs, HasLen, 0) - c.Assert(metaDB.log, NotNil) - - // check old fashion meta file - _, err = os.Open(path.Join(dir, "meta")) - c.Assert(os.IsNotExist(err), IsTrue) - - // check nil db - err = ioutil.WriteFile(path.Join(dir, "meta"), []byte(data), 0644) - c.Assert(err, IsNil) - metaDB, err = NewMetadata(dir, nil) - c.Assert(err, NotNil) - c.Assert(metaDB, IsNil) - - // test no old fashion meta file but data in kv db - metaDB, err = NewMetadata("", db) - c.Assert(err, IsNil) - c.Assert(len(metaDB.tasks), Equals, 2) - c.Assert(metaDB.logs, HasLen, 0) - c.Assert(metaDB.log, NotNil) -} - -func (t *testMeta) TestTask(c *C) { - db, dir := testSetUpDB(c) - defer db.Close() - - meta, err := NewMetadata(dir, db) - c.Assert(err, IsNil) - c.Assert(len(meta.tasks), Equals, 0) - c.Assert(meta.logs, HasLen, 0) - c.Assert(meta.log, NotNil) - c.Assert(meta.LoadTaskMeta(), HasLen, 0) - c.Assert(meta.GetTask("no exists"), IsNil) - - // recover from old fashion meta - oldMeta := &Meta{ - SubTasks: map[string]*config.SubTaskConfig{ - "task1": testTask1, - "task2": testTask2, - }, - } - data, err := oldMeta.Toml() - c.Assert(err, IsNil) - err = ioutil.WriteFile(path.Join(dir, "meta"), []byte(data), 0644) - c.Assert(err, IsNil) - - meta, err = NewMetadata(dir, db) - c.Assert(err, IsNil) - c.Assert(len(meta.tasks), Equals, 2) - c.Assert(meta.logs, HasLen, 0) - c.Assert(meta.log, NotNil) - - tasks := meta.LoadTaskMeta() - c.Assert(tasks, HasLen, 2) - c.Assert(tasks[testTask1.Name], DeepEquals, testTask1Meta) - c.Assert(tasks[testTask2.Name], DeepEquals, testTask2Meta) - - // change previous loaded task set member - tasks[testTask1.Name] = &pb.TaskMeta{ - Op: pb.TaskOp_Stop, - Name: testTask1.Name, - Task: []byte("xxxxx"), - } - // change previous loaded task's field - tasks[testTask2.Name].Task = []byte("yyyyyy") - - // test clone again - tasks2 := meta.LoadTaskMeta() - c.Assert(tasks2[testTask1.Name], DeepEquals, testTask1Meta) - - // test get - task1 := meta.GetTask(testTask1.Name) - c.Assert(task1, DeepEquals, testTask1Meta) - - task2 := meta.GetTask(testTask2.Name) - c.Assert(task2, DeepEquals, testTask2Meta) - - task3 := meta.GetTask("no exists") - c.Assert(task3, IsNil) -} - -func (t *testMeta) TestTaskOperation(c *C) { - db, dir := testSetUpDB(c) - defer db.Close() - - meta, err := NewMetadata(dir, db) - c.Assert(err, IsNil) - c.Assert(len(meta.tasks), Equals, 0) - c.Assert(meta.logs, HasLen, 0) - c.Assert(meta.log, NotNil) - - // get log which doesn't exist - log1, err := meta.GetTaskLog(1) - c.Assert(err, IsNil) - c.Assert(log1, IsNil) - - log1 = meta.PeekLog() - c.Assert(log1, IsNil) - - err = meta.MarkOperation(&pb.TaskLog{ - Task: testTask1Meta, - }) - c.Assert(errors.IsNotFound(err), IsTrue) - - /****** test append operation *******/ - - /*** append two create operation ***/ - id, err := meta.AppendOperation(testTask1Meta) - c.Assert(err, IsNil) - c.Assert(id, Equals, int64(1)) - - id, err = meta.AppendOperation(testTask2Meta) - c.Assert(err, IsNil) - c.Assert(id, Equals, int64(2)) - - /*** append two stop operation ***/ - testTask1MetaC := CloneTaskMeta(testTask1Meta) - testTask1MetaC.Op = pb.TaskOp_Stop - id, err = meta.AppendOperation(testTask1MetaC) - c.Assert(err, IsNil) - c.Assert(id, Equals, int64(3)) - - testTask2MetaC := CloneTaskMeta(testTask2Meta) - testTask2MetaC.Op = pb.TaskOp_Stop - id, err = meta.AppendOperation(testTask2MetaC) - c.Assert(err, IsNil) - c.Assert(id, Equals, int64(4)) - - // test status - c.Assert(meta.logs, HasLen, 4) - c.Assert(meta.tasks, HasLen, 0) - c.Assert(meta.LoadTaskMeta(), HasLen, 0) - - log1 = meta.PeekLog() - c.Assert(log1.Task, DeepEquals, testTask1Meta) - c.Assert(log1.Id, DeepEquals, int64(1)) - - log1C, err := meta.GetTaskLog(1) - c.Assert(err, IsNil) - c.Assert(log1C, DeepEquals, log1) - - log2, err := meta.GetTaskLog(2) - c.Assert(err, IsNil) - c.Assert(log2.Task, DeepEquals, testTask2Meta) - c.Assert(log2.Id, DeepEquals, int64(2)) - - log1s, err := meta.GetTaskLog(3) - c.Assert(err, IsNil) - c.Assert(log1s.Task, DeepEquals, testTask1MetaC) - c.Assert(log1s.Id, DeepEquals, int64(3)) - - log2s, err := meta.GetTaskLog(4) - c.Assert(err, IsNil) - c.Assert(log2s.Task, DeepEquals, testTask2MetaC) - c.Assert(log2s.Id, DeepEquals, int64(4)) - - /****** test mark operation *******/ - - // mark disorder log - err = meta.MarkOperation(&pb.TaskLog{ - Id: 2, - Task: testTask2Meta, - }) - c.Assert(err, ErrorMatches, ".*please handle task operation order by log ID.*") - - // make successful task1 create log - err = meta.MarkOperation(&pb.TaskLog{ - Id: 1, - Task: testTask1Meta, - Success: true, - }) - c.Assert(err, IsNil) - - // check log and meta - logx := meta.PeekLog() - c.Assert(logx, DeepEquals, log2) - c.Assert(meta.logs, HasLen, 3) - - c.Assert(meta.tasks, HasLen, 1) - c.Assert(meta.LoadTaskMeta(), HasLen, 1) - task1 := meta.GetTask(testTask1Meta.Name) - c.Assert(task1, DeepEquals, testTask1Meta) - - // make successful task2 create log - err = meta.MarkOperation(&pb.TaskLog{ - Id: 2, - Task: testTask2Meta, - Success: true, - }) - c.Assert(err, IsNil) - - // check log and meta - logx = meta.PeekLog() - c.Assert(logx, DeepEquals, log1s) - c.Assert(meta.logs, HasLen, 2) - c.Assert(meta.tasks, HasLen, 2) - c.Assert(meta.LoadTaskMeta(), HasLen, 2) - task2 := meta.GetTask(testTask2Meta.Name) - c.Assert(task2, DeepEquals, testTask2Meta) - - // make failed task1 stop log - err = meta.MarkOperation(&pb.TaskLog{ - Id: 3, - Task: testTask1MetaC, - Success: false, - }) - c.Assert(err, IsNil) - - // check log and meta - logx = meta.PeekLog() - c.Assert(logx, DeepEquals, log2s) - c.Assert(meta.logs, HasLen, 1) - c.Assert(meta.tasks, HasLen, 2) - c.Assert(meta.LoadTaskMeta(), HasLen, 2) - task1 = meta.GetTask(testTask1Meta.Name) - c.Assert(task1, DeepEquals, testTask1Meta) - - // make successful task2 stop log - err = meta.MarkOperation(&pb.TaskLog{ - Id: 4, - Task: testTask2MetaC, - Success: true, - }) - c.Assert(err, IsNil) - - // check log and meta - logx = meta.PeekLog() - c.Assert(logx, IsNil) - c.Assert(meta.logs, HasLen, 0) - c.Assert(meta.tasks, HasLen, 1) - c.Assert(meta.LoadTaskMeta(), HasLen, 1) - task1 = meta.GetTask(testTask1Meta.Name) - c.Assert(task1, DeepEquals, testTask1Meta) - task2 = meta.GetTask(testTask2Meta.Name) - c.Assert(task2, IsNil) -} - -func (t *testMeta) TestMetaClose(c *C) { - db, dir := testSetUpDB(c) - defer db.Close() - - meta, err := NewMetadata(dir, db) - c.Assert(err, IsNil) - meta.Close() - meta.Close() - - // recover from old fashion meta - oldMeta := &Meta{ - SubTasks: map[string]*config.SubTaskConfig{ - "task1": testTask1, - "task2": testTask2, - }, - } - data, err := oldMeta.Toml() - c.Assert(err, IsNil) - err = ioutil.WriteFile(path.Join(dir, "meta"), []byte(data), 0644) - c.Assert(err, IsNil) - - meta, err = NewMetadata(dir, db) - c.Assert(err, IsNil) - meta.Close() - meta.Close() -} diff --git a/dm/worker/server.go b/dm/worker/server.go index 91b79df620..64ea2705e3 100644 --- a/dm/worker/server.go +++ b/dm/worker/server.go @@ -152,7 +152,7 @@ func (s *Server) Close() { } // StartSubTask implements WorkerServer.StartSubTask -func (s *Server) StartSubTask(ctx context.Context, req *pb.StartSubTaskRequest) (*pb.OperateSubTaskResponse, error) { +func (s *Server) StartSubTask(ctx context.Context, req *pb.StartSubTaskRequest) (*pb.CommonWorkerResponse, error) { log.L().Info("", zap.String("request", "StartSubTask"), zap.Stringer("payload", req)) cfg := config.NewSubTaskConfig() @@ -160,94 +160,73 @@ func (s *Server) StartSubTask(ctx context.Context, req *pb.StartSubTaskRequest) if err != nil { err = terror.Annotatef(err, "decode subtask config from request %+v", req.Task) log.L().Error("fail to decode task", zap.String("request", "StartSubTask"), zap.Stringer("payload", req), zap.Error(err)) - return nil, err + return &pb.CommonWorkerResponse{ + Result: false, + Msg: err.Error(), + }, nil } - opLogID, err := s.worker.StartSubTask(cfg) + err = s.worker.StartSubTask(cfg) if err != nil { err = terror.Annotatef(err, "start sub task %s", cfg.Name) log.L().Error("fail to start subtask", zap.String("request", "StartSubTask"), zap.Stringer("payload", req), zap.Error(err)) - return nil, err + return &pb.CommonWorkerResponse{ + Result: false, + Msg: err.Error(), + }, nil } - return &pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{ - Result: true, - Msg: "", - }, - Op: pb.TaskOp_Start, - LogID: opLogID, + return &pb.CommonWorkerResponse{ + Result: true, }, nil } // OperateSubTask implements WorkerServer.OperateSubTask func (s *Server) OperateSubTask(ctx context.Context, req *pb.OperateSubTaskRequest) (*pb.OperateSubTaskResponse, error) { log.L().Info("", zap.String("request", "OperateSubTask"), zap.Stringer("payload", req)) - opLogID, err := s.worker.OperateSubTask(req.Name, req.Op) + err := s.worker.OperateSubTask(req.Name, req.Op) if err != nil { err = terror.Annotatef(err, "operate(%s) sub task %s", req.Op.String(), req.Name) log.L().Error("fail to operate task", zap.String("request", "OperateSubTask"), zap.Stringer("payload", req), zap.Error(err)) - return nil, err + return &pb.OperateSubTaskResponse{ + Op: req.Op, + Result: false, + Msg: err.Error(), + }, nil } return &pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{ - Result: true, - Msg: "", - }, - Op: req.Op, - LogID: opLogID, + Op: req.Op, + Result: true, }, nil } // UpdateSubTask implements WorkerServer.UpdateSubTask -func (s *Server) UpdateSubTask(ctx context.Context, req *pb.UpdateSubTaskRequest) (*pb.OperateSubTaskResponse, error) { +func (s *Server) UpdateSubTask(ctx context.Context, req *pb.UpdateSubTaskRequest) (*pb.CommonWorkerResponse, error) { log.L().Info("", zap.String("request", "UpdateSubTask"), zap.Stringer("payload", req)) cfg := config.NewSubTaskConfig() err := cfg.Decode(req.Task) if err != nil { err = terror.Annotatef(err, "decode config from request %+v", req.Task) log.L().Error("fail to decode subtask", zap.String("request", "UpdateSubTask"), zap.Stringer("payload", req), zap.Error(err)) - return nil, err + return &pb.CommonWorkerResponse{ + Result: false, + Msg: err.Error(), + }, nil } - opLogID, err := s.worker.UpdateSubTask(cfg) + err = s.worker.UpdateSubTask(cfg) if err != nil { err = terror.Annotatef(err, "update sub task %s", cfg.Name) log.L().Error("fail to update task", zap.String("request", "UpdateSubTask"), zap.Stringer("payload", req), zap.Error(err)) - return nil, err - } - - return &pb.OperateSubTaskResponse{ - Meta: &pb.CommonWorkerResponse{ - Result: true, - Msg: "", - }, - Op: pb.TaskOp_Update, - LogID: opLogID, - }, nil -} - -// QueryTaskOperation implements WorkerServer.QueryTaskOperation -func (s *Server) QueryTaskOperation(ctx context.Context, req *pb.QueryTaskOperationRequest) (*pb.QueryTaskOperationResponse, error) { - log.L().Info("", zap.String("request", "QueryTaskOperation"), zap.Stringer("payload", req)) - - taskName := req.Name - opLogID := req.LogID - - opLog, err := s.worker.meta.GetTaskLog(opLogID) - if err != nil { - err = terror.Annotatef(err, "fail to get operation %d of task %s", opLogID, taskName) - log.L().Error(err.Error()) - return nil, err + return &pb.CommonWorkerResponse{ + Result: false, + Msg: err.Error(), + }, nil } - return &pb.QueryTaskOperationResponse{ - Log: opLog, - Meta: &pb.CommonWorkerResponse{ - Result: true, - Msg: "", - }, + return &pb.CommonWorkerResponse{ + Result: true, }, nil } diff --git a/dm/worker/server_test.go b/dm/worker/server_test.go index 16313aa601..f61a14bffb 100644 --- a/dm/worker/server_test.go +++ b/dm/worker/server_test.go @@ -76,9 +76,6 @@ func (t *testServer) TestServer(c *C) { // create client cli := t.createClient(c, "127.0.0.1:8262") - c.Assert(s.worker.meta.LoadTaskMeta(), HasLen, 0) - c.Assert(s.worker.meta.PeekLog(), IsNil) - // start task subtaskCfgBytes, err := ioutil.ReadFile("./subtask.toml") c.Assert(err, IsNil) @@ -87,32 +84,19 @@ func (t *testServer) TestServer(c *C) { Task: string(subtaskCfgBytes), }) c.Assert(err, IsNil) - c.Assert(s.worker.meta.PeekLog(), NotNil) - c.Assert(s.worker.meta.PeekLog().Id, Equals, resp1.LogID) - c.Assert(resp1.LogID, Equals, int64(1)) + c.Assert(resp1.Result, IsTrue) - opsp, err := cli.QueryTaskOperation(context.Background(), &pb.QueryTaskOperationRequest{ - Name: "sub-task-name", - LogID: resp1.LogID, - }) + status, err := cli.QueryStatus(context.Background(), &pb.QueryStatusRequest{Name: "sub-task-name"}) c.Assert(err, IsNil) - c.Assert(opsp.Log.Success, IsFalse) + c.Assert(status.Result, IsTrue) + c.Assert(status.SubTaskStatus[0].Stage, Equals, pb.Stage_Paused) // because of `Access denied` // update task resp2, err := cli.UpdateSubTask(context.Background(), &pb.UpdateSubTaskRequest{ Task: string(subtaskCfgBytes), }) c.Assert(err, IsNil) - c.Assert(resp2.LogID, Equals, int64(2)) - c.Assert(s.worker.meta.PeekLog(), NotNil) - c.Assert(s.worker.meta.PeekLog().Id, Equals, resp1.LogID) - - opsp, err = cli.QueryTaskOperation(context.Background(), &pb.QueryTaskOperationRequest{ - Name: "sub-task-name", - LogID: resp2.LogID, - }) - c.Assert(err, IsNil) - c.Assert(opsp.Log.Success, IsFalse) + c.Assert(resp2.Result, IsTrue) // operate task resp3, err := cli.OperateSubTask(context.Background(), &pb.OperateSubTaskRequest{ @@ -120,16 +104,8 @@ func (t *testServer) TestServer(c *C) { Op: pb.TaskOp_Pause, }) c.Assert(err, IsNil) - c.Assert(resp3.LogID, Equals, int64(3)) - c.Assert(s.worker.meta.PeekLog(), NotNil) - c.Assert(s.worker.meta.PeekLog().Id, Equals, resp1.LogID) - - opsp, err = cli.QueryTaskOperation(context.Background(), &pb.QueryTaskOperationRequest{ - Name: "test", - LogID: resp3.LogID, - }) - c.Assert(err, IsNil) - c.Assert(opsp.Log.Success, IsFalse) + c.Assert(resp3.Result, IsFalse) + c.Assert(resp3.Msg, Matches, ".*current stage is not running.*") dupServer := NewServer(cfg) err = dupServer.Start() @@ -145,7 +121,6 @@ func (t *testServer) TestServer(c *C) { // test worker, just make sure testing sort t.testWorker(c) - t.testWorkerHandleTask(c) } func (t *testServer) testHTTPInterface(c *C, uri string) { diff --git a/dm/worker/task_checker.go b/dm/worker/task_checker.go index a243f590d3..4fe56ca528 100644 --- a/dm/worker/task_checker.go +++ b/dm/worker/task_checker.go @@ -355,14 +355,11 @@ func (tsc *realTaskStatusChecker) check() { tsc.bc.latestPausedTime[taskName] = time.Now() case ResumeDispatch: tsc.bc.latestPausedTime[taskName] = time.Now() - opLogID, err := tsc.w.operateSubTask(&pb.TaskMeta{ - Name: taskName, - Op: pb.TaskOp_AutoResume, - }) + err := tsc.w.OperateSubTask(taskName, pb.TaskOp_AutoResume) if err != nil { tsc.l.Error("dispatch auto resume task failed", zap.String("task", taskName), zap.Error(err)) } else { - tsc.l.Info("dispatch auto resume task", zap.String("task", taskName), zap.Int64("opLogID", opLogID)) + tsc.l.Info("dispatch auto resume task", zap.String("task", taskName)) tsc.bc.latestResumeTime[taskName] = time.Now() bf.BoundaryForward() } diff --git a/dm/worker/task_checker_test.go b/dm/worker/task_checker_test.go index 14e27643c1..23301dfd50 100644 --- a/dm/worker/task_checker_test.go +++ b/dm/worker/task_checker_test.go @@ -20,10 +20,12 @@ import ( "github.com/pingcap/check" "github.com/pingcap/errors" tmysql "github.com/pingcap/parser/mysql" + "go.uber.org/zap" "github.com/pingcap/dm/dm/config" "github.com/pingcap/dm/dm/pb" "github.com/pingcap/dm/dm/unit" + "github.com/pingcap/dm/pkg/log" "github.com/pingcap/dm/pkg/terror" ) @@ -108,6 +110,7 @@ func (s *testTaskCheckerSuite) TestCheck(c *check.C) { st := &SubTask{ cfg: &config.SubTaskConfig{Name: taskName}, stage: pb.Stage_Running, + l: log.With(zap.String("subtask", taskName)), } rtsc.w.subTaskHolder.recordSubTask(st) rtsc.check() @@ -127,19 +130,12 @@ func (s *testTaskCheckerSuite) TestCheck(c *check.C) { time.Sleep(4 * time.Millisecond) rtsc.check() c.Assert(bf.Current(), check.Equals, 8*time.Millisecond) - c.Assert(w.meta.logs, check.HasLen, 3) - for _, tl := range w.meta.logs { - c.Assert(tl.Task, check.NotNil) - c.Assert(tl.Task.Op, check.Equals, pb.TaskOp_AutoResume) - } // test backoff rollback at least once, as well as resume ignore strategy st.result = &pb.ProcessResult{IsCanceled: true} - w.meta.logs = []*pb.TaskLog{} time.Sleep(200 * time.Millisecond) rtsc.check() c.Assert(bf.Current() <= 4*time.Millisecond, check.IsTrue) - c.Assert(w.meta.logs, check.HasLen, 0) current := bf.Current() // test no sense strategy @@ -156,7 +152,6 @@ func (s *testTaskCheckerSuite) TestCheck(c *check.C) { rtsc.check() c.Assert(rtsc.bc.latestBlockTime[taskName], check.Equals, latestBlockTime) c.Assert(bf.Current(), check.Equals, current) - c.Assert(w.meta.logs, check.HasLen, 0) // test resume skip strategy tsc = NewRealTaskStatusChecker(CheckerConfig{ @@ -174,6 +169,7 @@ func (s *testTaskCheckerSuite) TestCheck(c *check.C) { st = &SubTask{ cfg: &config.SubTaskConfig{Name: taskName}, stage: pb.Stage_Running, + l: log.With(zap.String("subtask", taskName)), } rtsc.w.subTaskHolder.recordSubTask(st) rtsc.check() @@ -189,14 +185,12 @@ func (s *testTaskCheckerSuite) TestCheck(c *check.C) { latestResumeTime = rtsc.bc.latestResumeTime[taskName] latestPausedTime = rtsc.bc.latestPausedTime[taskName] c.Assert(bf.Current(), check.Equals, 10*time.Second) - c.Assert(w.meta.logs, check.HasLen, 0) for i := 0; i < 10; i++ { rtsc.check() c.Assert(latestResumeTime, check.Equals, rtsc.bc.latestResumeTime[taskName]) c.Assert(latestPausedTime.Before(rtsc.bc.latestPausedTime[taskName]), check.IsTrue) latestPausedTime = rtsc.bc.latestPausedTime[taskName] } - c.Assert(w.meta.logs, check.HasLen, 0) } func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { @@ -233,11 +227,13 @@ func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { st1 := &SubTask{ cfg: &config.SubTaskConfig{Name: task1}, stage: pb.Stage_Running, + l: log.With(zap.String("subtask", task1)), } rtsc.w.subTaskHolder.recordSubTask(st1) st2 := &SubTask{ cfg: &config.SubTaskConfig{Name: task2}, stage: pb.Stage_Running, + l: log.With(zap.String("subtask", task2)), } rtsc.w.subTaskHolder.recordSubTask(st2) rtsc.check() @@ -254,6 +250,7 @@ func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { IsCanceled: false, Errors: []*pb.ProcessError{unsupporteModifyColumnError}, }, + l: log.With(zap.String("subtask", task1)), } rtsc.w.subTaskHolder.recordSubTask(st1) st2 = &SubTask{ @@ -263,6 +260,7 @@ func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { IsCanceled: false, Errors: []*pb.ProcessError{unknownProcessError}, }, + l: log.With(zap.String("subtask", task2)), } rtsc.w.subTaskHolder.recordSubTask(st2) @@ -275,7 +273,6 @@ func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { c.Assert(task2LatestResumeTime.Before(rtsc.bc.latestResumeTime[task2]), check.IsTrue) c.Assert(len(rtsc.bc.latestBlockTime), check.Equals, 1) task2LatestResumeTime = rtsc.bc.latestResumeTime[task2] - c.Assert(w.meta.logs, check.HasLen, i+1) } // test task information cleanup in task status checker @@ -283,7 +280,6 @@ func (s *testTaskCheckerSuite) TestCheckTaskIndependent(c *check.C) { time.Sleep(backoffMin) rtsc.check() c.Assert(task2LatestResumeTime.Before(rtsc.bc.latestResumeTime[task2]), check.IsTrue) - c.Assert(w.meta.logs, check.HasLen, 11) c.Assert(len(rtsc.bc.backoffs), check.Equals, 1) c.Assert(len(rtsc.bc.latestPausedTime), check.Equals, 1) c.Assert(len(rtsc.bc.latestResumeTime), check.Equals, 1) diff --git a/dm/worker/upgrade.go b/dm/worker/upgrade.go deleted file mode 100644 index 8672e705ca..0000000000 --- a/dm/worker/upgrade.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "encoding/json" - "os" - - "github.com/syndtr/goleveldb/leveldb" - "go.uber.org/zap" - - tcontext "github.com/pingcap/dm/pkg/context" - "github.com/pingcap/dm/pkg/helper" - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" - "github.com/pingcap/dm/pkg/utils" -) - -const ( - // The current internal version number of DM-worker used when upgrading from an older version, and it's different from the release version. - // NOTE: +1 when an incompatible problem is introduced. - currentWorkerInternalNo uint64 = 1 -) - -var ( - // The key used when saving the version of DM-worker - dmWorkerVersionKey = []byte("!DM-worker!version") - // The current version of DM-worker. - currentWorkerVersion = newVersion(currentWorkerInternalNo, utils.ReleaseVersion) - // The default previous version of DM-worker if no valid version exists in DB before the upgrade. - defaultPreviousWorkerVersion = newVersion(0, "None") - // all versions exists in the history. - workerVersion1 = newVersion(1, "v1.0.0-alpha") -) - -// The version of DM-worker used when upgrading from an older version. -type version struct { - InternalNo uint64 `json:"internal-no"` // internal version number - ReleaseVersion string `json:"release-version"` // release version, like `v1.0.0` -} - -// newVersion creates a new instance of version. -func newVersion(internalNo uint64, releaseVersion string) version { - return version{ - InternalNo: internalNo, - ReleaseVersion: releaseVersion, - } -} - -// compare compares the version with another version. -// NOTE: also compare `ReleaseVersion` when needed. -func (v *version) compare(other version) int { - if v.InternalNo < other.InternalNo { - return -1 - } else if v.InternalNo == other.InternalNo { - return 0 - } - return 1 -} - -// String implements Stringer.String. -func (v version) String() string { - data, err := v.MarshalBinary() - if err != nil { - log.L().Error("fail to marshal version to binary", - zap.Uint64("internal NO", v.InternalNo), - zap.String("release version", v.ReleaseVersion), log.ShortError(err)) - return "" - } - return string(data) -} - -// MarshalBinary implements encoding.BinaryMarshal. -func (v *version) MarshalBinary() ([]byte, error) { - return json.Marshal(v) -} - -// UnmarshalBinary implements encoding.BinaryMarshal. -func (v *version) UnmarshalBinary(data []byte) error { - return json.Unmarshal(data, v) -} - -// loadVersion loads the version of DM-worker from the levelDB. -func loadVersion(tctx *tcontext.Context, h dbOperator) (ver version, err error) { - if helper.IsNil(h) { - return ver, terror.ErrWorkerLogInvalidHandler.Generate() - } - - data, err := h.Get(dmWorkerVersionKey, nil) - if err != nil { - if err == leveldb.ErrNotFound { - tctx.L().Warn("no version found in levelDB, use default version", zap.Stringer("default version", defaultPreviousWorkerVersion)) - return defaultPreviousWorkerVersion, nil - } - return ver, terror.ErrWorkerGetVersionFromKV.Delegate(err, dmWorkerVersionKey) - } - err = ver.UnmarshalBinary(data) - return ver, terror.ErrWorkerUnmarshalVerBinary.Delegate(err, data) -} - -// saveVersion saves the version of DM-worker into the levelDB. -func saveVersion(tctx *tcontext.Context, h dbOperator, ver version) error { - if helper.IsNil(h) { - return terror.ErrWorkerLogInvalidHandler.Generate() - } - - data, err := ver.MarshalBinary() - if err != nil { - return terror.ErrWorkerMarshalVerBinary.Delegate(err, ver) - } - - err = h.Put(dmWorkerVersionKey, data, nil) - return terror.ErrWorkerSaveVersionToKV.Delegate(err, ver, dmWorkerVersionKey) -} - -// tryUpgrade tries to upgrade from an older version. -func tryUpgrade(dbDir string) error { - tctx := tcontext.Background().WithLogger(log.L().WithFields(zap.String("component", "bootstrap upgrade"))) - - // 1. check the DB directory - notExist := false - fs, err := os.Stat(dbDir) - if err != nil { - if os.IsNotExist(err) { - notExist = true - } else { - return terror.ErrWorkerUpgradeCheckKVDir.AnnotateDelegate(err, "get stat for %s", dbDir) - } - } else if !fs.IsDir() { // should be a directory - return terror.ErrWorkerUpgradeCheckKVDir.Generatef("directory %s for DB not valid", dbDir) - } - - // 2. open the kv DB - db, err := openDB(dbDir, defaultKVConfig) - if err != nil { - return terror.Annotatef(err, "open DB for %s", dbDir) - } - defer func() { - err = db.Close() - if err != nil { - tctx.L().Error("fail to close DB", log.ShortError(err)) - } - }() - - if notExist { - tctx.L().Info("no previous operation log exists, no need to upgrade") - // still need to save the current version version - currVer := currentWorkerVersion - err = saveVersion(tctx, db, currVer) - return terror.Annotatef(err, "save current version %s into DB %s", currVer, dbDir) - } - - // 3. load previous version - prevVer, err := loadVersion(tctx, db) - if err != nil { - return terror.Annotatef(err, "load previous version from DB %s", dbDir) - } - tctx.L().Info("", zap.Stringer("previous version", prevVer)) - - // 4. check needing to upgrade - currVer := currentWorkerVersion - if prevVer.compare(currVer) == 0 { - tctx.L().Info("previous and current versions are same, no need to upgrade", zap.Stringer("version", prevVer)) - return nil - } else if prevVer.compare(currVer) > 0 { - return terror.ErrWorkerVerAutoDowngrade.Generate(prevVer, currVer) - } - - // 5. upgrade from previous version to +1, +2, ... - if prevVer.compare(workerVersion1) < 0 { - err = upgradeToVer1(tctx, db) - if err != nil { - return err - } - } - - // 6. save current version after upgrade done - err = saveVersion(tctx, db, currVer) - return terror.Annotatef(err, "save current version %s into DB %s", currVer, dbDir) -} - -// upgradeToVer1 upgrades from version 0 to version 1. -// before this version, we use `LittleEndian` to encode/decode operation log ID, but it's not correct when scanning operation log by log ID. -// so, if upgrading from previous version to this one, we need to: -// 1. remove all operation log in the levelDB -// 2. reset handled pointer -// 3. remove all task meta in the levelDB -// and let user to restart all necessary tasks. -func upgradeToVer1(tctx *tcontext.Context, db *leveldb.DB) error { - tctx.L().Info("upgrading to version", zap.Stringer("version", workerVersion1)) - err := ClearOperationLog(tctx, db) - if err != nil { - return terror.Annotatef(err, "upgrade to version %s", workerVersion1) - } - err = ClearHandledPointer(tctx, db) - if err != nil { - return terror.Annotatef(err, "upgrade to version %s", workerVersion1) - } - err = ClearTaskMeta(tctx, db) - if err != nil { - return terror.Annotatef(err, "upgrade to version %s", workerVersion1) - } - - tctx.L().Warn("upgraded to version, please restart all necessary tasks manually", zap.Stringer("version", workerVersion1)) - return nil -} diff --git a/dm/worker/upgrade_test.go b/dm/worker/upgrade_test.go deleted file mode 100644 index 43740cca8e..0000000000 --- a/dm/worker/upgrade_test.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2019 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package worker - -import ( - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - - . "github.com/pingcap/check" - "github.com/pingcap/errors" - "github.com/syndtr/goleveldb/leveldb" - "go.uber.org/zap" - - "github.com/pingcap/dm/dm/pb" - tcontext "github.com/pingcap/dm/pkg/context" - "github.com/pingcap/dm/pkg/log" - "github.com/pingcap/dm/pkg/terror" - "github.com/pingcap/dm/pkg/utils" -) - -type testUpgrade struct{} - -var _ = Suite(&testUpgrade{}) - -func (t *testUpgrade) TestIntervalVersion(c *C) { - currVer := currentWorkerVersion - c.Assert(currVer.InternalNo, Equals, currentWorkerInternalNo) - c.Assert(currVer.ReleaseVersion, Equals, utils.ReleaseVersion) - c.Assert(currVer.String(), Matches, fmt.Sprintf(".*%d.*", currentWorkerInternalNo)) - c.Assert(currVer.String(), Matches, fmt.Sprintf(".*%s.*", utils.ReleaseVersion)) - - // marshal and unmarshal - data, err := currVer.MarshalBinary() - c.Assert(err, IsNil) - var currVer2 version - c.Assert(currVer2.UnmarshalBinary(data), IsNil) - c.Assert(currVer2, DeepEquals, currVer) - - // compare by internal version number. - c.Assert(currVer.compare(newVersion(currentWorkerInternalNo-1, utils.ReleaseVersion)), Equals, 1) - c.Assert(currVer.compare(newVersion(currentWorkerInternalNo, utils.ReleaseVersion)), Equals, 0) - c.Assert(currVer.compare(newVersion(currentWorkerInternalNo+1, utils.ReleaseVersion)), Equals, -1) -} - -func (t *testUpgrade) openTestDB(c *C, dbDir string) *leveldb.DB { - if dbDir == "" { - dbDir = path.Join(c.MkDir(), "kv") - } - db, err := openDB(dbDir, defaultKVConfig) - if err != nil { - c.Fatalf("fail to open leveldb %v", err) - } - return db -} - -func (t *testUpgrade) TestLoadSaveInternalVersion(c *C) { - var ( - db *leveldb.DB - ver1234 = newVersion(1234, "v1.0.0") - ) - - // load with nil DB - _, err := loadVersion(tcontext.Background(), nil) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - _, err = loadVersion(tcontext.Background(), db) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - - // save with nil DB - err = saveVersion(tcontext.Background(), nil, ver1234) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - err = saveVersion(tcontext.Background(), db, ver1234) - c.Assert(terror.ErrWorkerLogInvalidHandler.Equal(err), IsTrue) - - // open DB - db = t.openTestDB(c, "") - defer db.Close() - - // load but no data exist - verLoad, err := loadVersion(tcontext.Background(), db) - c.Assert(err, IsNil) - c.Assert(verLoad, DeepEquals, defaultPreviousWorkerVersion) - - // save into DB - err = saveVersion(tcontext.Background(), db, ver1234) - c.Assert(err, IsNil) - - // load back - verLoad, err = loadVersion(tcontext.Background(), db) - c.Assert(err, IsNil) - c.Assert(verLoad, DeepEquals, ver1234) -} - -func (t *testUpgrade) TestTryUpgrade(c *C) { - // DB directory not exists, no need to upgrade - dbDir := "./path-not-exists" - err := tryUpgrade(dbDir) - c.Assert(err, IsNil) - c.Assert(os.RemoveAll(dbDir), IsNil) - - // DB directory is a file path, invalid - tDir := c.MkDir() - dbDir = filepath.Join(tDir, "file-not-dir") - err = ioutil.WriteFile(dbDir, nil, 0600) - c.Assert(err, IsNil) - err = tryUpgrade(dbDir) - c.Assert(err, ErrorMatches, ".*directory.*for DB.*") - - // valid DB directory - dbDir = tDir - - // previousVer == currentVer, no need to upgrade - prevVer := currentWorkerVersion - t.verifyUpgrade(c, dbDir, - func() { - t.saveVerToDB(c, dbDir, prevVer) - }, func() { - currVer := t.loadVerFromDB(c, dbDir) - c.Assert(currVer, DeepEquals, prevVer) - }) - - // previousVer > currentVer, no need to upgrade, and can not automatic downgrade now - prevVer = newVersion(currentWorkerInternalNo+1, currentWorkerVersion.ReleaseVersion) - t.saveVerToDB(c, dbDir, prevVer) - c.Assert(tryUpgrade(dbDir), ErrorMatches, ".*automatic downgrade is not supported now, please handle it manually") - c.Assert(t.loadVerFromDB(c, dbDir), DeepEquals, prevVer) -} - -func (t *testUpgrade) TestUpgradeToVer1(c *C) { - dbDir := c.MkDir() - t.verifyUpgrade(c, dbDir, - func() { - t.prepareBeforeUpgradeVer1(c, dbDir) - }, func() { - t.verifyAfterUpgradeVer1(c, dbDir) - }) -} - -func (t *testUpgrade) prepareBeforeUpgradeVer1(c *C, dbDir string) { - db := t.openTestDB(c, dbDir) - defer db.Close() - - // 1. add some operation log into levelDB and set handled pointer - logger := &Logger{ - l: log.With(zap.String("component", "operator log")), - } - c.Assert(logger.MarkAndForwardLog(db, &pb.TaskLog{ - Id: 100, - Task: testTask1Meta, - }), IsNil) - c.Assert(logger.MarkAndForwardLog(db, &pb.TaskLog{ - Id: 200, - Task: testTask2Meta, - }), IsNil) - c.Assert(logger.MarkAndForwardLog(db, &pb.TaskLog{ - Id: 300, - Task: testTask3Meta, - }), IsNil) - c.Assert(logger.handledPointer.Location, Equals, int64(300)) - c.Assert(logger.endPointer.Location, Equals, int64(0)) - - // 2. add some task meta into levelDB - c.Assert(SetTaskMeta(db, testTask1Meta), IsNil) - c.Assert(SetTaskMeta(db, testTask2Meta), IsNil) - t1, err := GetTaskMeta(db, "task1") - c.Assert(err, IsNil) - c.Assert(t1, DeepEquals, testTask1Meta) - t2, err := GetTaskMeta(db, "task2") - c.Assert(err, IsNil) - c.Assert(t2, DeepEquals, testTask2Meta) -} - -func (t *testUpgrade) verifyAfterUpgradeVer1(c *C, dbDir string) { - db := t.openTestDB(c, dbDir) - defer db.Close() - - // 1. verify operation log and handled pointer - logger := &Logger{ - l: log.With(zap.String("component", "operator log")), - } - logs, err := logger.Initial(db) - c.Assert(err, IsNil) - c.Assert(logs, HasLen, 0) - c.Assert(logger.handledPointer.Location, Equals, int64(0)) - c.Assert(logger.endPointer.Location, Equals, int64(1)) - - // 2. verify task meta - _, err = GetTaskMeta(db, "task1") - c.Assert(errors.Cause(err), Equals, leveldb.ErrNotFound) - _, err = GetTaskMeta(db, "task2") - c.Assert(errors.Cause(err), Equals, leveldb.ErrNotFound) -} - -func (t *testUpgrade) saveVerToDB(c *C, dbDir string, ver version) { - db := t.openTestDB(c, dbDir) - defer db.Close() - err := saveVersion(tcontext.Background(), db, ver) - c.Assert(err, IsNil) -} - -func (t *testUpgrade) loadVerFromDB(c *C, dbDir string) version { - db := t.openTestDB(c, dbDir) - defer db.Close() - ver, err := loadVersion(tcontext.Background(), db) - c.Assert(err, IsNil) - return ver -} - -func (t *testUpgrade) verifyUpgrade(c *C, dir string, before func(), after func()) { - before() - err := tryUpgrade(dir) - c.Assert(err, IsNil) - after() -} diff --git a/dm/worker/worker.go b/dm/worker/worker.go index 0b8474cc7a..bafa2f4396 100644 --- a/dm/worker/worker.go +++ b/dm/worker/worker.go @@ -16,15 +16,12 @@ package worker import ( "context" "fmt" - "path" "reflect" "sync" "time" "github.com/golang/protobuf/proto" - "github.com/pingcap/failpoint" "github.com/siddontang/go/sync2" - "github.com/syndtr/goleveldb/leveldb" "go.uber.org/zap" "github.com/pingcap/dm/dm/config" @@ -63,8 +60,6 @@ type Worker struct { relayHolder RelayHolder relayPurger purger.Purger - meta *Metadata - db *leveldb.DB tracer *tracing.Tracer taskStatusChecker TaskStatusChecker @@ -86,12 +81,6 @@ func NewWorker(cfg *Config) (w *Worker, err error) { // release resources, NOTE: we need to refactor New/Init/Start/Close for components later. w2.cancel() w2.subTaskHolder.closeAllSubTasks() - if w2.meta != nil { - w2.meta.Close() - } - if w2.db != nil { - w2.db.Close() - } } }(w) @@ -114,34 +103,8 @@ func NewWorker(cfg *Config) (w *Worker, err error) { w.taskStatusChecker = tsc } - // try upgrade from an older version - dbDir := path.Join(w.cfg.MetaDir, "kv") - err = tryUpgrade(dbDir) - if err != nil { - return nil, terror.Annotatef(err, "try to upgrade from any older version to %s", currentWorkerVersion) - } - - // open kv db - metaDB, err := openDB(dbDir, defaultKVConfig) - if err != nil { - return nil, err - } - w.db = metaDB - - // initial metadata - meta, err := NewMetadata(dbDir, w.db) - if err != nil { - return nil, err - } - w.meta = meta - InitConditionHub(w) - err = w.restoreSubTask() - if err != nil { - return nil, err - } - w.l.Info("initialized") return w, nil @@ -170,14 +133,9 @@ func (w *Worker) Start() { w.tracer.Start() } - w.wg.Add(2) + w.wg.Add(1) defer w.wg.Done() - go func() { - defer w.wg.Done() - w.handleTask() - }() - w.l.Info("start running") ticker := time.NewTicker(5 * time.Second) @@ -221,14 +179,6 @@ func (w *Worker) Close() { w.taskStatusChecker.Close() } - // close meta - w.meta.Close() - - // close kv db - if w.db != nil { - w.db.Close() - } - // close tracer if w.tracer.Enable() { w.tracer.Stop() @@ -238,80 +188,88 @@ func (w *Worker) Close() { } // StartSubTask creates a sub task an run it -func (w *Worker) StartSubTask(cfg *config.SubTaskConfig) (int64, error) { +func (w *Worker) StartSubTask(cfg *config.SubTaskConfig) error { w.Lock() defer w.Unlock() - // copy some config item from dm-worker's config - w.copyConfigFromWorker(cfg) - cfgStr, err := cfg.Toml() - if err != nil { - return 0, terror.Annotatef(err, "encode subtask %+v into toml format", cfg) + if w.closed.Get() == closedTrue { + return terror.ErrWorkerAlreadyClosed.Generate() } - opLogID, err := w.operateSubTask(&pb.TaskMeta{ - Op: pb.TaskOp_Start, - Name: cfg.Name, - Task: append([]byte{}, cfgStr...), - }) + if w.relayPurger.Purging() { + return terror.ErrWorkerRelayIsPurging.Generate(cfg.Name) + } + + if w.subTaskHolder.findSubTask(cfg.Name) != nil { + return terror.ErrWorkerSubTaskExists.Generate(cfg.Name) + } + + // copy some config item from dm-worker's config + w.copyConfigFromWorker(cfg) + cfgDecrypted, err := cfg.DecryptPassword() if err != nil { - return 0, err + return terror.WithClass(err, terror.ClassDMWorker) } - return opLogID, nil + w.l.Info("started sub task", zap.Stringer("config", cfgDecrypted)) + st := NewSubTask(cfgDecrypted) + w.subTaskHolder.recordSubTask(st) + st.Run() + return nil } // UpdateSubTask update config for a sub task -func (w *Worker) UpdateSubTask(cfg *config.SubTaskConfig) (int64, error) { +func (w *Worker) UpdateSubTask(cfg *config.SubTaskConfig) error { w.Lock() defer w.Unlock() - cfgStr, err := cfg.Toml() - if err != nil { - return 0, terror.Annotatef(err, "encode subtask %+v into toml format", cfg) + if w.closed.Get() == closedTrue { + return terror.ErrWorkerAlreadyClosed.Generate() } - opLogID, err := w.operateSubTask(&pb.TaskMeta{ - Op: pb.TaskOp_Update, - Name: cfg.Name, - Task: append([]byte{}, cfgStr...), - }) - if err != nil { - return 0, err + st := w.subTaskHolder.findSubTask(cfg.Name) + if st == nil { + return terror.ErrWorkerSubTaskNotFound.Generate(cfg.Name) } - return opLogID, nil + w.l.Info("update sub task", zap.String("task", cfg.Name)) + return st.Update(cfg) } // OperateSubTask stop/resume/pause sub task -func (w *Worker) OperateSubTask(name string, op pb.TaskOp) (int64, error) { +func (w *Worker) OperateSubTask(name string, op pb.TaskOp) error { w.Lock() defer w.Unlock() - opLogID, err := w.operateSubTask(&pb.TaskMeta{ - Name: name, - Op: op, - }) - if err != nil { - return 0, err - } - - return opLogID, nil -} - -// not thread safe -func (w *Worker) operateSubTask(task *pb.TaskMeta) (int64, error) { if w.closed.Get() == closedTrue { - return 0, terror.ErrWorkerAlreadyClosed.Generate() + return terror.ErrWorkerAlreadyClosed.Generate() } - opLogID, err := w.meta.AppendOperation(task) - if err != nil { - return 0, terror.Annotatef(err, "%s task %s, something wrong with saving operation log", task.Op, task.Name) + st := w.subTaskHolder.findSubTask(name) + if st == nil { + return terror.ErrWorkerSubTaskNotFound.Generate(name) + } + + var err error + switch op { + case pb.TaskOp_Stop: + w.l.Info("stop sub task", zap.String("task", name)) + st.Close() + w.subTaskHolder.removeSubTask(name) + case pb.TaskOp_Pause: + w.l.Info("pause sub task", zap.String("task", name)) + err = st.Pause() + case pb.TaskOp_Resume: + w.l.Info("resume sub task", zap.String("task", name)) + err = st.Resume() + case pb.TaskOp_AutoResume: + w.l.Info("auto_resume sub task", zap.String("task", name)) + err = st.Resume() + default: + err = terror.ErrWorkerUpdateTaskStage.Generatef("invalid operate %s on subtask %v", op, name) } - w.l.Info("operate subtask", zap.Stringer("operation", task.Op), zap.String("task", task.Name)) - return opLogID, nil + return err } // QueryStatus query worker's sub tasks' status @@ -725,184 +683,3 @@ func (w *Worker) getAllSubTaskStatus() map[string]*pb.SubTaskStatus { } return result } - -func (w *Worker) restoreSubTask() error { - tasks := w.meta.LoadTaskMeta() - for _, task := range tasks { - taskCfg := new(config.SubTaskConfig) - if err := taskCfg.Decode(string(task.Task)); err != nil { - return terror.Annotatef(err, "decode subtask config %s error in restoreSubTask", task.Task) - } - - cfgDecrypted, err := taskCfg.DecryptPassword() - if err != nil { - return err - } - - w.l.Info("prepare to restore sub task", zap.Stringer("config", cfgDecrypted)) - - var st *SubTask - if task.GetStage() == pb.Stage_Running || task.GetStage() == pb.Stage_New { - st = NewSubTaskWithStage(cfgDecrypted, pb.Stage_New) - st.Run() - } else { - st = NewSubTaskWithStage(cfgDecrypted, task.Stage) - } - - w.subTaskHolder.recordSubTask(st) - } - - return nil -} - -var maxRetryCount = 10 - -// handleTask handles task operation according to the metadata in levelDB. -// when the worker is closing, it should wait for this method to return. -// so we only need the mutex to protect concurrent access of `subTasks`. -func (w *Worker) handleTask() { - var handleTaskInterval = time.Second - failpoint.Inject("handleTaskInterval", func(val failpoint.Value) { - if milliseconds, ok := val.(int); ok { - handleTaskInterval = time.Duration(milliseconds) * time.Millisecond - w.l.Info("set handleTaskInterval", zap.String("failpoint", "handleTaskInterval"), zap.Int("value", milliseconds)) - } - }) - ticker := time.NewTicker(handleTaskInterval) - defer ticker.Stop() - - retryCnt := 0 - -Loop: - for { - select { - case <-w.ctx.Done(): - w.l.Info("handle task process exits!") - return - case <-ticker.C: - if w.closed.Get() == closedTrue { - return - } - - opLog := w.meta.PeekLog() - if opLog == nil { - continue - } - - w.l.Info("start to execute operation", zap.Reflect("oplog", opLog)) - - st := w.subTaskHolder.findSubTask(opLog.Task.Name) - var err error - switch opLog.Task.Op { - case pb.TaskOp_Start: - if st != nil { - err = terror.ErrWorkerSubTaskExists.Generate(opLog.Task.Name) - break - } - - if w.relayPurger.Purging() { - if retryCnt < maxRetryCount { - retryCnt++ - w.l.Warn("relay log purger is purging, cannot start subtask, would try again later", zap.String("task", opLog.Task.Name)) - continue Loop - } - - retryCnt = 0 - err = terror.ErrWorkerRelayIsPurging.Generate(opLog.Task.Name) - break - } - - retryCnt = 0 - taskCfg := new(config.SubTaskConfig) - if err1 := taskCfg.Decode(string(opLog.Task.Task)); err1 != nil { - err = terror.Annotate(err1, "decode subtask config error in handleTask") - break - } - - var cfgDecrypted *config.SubTaskConfig - cfgDecrypted, err = taskCfg.DecryptPassword() - if err != nil { - err = terror.WithClass(err, terror.ClassDMWorker) - break - } - - w.l.Info("started sub task", zap.Stringer("config", cfgDecrypted)) - st = NewSubTask(cfgDecrypted) - w.subTaskHolder.recordSubTask(st) - st.Run() - - case pb.TaskOp_Update: - if st == nil { - err = terror.ErrWorkerSubTaskNotFound.Generate(opLog.Task.Name) - break - } - - taskCfg := new(config.SubTaskConfig) - if err1 := taskCfg.Decode(string(opLog.Task.Task)); err1 != nil { - err = terror.Annotate(err1, "decode subtask config error in handleTask") - break - } - - w.l.Info("updated sub task", zap.String("task", opLog.Task.Name), zap.Stringer("new config", taskCfg)) - err = st.Update(taskCfg) - case pb.TaskOp_Stop: - if st == nil { - err = terror.ErrWorkerSubTaskNotFound.Generate(opLog.Task.Name) - break - } - - w.l.Info("stop sub task", zap.String("task", opLog.Task.Name)) - st.Close() - w.subTaskHolder.removeSubTask(opLog.Task.Name) - case pb.TaskOp_Pause: - if st == nil { - err = terror.ErrWorkerSubTaskNotFound.Generate(opLog.Task.Name) - break - } - - w.l.Info("pause sub task", zap.String("task", opLog.Task.Name)) - err = st.Pause() - case pb.TaskOp_Resume: - if st == nil { - err = terror.ErrWorkerSubTaskNotFound.Generate(opLog.Task.Name) - break - } - - w.l.Info("resume sub task", zap.String("task", opLog.Task.Name)) - err = st.Resume() - case pb.TaskOp_AutoResume: - if st == nil { - err = terror.ErrWorkerSubTaskNotFound.Generate(opLog.Task.Name) - break - } - - w.l.Info("auto_resume sub task", zap.String("task", opLog.Task.Name)) - err = st.Resume() - } - - w.l.Info("end to execute operation", zap.Int64("oplog ID", opLog.Id), log.ShortError(err)) - - if err != nil { - opLog.Message = err.Error() - } else { - opLog.Task.Stage = st.Stage() - opLog.Success = true - } - - // fill current task config - if len(opLog.Task.Task) == 0 { - tm := w.meta.GetTask(opLog.Task.Name) - if tm == nil { - w.l.Warn("task meta not found", zap.String("task", opLog.Task.Name)) - } else { - opLog.Task.Task = append([]byte{}, tm.Task...) - } - } - - err = w.meta.MarkOperation(opLog) - if err != nil { - w.l.Error("fail to mark subtask operation", zap.Reflect("oplog", opLog)) - } - } - } -} diff --git a/dm/worker/worker_test.go b/dm/worker/worker_test.go index 30dec19cb4..fd75282c7d 100644 --- a/dm/worker/worker_test.go +++ b/dm/worker/worker_test.go @@ -18,7 +18,6 @@ import ( "fmt" "io/ioutil" "strings" - "sync" "time" . "github.com/pingcap/check" @@ -61,64 +60,20 @@ func (t *testServer) testWorker(c *C) { c.Assert(w.closed.Get(), Equals, closedTrue) c.Assert(w.subTaskHolder.getAllSubTasks(), HasLen, 0) - _, err = w.StartSubTask(&config.SubTaskConfig{ + err = w.StartSubTask(&config.SubTaskConfig{ Name: "testStartTask", }) c.Assert(err, ErrorMatches, ".*worker already closed.*") - _, err = w.UpdateSubTask(&config.SubTaskConfig{ + err = w.UpdateSubTask(&config.SubTaskConfig{ Name: "testStartTask", }) c.Assert(err, ErrorMatches, ".*worker already closed.*") - _, err = w.OperateSubTask("testSubTask", pb.TaskOp_Stop) + err = w.OperateSubTask("testSubTask", pb.TaskOp_Stop) c.Assert(err, ErrorMatches, ".*worker already closed.*") } -func (t *testServer) testWorkerHandleTask(c *C) { - var ( - wg sync.WaitGroup - taskName = "test" - ) - - NewRelayHolder = NewDummyRelayHolder - dir := c.MkDir() - cfg := NewConfig() - c.Assert(cfg.Parse([]string{"-config=./dm-worker.toml"}), IsNil) - cfg.RelayDir = dir - cfg.MetaDir = dir - w, err := NewWorker(cfg) - c.Assert(err, IsNil) - - tasks := []*pb.TaskMeta{ - {Op: pb.TaskOp_Stop, Name: taskName, Stage: pb.Stage_New}, - {Op: pb.TaskOp_Pause, Name: taskName, Stage: pb.Stage_New}, - {Op: pb.TaskOp_Resume, Name: taskName, Stage: pb.Stage_New}, - } - for _, task := range tasks { - _, err := w.meta.AppendOperation(task) - c.Assert(err, IsNil) - } - c.Assert(len(w.meta.logs), Equals, len(tasks)) - - c.Assert(failpoint.Enable("github.com/pingcap/dm/dm/worker/handleTaskInterval", `return(10)`), IsNil) - defer failpoint.Disable("github.com/pingcap/dm/dm/worker/handleTaskInterval") - wg.Add(1) - go func() { - defer wg.Done() - w.handleTask() - }() - - c.Assert(utils.WaitSomething(10, 100*time.Millisecond, func() bool { - w.meta.Lock() - defer w.meta.Unlock() - return len(w.meta.logs) == 0 - }), IsTrue) - - w.Close() - wg.Wait() -} - func (t *testServer) TestTaskAutoResume(c *C) { var ( taskName = "sub-task-name" @@ -126,6 +81,7 @@ func (t *testServer) TestTaskAutoResume(c *C) { ) cfg := NewConfig() c.Assert(cfg.Parse([]string{"-config=./dm-worker.toml"}), IsNil) + cfg.From.Password = "" // no password set cfg.Checker.CheckInterval = duration{Duration: 40 * time.Millisecond} cfg.Checker.BackoffMin = duration{Duration: 20 * time.Millisecond} cfg.Checker.BackoffMax = duration{Duration: 1 * time.Second} @@ -144,8 +100,6 @@ func (t *testServer) TestTaskAutoResume(c *C) { defer failpoint.Disable("github.com/pingcap/dm/mydumper/dumpUnitProcessForever") c.Assert(failpoint.Enable("github.com/pingcap/dm/mydumper/dumpUnitProcessWithError", `2*return("test auto resume inject error")`), IsNil) defer failpoint.Disable("github.com/pingcap/dm/mydumper/dumpUnitProcessWithError") - c.Assert(failpoint.Enable("github.com/pingcap/dm/dm/worker/handleTaskInterval", `return(10)`), IsNil) - defer failpoint.Disable("github.com/pingcap/dm/dm/worker/handleTaskInterval") c.Assert(failpoint.Enable("github.com/pingcap/dm/dm/worker/mockCreateUnitsDumpOnly", `return(true)`), IsNil) defer failpoint.Disable("github.com/pingcap/dm/dm/worker/mockCreateUnitsDumpOnly") diff --git a/go.mod b/go.mod index 995055c972..da749f5c50 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 + github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect github.com/uber-go/atomic v1.4.0 // indirect github.com/uber/jaeger-client-go v2.16.0+incompatible // indirect diff --git a/tests/all_mode/run.sh b/tests/all_mode/run.sh index de61b75765..459d3edcaf 100755 --- a/tests/all_mode/run.sh +++ b/tests/all_mode/run.sh @@ -34,6 +34,11 @@ function run() { run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml + sleep 2 + echo "start task after restart dm-worker" + dmctl_start_task + sleep 2 + # kill tidb pkill -hup tidb-server 2>/dev/null || true wait_process_exit tidb-server diff --git a/tests/import_goroutine_leak/run.sh b/tests/import_goroutine_leak/run.sh index ae70acdf8b..14a4de5ace 100644 --- a/tests/import_goroutine_leak/run.sh +++ b/tests/import_goroutine_leak/run.sh @@ -65,6 +65,11 @@ function run() { run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml sleep 2s + + echo "start task after restarted dm-worker" + dmctl_start_task + sleep 2s + check_port_offline $WORKER1_PORT 20 check_port_offline $WORKER2_PORT 20 diff --git a/tests/initial_unit/run.sh b/tests/initial_unit/run.sh index eb39d91dff..86cb48f222 100644 --- a/tests/initial_unit/run.sh +++ b/tests/initial_unit/run.sh @@ -68,9 +68,11 @@ function run() { run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT sleep 2 - + + echo "start task after restarted dm-worker, the sync unit will initial success" + task_conf="$cur/conf/dm-task.yaml" run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ - "resume-task test" \ + "start-task $task_conf" \ "\"result\": true" 2 check_sync_diff $WORK_DIR $cur/conf/diff_config.toml diff --git a/tests/load_interrupt/run.sh b/tests/load_interrupt/run.sh index 5d10e7bd75..0457a908c6 100755 --- a/tests/load_interrupt/run.sh +++ b/tests/load_interrupt/run.sh @@ -65,6 +65,11 @@ function run() { run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT + + sleep 2 + echo "start task after restarted dm-worker" + dmctl_start_task + check_sync_diff $WORK_DIR $cur/conf/diff_config.toml # LoadExecCreateTableFailed error return twice diff --git a/tests/relay_interrupt/run.sh b/tests/relay_interrupt/run.sh index 413cf7869d..ad37ab07cf 100644 --- a/tests/relay_interrupt/run.sh +++ b/tests/relay_interrupt/run.sh @@ -66,9 +66,10 @@ function run() { check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT sleep 2 - + echo "start task after restarted dm-worker" + task_conf="$cur/conf/dm-task.yaml" run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ - "resume-task test" \ + "start-task $task_conf" \ "\"result\": true" 2 check_sync_diff $WORK_DIR $cur/conf/diff_config.toml @@ -78,6 +79,7 @@ function run() { } cleanup_data relay_interrupt +cleanup_process run $* diff --git a/tests/retry_cancel/run.sh b/tests/retry_cancel/run.sh index 94b83333db..4dcb26602d 100755 --- a/tests/retry_cancel/run.sh +++ b/tests/retry_cancel/run.sh @@ -102,11 +102,16 @@ function run() { run_sql_file $cur/data/db1.increment.sql $MYSQL_HOST1 $MYSQL_PORT1 run_sql_file $cur/data/db2.increment.sql $MYSQL_HOST2 $MYSQL_PORT2 - # start DM-worker again (with auto restart task) + # start DM-worker again run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT + + sleep 2 + echo "start task for incremental replication" + dmctl_start_task + sleep 5 # should sleep > retryTimeout (now 3s) # query-task, it should still be running (retrying) diff --git a/tests/safe_mode/run.sh b/tests/safe_mode/run.sh index 2cd712ed10..5b66467373 100755 --- a/tests/safe_mode/run.sh +++ b/tests/safe_mode/run.sh @@ -38,12 +38,17 @@ function run() { run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT + + sleep 2 + echo "stat task after set SafeModeInitPhaseSeconds failpoint" + dmctl_start_task check_sync_diff $WORK_DIR $cur/conf/diff_config.toml # DM-worker exit when waiting for sharding group synced run_sql_file $cur/data/db1.increment2.sql $MYSQL_HOST1 $MYSQL_PORT1 run_sql_file $cur/data/db2.increment2.sql $MYSQL_HOST2 $MYSQL_PORT2 + OWNER_PORT="" i=0 while [ $i -lt 10 ]; do # we can't determine which DM-worker is the sharding lock owner, so we try both of them @@ -55,6 +60,7 @@ function run() { run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_instance_id="1" + OWNER_PORT=$WORKER1_PORT break fi # DM-worker2 is sharding lock owner and exits @@ -65,6 +71,7 @@ function run() { run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT check_instance_id="2" + OWNER_PORT=$WORKER2_PORT break fi @@ -76,6 +83,13 @@ function run() { exit 1 fi + sleep 2 + echo "start task after restart DDL owner" + task_conf="$cur/conf/dm-task.yaml" + run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "start-task $task_conf" \ + "\"result\": true" 2 \ + "\"worker\": \"127.0.0.1:$OWNER_PORT\"" 1 check_sync_diff $WORK_DIR $cur/conf/diff_config.toml $cur/../bin/check_safe_mode $check_instance_id diff --git a/tests/sequence_safe_mode/run.sh b/tests/sequence_safe_mode/run.sh index aa0bc56a42..e721fe01bc 100755 --- a/tests/sequence_safe_mode/run.sh +++ b/tests/sequence_safe_mode/run.sh @@ -37,6 +37,10 @@ function run() { run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT + + sleep 2 + echo "stat task after reset failpoint" + dmctl_start_task check_sync_diff $WORK_DIR $cur/conf/diff_config.toml pkill -hup dm-worker.test 2>/dev/null || true @@ -44,15 +48,21 @@ function run() { export GO_FAILPOINTS='github.com/pingcap/dm/syncer/SequenceShardSyncedExecutionExit=return(true);github.com/pingcap/dm/syncer/SafeModeInitPhaseSeconds=return(300)' + echo "restart DM-worker after set SequenceShardSyncedExecutionExit failpoint" run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT + sleep 2 + echo "stat task after set SequenceShardSyncedExecutionExit failpoint" + dmctl_start_task + # DM-worker exit when waiting for sharding group synced run_sql_file $cur/data/db1.increment2.sql $MYSQL_HOST1 $MYSQL_PORT1 run_sql_file $cur/data/db2.increment2.sql $MYSQL_HOST2 $MYSQL_PORT2 + OWNER_PORT="" i=0 while [ $i -lt 10 ]; do # we can't determine which DM-worker is the sharding lock owner, so we try both of them @@ -64,6 +74,7 @@ function run() { run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT check_instance_id="1" + OWNER_PORT=$WORKER1_PORT break fi # DM-worker2 is sharding lock owner and exits @@ -74,6 +85,7 @@ function run() { run_dm_worker $WORK_DIR/worker2 $WORKER2_PORT $cur/conf/dm-worker2.toml check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT check_instance_id="2" + OWNER_PORT=$WORKER2_PORT break fi @@ -85,6 +97,13 @@ function run() { exit 1 fi + sleep 2 + echo "start task after restart DDL owner" + task_conf="$cur/conf/dm-task.yaml" + run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ + "start-task $task_conf" \ + "\"result\": true" 2 \ + "\"worker\": \"127.0.0.1:$OWNER_PORT\"" 1 check_sync_diff $WORK_DIR $cur/conf/diff_config.toml $cur/../bin/check_safe_mode $check_instance_id diff --git a/tests/utils/dmctl.go b/tests/utils/dmctl.go index ac4cfcff17..cea552564b 100644 --- a/tests/utils/dmctl.go +++ b/tests/utils/dmctl.go @@ -71,8 +71,8 @@ func OperateTask(ctx context.Context, cli pb.MasterClient, op pb.TaskOp, name st } for _, wp := range resp.GetWorkers() { - if !wp.GetMeta().GetResult() { - return errors.Errorf("fail to do %v operate on task %s: %s", op, name, wp.Meta.GetMsg()) + if !wp.GetResult() { + return errors.Errorf("fail to do %v operate on task %s: %s", op, name, wp.GetMsg()) } }