diff --git a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go index 554d96b9874..a3194b5225b 100644 --- a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go +++ b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go @@ -320,9 +320,9 @@ func commandCreate(cmd *cobra.Command, args []string) error { return err } } else { - data = []byte(fmt.Sprintf("VDiff %s scheduled on target shards, use show to view progress", resp.Uuid)) + data = []byte(fmt.Sprintf("VDiff %s scheduled on target shards, use show to view progress", resp.UUID)) } - fmt.Println(data) + fmt.Println(string(data)) } return nil @@ -851,17 +851,19 @@ func registerVDiffCommands(root *cobra.Command) { common.AddCommonFlags(base) root.AddCommand(base) - create.Flags().StringSliceVar(&createOptions.SourceCells, "source-cells", nil, "The source cell(s) to compare from; default is any available cell") - create.Flags().StringSliceVar(&createOptions.TargetCells, "target-cells", nil, "The target cell(s) to compare with; default is any available cell") - create.Flags().Var((*topoprotopb.TabletTypeListFlag)(&createOptions.TabletTypes), "tablet-types", "Tablet types to use on the source and target") + create.Flags().StringSliceVar(&createOptions.SourceCells, "source-cells", nil, "The source cell(s) to compare from; default is any available cell.") + create.Flags().StringSliceVar(&createOptions.TargetCells, "target-cells", nil, "The target cell(s) to compare with; default is any available cell.") + create.Flags().Var((*topoprotopb.TabletTypeListFlag)(&createOptions.TabletTypes), "tablet-types", "Tablet types to use on the source and target.") create.Flags().DurationVar(&createOptions.FilteredReplicationWaitTime, "filtered-replication-wait-time", 30*time.Second, "Specifies the maximum time to wait, in seconds, for replication to catch up when syncing tablet streams.") - create.Flags().Uint32Var(&createOptions.Limit, "limit", math.MaxUint32, "Max rows to stop comparing after") - create.Flags().BoolVar(&createOptions.DebugQuery, "debug-query", false, "Adds a mysql query to the report that can be used for further debugging") + create.Flags().Uint32Var(&createOptions.Limit, "limit", math.MaxUint32, "Max rows to stop comparing after.") + create.Flags().BoolVar(&createOptions.DebugQuery, "debug-query", false, "Adds a mysql query to the report that can be used for further debugging.") create.Flags().BoolVar(&createOptions.OnlyPKs, "only-pks", false, "When reporting missing rows, only show primary keys in the report.") - create.Flags().StringSliceVar(&createOptions.Tables, "tables", nil, "Only run vdiff for these tables in the workflow") + create.Flags().StringSliceVar(&createOptions.Tables, "tables", nil, "Only run vdiff for these tables in the workflow.") create.Flags().Uint32Var(&createOptions.MaxExtraRowsToCompare, "max-extra-rows-to-compare", 1000, "If there are collation differences between the source and target, you can have rows that are identical but simply returned in a different order from MySQL. We will do a second pass to compare the rows for any actual differences in this case and this flag allows you to control the resources used for this operation.") - create.Flags().BoolVar(&createOptions.Wait, "wait", false, "When creating or resuming a vdiff, wait for it to finish before exiting") - create.Flags().DurationVar(&createOptions.WaitUpdateInterval, "wait-update-interval", time.Duration(1*time.Minute), "When waiting on a vdiff to finish, check and display the current status this often") + create.Flags().BoolVar(&createOptions.Wait, "wait", false, "When creating or resuming a vdiff, wait for it to finish before exiting.") + create.Flags().DurationVar(&createOptions.WaitUpdateInterval, "wait-update-interval", time.Duration(1*time.Minute), "When waiting on a vdiff to finish, check and display the current status this often.") + create.Flags().BoolVar(&createOptions.AutoRetry, "auto-retry", true, "Should this vdiff automatically retry and continue in case of recoverable errors.") + create.Flags().BoolVar(&createOptions.UpdateTableStats, "update-table-stats", false, "Update the table statistics, using ANALYZE TABLE, on each table involved in the VDiff during initialization. This will ensure that progress estimates are as accurate as possible -- but it does involve locks and can potentially impact query processing on the target keyspace.") base.AddCommand(create) base.AddCommand(delete) diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index b1b443b1456..5b94daed543 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -12390,7 +12390,8 @@ type VDiffCreateResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + // Intentionally upper case to maintain compatibility with vtctlclient. + UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"` } func (x *VDiffCreateResponse) Reset() { @@ -12425,9 +12426,9 @@ func (*VDiffCreateResponse) Descriptor() ([]byte, []int) { return file_vtctldata_proto_rawDescGZIP(), []int{198} } -func (x *VDiffCreateResponse) GetUuid() string { +func (x *VDiffCreateResponse) GetUUID() string { if x != nil { - return x.Uuid + return x.UUID } return "" } @@ -16115,8 +16116,8 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x13, 0x56, 0x44, 0x69, 0x66, 0x66, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x6b, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x22, 0x6b, 0x0a, 0x12, 0x56, 0x44, 0x69, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, diff --git a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go index 2462fafaf2e..409a726c966 100644 --- a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go +++ b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go @@ -4446,7 +4446,7 @@ func (m *VDiffCreateResponse) CloneVT() *VDiffCreateResponse { return (*VDiffCreateResponse)(nil) } r := &VDiffCreateResponse{ - Uuid: m.Uuid, + UUID: m.UUID, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -16650,10 +16650,10 @@ func (m *VDiffCreateResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Uuid) > 0 { - i -= len(m.Uuid) - copy(dAtA[i:], m.Uuid) - i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) + if len(m.UUID) > 0 { + i -= len(m.UUID) + copy(dAtA[i:], m.UUID) + i = encodeVarint(dAtA, i, uint64(len(m.UUID))) i-- dAtA[i] = 0xa } @@ -22250,7 +22250,7 @@ func (m *VDiffCreateResponse) SizeVT() (n int) { } var l int _ = l - l = len(m.Uuid) + l = len(m.UUID) if l > 0 { n += 1 + l + sov(uint64(l)) } @@ -51191,7 +51191,7 @@ func (m *VDiffCreateResponse) UnmarshalVT(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -51219,7 +51219,7 @@ func (m *VDiffCreateResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Uuid = string(dAtA[iNdEx:postIndex]) + m.UUID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index fb6227867d5..32c0a8e6dc7 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -1369,7 +1369,7 @@ func (s *Server) VDiffCreate(ctx context.Context, req *vtctldatapb.VDiffCreateRe } return &vtctldatapb.VDiffCreateResponse{ - Uuid: req.Uuid, + UUID: req.Uuid, }, nil } diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 2a4ce6671e4..3eea3f9223d 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -1599,7 +1599,9 @@ message VDiffCreateRequest { } message VDiffCreateResponse { - string uuid = 1; + // Intentionally upper case to maintain compatibility with + // vtctlclient and other VDiff client output. + string UUID = 1; } message VDiffDeleteRequest { diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 2d68b8f3180..c194e969ca9 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -63976,8 +63976,8 @@ export namespace vtctldata { /** Properties of a VDiffCreateResponse. */ interface IVDiffCreateResponse { - /** VDiffCreateResponse uuid */ - uuid?: (string|null); + /** VDiffCreateResponse UUID */ + UUID?: (string|null); } /** Represents a VDiffCreateResponse. */ @@ -63989,8 +63989,8 @@ export namespace vtctldata { */ constructor(properties?: vtctldata.IVDiffCreateResponse); - /** VDiffCreateResponse uuid. */ - public uuid: string; + /** VDiffCreateResponse UUID. */ + public UUID: string; /** * Creates a new VDiffCreateResponse instance using the specified properties. diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 4fe83ad70f9..a228b2e1223 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -155653,7 +155653,7 @@ export const vtctldata = $root.vtctldata = (() => { * Properties of a VDiffCreateResponse. * @memberof vtctldata * @interface IVDiffCreateResponse - * @property {string|null} [uuid] VDiffCreateResponse uuid + * @property {string|null} [UUID] VDiffCreateResponse UUID */ /** @@ -155672,12 +155672,12 @@ export const vtctldata = $root.vtctldata = (() => { } /** - * VDiffCreateResponse uuid. - * @member {string} uuid + * VDiffCreateResponse UUID. + * @member {string} UUID * @memberof vtctldata.VDiffCreateResponse * @instance */ - VDiffCreateResponse.prototype.uuid = ""; + VDiffCreateResponse.prototype.UUID = ""; /** * Creates a new VDiffCreateResponse instance using the specified properties. @@ -155703,8 +155703,8 @@ export const vtctldata = $root.vtctldata = (() => { VDiffCreateResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid); + if (message.UUID != null && Object.hasOwnProperty.call(message, "UUID")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.UUID); return writer; }; @@ -155740,7 +155740,7 @@ export const vtctldata = $root.vtctldata = (() => { let tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.uuid = reader.string(); + message.UUID = reader.string(); break; } default: @@ -155778,9 +155778,9 @@ export const vtctldata = $root.vtctldata = (() => { VDiffCreateResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: string expected"; + if (message.UUID != null && message.hasOwnProperty("UUID")) + if (!$util.isString(message.UUID)) + return "UUID: string expected"; return null; }; @@ -155796,8 +155796,8 @@ export const vtctldata = $root.vtctldata = (() => { if (object instanceof $root.vtctldata.VDiffCreateResponse) return object; let message = new $root.vtctldata.VDiffCreateResponse(); - if (object.uuid != null) - message.uuid = String(object.uuid); + if (object.UUID != null) + message.UUID = String(object.UUID); return message; }; @@ -155815,9 +155815,9 @@ export const vtctldata = $root.vtctldata = (() => { options = {}; let object = {}; if (options.defaults) - object.uuid = ""; - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; + object.UUID = ""; + if (message.UUID != null && message.hasOwnProperty("UUID")) + object.UUID = message.UUID; return object; };