From 602e14c09625473b06a74deec01499e1e0ab4045 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 11 May 2022 16:34:22 +0800 Subject: [PATCH 01/21] save work --- cdc/entry/codec.go | 20 +++++++++--------- cdc/model/schema_storage.go | 18 ++++++++-------- cdc/model/sink.go | 2 +- cdc/sink/codec/avro.go | 4 ++-- cdc/sink/codec/avro_test.go | 2 +- dm/pkg/shardddl/optimism/lock.go | 4 ++-- dm/syncer/ddl.go | 2 +- dm/syncer/dml.go | 2 +- go.mod | 15 +++++++------- go.sum | 26 +++++++++++++----------- pkg/sqlmodel/where_handle.go | 2 +- tests/integration_tests/dailytest/db.go | 8 ++++---- tests/integration_tests/dailytest/job.go | 11 +++------- 13 files changed, 56 insertions(+), 60 deletions(-) diff --git a/cdc/entry/codec.go b/cdc/entry/codec.go index a0070cb9e48..9a63b2097b5 100644 --- a/cdc/entry/codec.go +++ b/cdc/entry/codec.go @@ -247,24 +247,24 @@ func unflatten(datum types.Datum, ft *types.FieldType, loc *time.Location) (type if datum.IsNull() { return datum, nil } - switch ft.Tp { + switch ft.GetType() { case mysql.TypeFloat: datum.SetFloat32(float32(datum.GetFloat64())) return datum, nil case mysql.TypeVarchar, mysql.TypeString, mysql.TypeVarString, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeBlob, mysql.TypeLongBlob: - datum.SetString(datum.GetString(), ft.Collate) + datum.SetString(datum.GetString(), ft.GetCollate()) case mysql.TypeTiny, mysql.TypeShort, mysql.TypeYear, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong, mysql.TypeDouble: return datum, nil case mysql.TypeDate, mysql.TypeDatetime, mysql.TypeTimestamp: - t := types.NewTime(types.ZeroCoreTime, ft.Tp, ft.Decimal) + t := types.NewTime(types.ZeroCoreTime, ft.GetType(), ft.GetDecimal()) var err error err = t.FromPackedUint(datum.GetUint64()) if err != nil { return datum, cerror.WrapError(cerror.ErrDatumUnflatten, err) } - if ft.Tp == mysql.TypeTimestamp && !t.IsZero() { + if ft.GetType() == mysql.TypeTimestamp && !t.IsZero() { err = t.ConvertTimeZone(time.UTC, loc) if err != nil { return datum, cerror.WrapError(cerror.ErrDatumUnflatten, err) @@ -274,27 +274,27 @@ func unflatten(datum types.Datum, ft *types.FieldType, loc *time.Location) (type datum.SetMysqlTime(t) return datum, nil case mysql.TypeDuration: // duration should read fsp from column meta data - dur := types.Duration{Duration: time.Duration(datum.GetInt64()), Fsp: ft.Decimal} + dur := types.Duration{Duration: time.Duration(datum.GetInt64()), Fsp: ft.GetDecimal()} datum.SetMysqlDuration(dur) return datum, nil case mysql.TypeEnum: // ignore error deliberately, to read empty enum value. - enum, err := types.ParseEnumValue(ft.Elems, datum.GetUint64()) + enum, err := types.ParseEnumValue(ft.GetElems(), datum.GetUint64()) if err != nil { enum = types.Enum{} } - datum.SetMysqlEnum(enum, ft.Collate) + datum.SetMysqlEnum(enum, ft.GetCollate()) return datum, nil case mysql.TypeSet: - set, err := types.ParseSetValue(ft.Elems, datum.GetUint64()) + set, err := types.ParseSetValue(ft.GetElems(), datum.GetUint64()) if err != nil { return datum, cerror.WrapError(cerror.ErrDatumUnflatten, err) } - datum.SetMysqlSet(set, ft.Collate) + datum.SetMysqlSet(set, ft.GetCollate()) return datum, nil case mysql.TypeBit: val := datum.GetUint64() - byteSize := (ft.Flen + 7) >> 3 + byteSize := (ft.GetFlen() + 7) >> 3 datum.SetUint64(0) datum.SetMysqlBit(types.NewBinaryLiteralFromUint(val, byteSize)) } diff --git a/cdc/model/schema_storage.go b/cdc/model/schema_storage.go index 48f1dff8c5e..61bb78a7445 100644 --- a/cdc/model/schema_storage.go +++ b/cdc/model/schema_storage.go @@ -87,7 +87,7 @@ func WrapTableInfo(schemaID int64, schemaName string, version uint64, info *mode if IsColCDCVisible(col) { ti.RowColumnsOffset[col.ID] = rowColumnsCurrentOffset rowColumnsCurrentOffset++ - pkIsHandle = (ti.PKIsHandle && mysql.HasPriKeyFlag(col.Flag)) || col.ID == model.ExtraHandleID + pkIsHandle = (ti.PKIsHandle && mysql.HasPriKeyFlag(col.GetFlag())) || col.ID == model.ExtraHandleID if pkIsHandle { // pk is handle ti.handleColID = []int64{col.ID} @@ -173,28 +173,28 @@ func (ti *TableInfo) findHandleIndex() { func (ti *TableInfo) initColumnsFlag() { for _, colInfo := range ti.Columns { var flag ColumnFlagType - if colInfo.Charset == "binary" { + if colInfo.GetCharset() == "binary" { flag.SetIsBinary() } if colInfo.IsGenerated() { flag.SetIsGeneratedColumn() } - if mysql.HasPriKeyFlag(colInfo.Flag) { + if mysql.HasPriKeyFlag(colInfo.GetFlag()) { flag.SetIsPrimaryKey() if ti.HandleIndexID == HandleIndexPKIsHandle { flag.SetIsHandleKey() } } - if mysql.HasUniKeyFlag(colInfo.Flag) { + if mysql.HasUniKeyFlag(colInfo.GetFlag()) { flag.SetIsUniqueKey() } - if !mysql.HasNotNullFlag(colInfo.Flag) { + if !mysql.HasNotNullFlag(colInfo.GetFlag()) { flag.SetIsNullable() } - if mysql.HasMultipleKeyFlag(colInfo.Flag) { + if mysql.HasMultipleKeyFlag(colInfo.GetFlag()) { flag.SetIsMultipleKey() } - if mysql.HasUnsignedFlag(colInfo.Flag) { + if mysql.HasUnsignedFlag(colInfo.GetFlag()) { flag.SetIsUnsigned() } ti.ColumnsFlag[colInfo.ID] = flag @@ -269,7 +269,7 @@ func (ti *TableInfo) GetUniqueKeys() [][]string { var uniqueKeys [][]string if ti.PKIsHandle { for _, col := range ti.Columns { - if mysql.HasPriKeyFlag(col.Flag) { + if mysql.HasPriKeyFlag(col.GetFlag()) { // Prepend to make sure the primary key ends up at the front uniqueKeys = [][]string{{col.Name.O}} break @@ -327,7 +327,7 @@ func (ti *TableInfo) IsIndexUnique(indexInfo *model.IndexInfo) bool { if indexInfo.Unique { for _, col := range indexInfo.Columns { colInfo := ti.Columns[col.Offset] - if !mysql.HasNotNullFlag(colInfo.Flag) { + if !mysql.HasNotNullFlag(colInfo.GetFlag()) { return false } // this column is a virtual generated column diff --git a/cdc/model/sink.go b/cdc/model/sink.go index 8c0ca50cecf..ce589d3d7aa 100644 --- a/cdc/model/sink.go +++ b/cdc/model/sink.go @@ -445,7 +445,7 @@ type ColumnInfo struct { // FromTiColumnInfo populates cdc's ColumnInfo from TiDB's model.ColumnInfo func (c *ColumnInfo) FromTiColumnInfo(tiColumnInfo *model.ColumnInfo) { - c.Type = tiColumnInfo.Tp + c.Type = tiColumnInfo.GetType() c.Name = tiColumnInfo.Name.O } diff --git a/cdc/sink/codec/avro.go b/cdc/sink/codec/avro.go index bc6c80c8f7f..31202a3f1bd 100644 --- a/cdc/sink/codec/avro.go +++ b/cdc/sink/codec/avro.go @@ -466,13 +466,13 @@ func columnToAvroNativeData(col *model.Column, ft *types.FieldType, tz *time.Loc case mysql.TypeNewDecimal: return col.Value.(string), "string", nil case mysql.TypeEnum: - enumVar, err := types.ParseEnumValue(ft.Elems, col.Value.(uint64)) + enumVar, err := types.ParseEnumValue(ft.GetElems(), col.Value.(uint64)) if err != nil { return nil, "", cerror.WrapError(cerror.ErrAvroEncodeFailed, err) } return enumVar.Name, "string", nil case mysql.TypeSet: - setVar, err := types.ParseSetValue(ft.Elems, col.Value.(uint64)) + setVar, err := types.ParseSetValue(ft.GetElems(), col.Value.(uint64)) if err != nil { return nil, "", cerror.WrapError(cerror.ErrAvroEncodeFailed, err) } diff --git a/cdc/sink/codec/avro_test.go b/cdc/sink/codec/avro_test.go index 0f1de5f5e94..2c969d8ccea 100644 --- a/cdc/sink/codec/avro_test.go +++ b/cdc/sink/codec/avro_test.go @@ -77,7 +77,7 @@ func setFlag(ft *types.FieldType, flag uint) *types.FieldType { } func setElems(ft *types.FieldType, elems []string) *types.FieldType { - ft.Elems = elems + ft.GetElems() = elems return ft } diff --git a/dm/pkg/shardddl/optimism/lock.go b/dm/pkg/shardddl/optimism/lock.go index da71fe38804..a1c6478f49a 100644 --- a/dm/pkg/shardddl/optimism/lock.go +++ b/dm/pkg/shardddl/optimism/lock.go @@ -731,10 +731,10 @@ func AddDifferentFieldLenColumns(lockID, ddl string, oldJoined, newJoined schema newJoinedCols := schemacmp.DecodeColumnFieldTypes(newJoined) oldCol, ok1 := oldJoinedCols[col] newCol, ok2 := newJoinedCols[col] - if ok1 && ok2 && newCol.Flen != oldCol.Flen { + if ok1 && ok2 && newCol.GetFlen() != oldCol.GetFlen() { return col, terror.ErrShardDDLOptimismAddNotFullyDroppedColumn.Generate( lockID, fmt.Sprintf("add columns with different field lengths. "+ - "ddl: %s, origLen: %d, newLen: %d", ddl, oldCol.Flen, newCol.Flen)) + "ddl: %s, origLen: %d, newLen: %d", ddl, oldCol.GetFlen(), newCol.GetFlen())) } } return col, nil diff --git a/dm/syncer/ddl.go b/dm/syncer/ddl.go index 021a38ddf73..9ec587263b6 100644 --- a/dm/syncer/ddl.go +++ b/dm/syncer/ddl.go @@ -282,7 +282,7 @@ func adjustColumnsCollation(tctx *tcontext.Context, createStmt *ast.CreateTableS } fieldType := col.Tp // already have 'Collation' - if fieldType.Collate != "" { + if fieldType.GetCollate() != "" { continue } if fieldType.Charset != "" { diff --git a/dm/syncer/dml.go b/dm/syncer/dml.go index 81b7c7cd984..75f743df2fe 100644 --- a/dm/syncer/dml.go +++ b/dm/syncer/dml.go @@ -277,7 +277,7 @@ func castUnsigned(data interface{}, ft *types.FieldType) interface{} { case int16: return uint16(v) case int32: - if ft.Tp == mysql.TypeInt24 { + if ft.GetType() == mysql.TypeInt24 { // we use int32 to store MEDIUMINT, if the value is signed, it's fine // but if the value is un-signed, simply convert it use `uint32` may out of the range // like -4692783 converted to 4290274513 (2^32 - 4692783), but we expect 12084433 (2^24 - 4692783) diff --git a/go.mod b/go.mod index 97a88836eff..173423c883d 100644 --- a/go.mod +++ b/go.mod @@ -47,12 +47,12 @@ require ( github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0 github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c - github.com/pingcap/failpoint v0.0.0-20220303073211-00fea37feb66 + github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73 - github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee - github.com/pingcap/tidb v1.1.0-beta.0.20220412180037-d07b66ea638c + github.com/pingcap/log v1.1.0 + github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompatible - github.com/pingcap/tidb/parser v0.0.0-20220412180037-d07b66ea638c + github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725 github.com/prometheus/client_golang v1.11.0 github.com/prometheus/client_model v0.2.0 github.com/r3labs/diff v1.1.0 @@ -61,12 +61,12 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 github.com/swaggo/gin-swagger v1.2.0 github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476 github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 - github.com/tikv/client-go/v2 v2.0.1-0.20220406091203-f73ec0e675f4 + github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869 github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710 github.com/tinylib/msgp v1.1.6 @@ -257,7 +257,7 @@ require ( go.opentelemetry.io/otel/trace v0.20.0 // indirect go.opentelemetry.io/proto/otlp v0.7.0 // indirect golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect - golang.org/x/exp v0.0.0-20200513190911-00229845015e // indirect + golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect @@ -267,7 +267,6 @@ require ( gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - modernc.org/mathutil v1.4.1 // indirect sigs.k8s.io/yaml v1.2.0 // indirect sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 // indirect diff --git a/go.sum b/go.sum index aa101316c4c..ef30f91ba57 100644 --- a/go.sum +++ b/go.sum @@ -948,8 +948,8 @@ github.com/pingcap/failpoint v0.0.0-20191029060244-12f4ac2fd11d/go.mod h1:DNS3Qg github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce/go.mod h1:w4PEZ5y16LeofeeGwdgZB4ddv9bLyDuIX+ljstgKZyk= github.com/pingcap/failpoint v0.0.0-20210316064728-7acb0f0a3dfd/go.mod h1:IVF+ijPSMZVtx2oIqxAg7ur6EyixtTYfOHwpfmlhqI4= github.com/pingcap/failpoint v0.0.0-20210918120811-547c13e3eb00/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= -github.com/pingcap/failpoint v0.0.0-20220303073211-00fea37feb66 h1:v+/0tBl7umw+ZxfTeAId/R9pmb8fn2MqsrTHAs8qFAk= -github.com/pingcap/failpoint v0.0.0-20220303073211-00fea37feb66/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= +github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 h1:kJolJWbyadVeL8RKBlqmXQR7FRKPsIeU85TUYyhbhiQ= +github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059 h1:Pe2LbxRmbTfAoKJ65bZLmhahmvHm7n9DUxGRQT00208= github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059/go.mod h1:fMRU1BA1y+r89AxUoaAar4JjrhUkVDt0o0Np6V8XbDQ= github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E= @@ -970,8 +970,9 @@ github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8/go.mod h1:4rbK1p9ILyIf github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM= github.com/pingcap/log v0.0.0-20210906054005-afc726e70354/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= -github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee h1:VO2t6IBpfvW34TdtD/G10VvnGqjLic1jzOuHjUb5VqM= github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= +github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8= +github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= github.com/pingcap/parser v0.0.0-20210415081931-48e7f467fd74/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw= github.com/pingcap/parser v0.0.0-20210525032559-c37778aff307/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw= github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= @@ -981,8 +982,8 @@ github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d/go.mod h1:7j18ezaW github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4 h1:HYbcxtnkN3s5tqrZ/z3eJS4j3Db8wMphEm1q10lY/TM= github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4/go.mod h1:sDCsM39cGiv2vwunZkaFA917vVkqDTGSPbbV7z4Oops= github.com/pingcap/tidb v1.1.0-beta.0.20211023132847-efa94595c071/go.mod h1:Ci7ABF58a4jn6YtaHi7655jP409edqC2JxWWFRqOubg= -github.com/pingcap/tidb v1.1.0-beta.0.20220412180037-d07b66ea638c h1:RmHIavggUwZGmsLghSnp9wVnU0hIdB593X8QBbEj6xU= -github.com/pingcap/tidb v1.1.0-beta.0.20220412180037-d07b66ea638c/go.mod h1:zGjyE0LdvI8GHLESbdpzrJyCwCrxFzNaFNTQywhM8+k= +github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b h1:Q8AC0l4GQdoHAXUiolE0xdiD/ofiuMOfKUK6YdeGaUY= +github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b/go.mod h1:luW4sIZoLHY3bCWuKqyqk2QgMvF+/M7nWOXf/me0+fY= github.com/pingcap/tidb-dashboard v0.0.0-20210312062513-eef5d6404638/go.mod h1:OzFN8H0EDMMqeulPhPMw2i2JaiZWOKFQ7zdRPhENNgo= github.com/pingcap/tidb-dashboard v0.0.0-20210716172320-2226872e3296/go.mod h1:OCXbZTBTIMRcIt0jFsuCakZP+goYRv6IjawKbwLS2TQ= github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba/go.mod h1:4hk/3owVGWdvI9Kx6yCqqvM1T5PVgwyQNyMQxD3rwfc= @@ -991,8 +992,8 @@ github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompa github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tidb/parser v0.0.0-20211011031125-9b13dc409c5e/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= github.com/pingcap/tidb/parser v0.0.0-20211023132847-efa94595c071/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= -github.com/pingcap/tidb/parser v0.0.0-20220412180037-d07b66ea638c h1:OqbwYJzjxL17LeUGr3R6QHKoF42ogpwiaGm7MafPePM= -github.com/pingcap/tidb/parser v0.0.0-20220412180037-d07b66ea638c/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= +github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725 h1:4PgJg9dmgiszTWkQBpXEzZKNEfexzpEvZEUaIKEzml4= +github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= github.com/pingcap/tipb v0.0.0-20211008080435-3fd327dfce0e/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609 h1:BiCS1ZRnW0szOvTAa3gCqWIhyo+hv83SVaBgrUghXIU= github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= @@ -1146,8 +1147,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df h1:rh3VYpfvzXRbJ90ymx1yfhGl/wq8ac2m/cUbao61kwY= +github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 h1:PyYN9JH5jY9j6av01SpfRMb+1DWg/i3MbGOKPxJ2wjM= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= @@ -1170,8 +1172,8 @@ github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJH github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tikv/client-go/v2 v2.0.0-alpha.0.20211011083157-49c8dd23f1f0/go.mod h1:00plYwQsQ5kBUmafHO+JkjznGgFaBokMZl82TZIbsQk= -github.com/tikv/client-go/v2 v2.0.1-0.20220406091203-f73ec0e675f4 h1:bi/tuV42dQCu7TTTOwHQW6cHVrV1fhet+Hzo5CUODBQ= -github.com/tikv/client-go/v2 v2.0.1-0.20220406091203-f73ec0e675f4/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= +github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869 h1:yOApqwZVzC1ne1v9Qc1OQtCe5Wtm1Vv6xqaOs6/y4NQ= +github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= github.com/tikv/pd v1.1.0-beta.0.20210323121136-78679e5e209d/go.mod h1:Jw9KG11C/23Rr7DW4XWQ7H5xOgGZo6DFL1OKAF4+Igw= github.com/tikv/pd v1.1.0-beta.0.20210818082359-acba1da0018d/go.mod h1:rammPjeZgpvfrQRPkijcx8tlxF1XM5+m6kRXrkDzCAA= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 h1:lIfIwqe1HPa0suhMpiI200nYxau+rXWXTqZxSGg1HS4= @@ -1398,8 +1400,9 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200513190911-00229845015e h1:rMqLP+9XLy+LdbCXHjJHAmTfXCr93W7oruWA6Hq1Alc= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1969,7 +1972,6 @@ modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk= modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/parser v1.0.0/go.mod h1:H20AntYJ2cHHL6MHthJ8LZzXCdDCHMWt1KZXtIMjejA= modernc.org/parser v1.0.2/go.mod h1:TXNq3HABP3HMaqLK7brD1fLA/LfN0KS6JxZn71QdDqs= diff --git a/pkg/sqlmodel/where_handle.go b/pkg/sqlmodel/where_handle.go index a4f36989304..e0fc3408a52 100644 --- a/pkg/sqlmodel/where_handle.go +++ b/pkg/sqlmodel/where_handle.go @@ -116,7 +116,7 @@ func getPKIsHandleIdx(ti *model.TableInfo) *model.IndexInfo { func allColsNotNull(idx *model.IndexInfo, cols []*model.ColumnInfo) bool { for _, idxCol := range idx.Columns { col := cols[idxCol.Offset] - if !mysql.HasNotNullFlag(col.Flag) { + if !mysql.HasNotNullFlag(col.GetFlag()) { return false } } diff --git a/tests/integration_tests/dailytest/db.go b/tests/integration_tests/dailytest/db.go index e3831054186..a26490742ad 100644 --- a/tests/integration_tests/dailytest/db.go +++ b/tests/integration_tests/dailytest/db.go @@ -219,9 +219,9 @@ func genRowData(table *table) (string, error) { func genColumnData(table *table, column *column) (string, error) { tp := column.tp _, isUnique := table.uniqIndices[column.name] - isUnsigned := mysql.HasUnsignedFlag(tp.Flag) + isUnsigned := mysql.HasUnsignedFlag(tp.GetFlag()) - switch tp.Tp { + switch tp.GetType() { case mysql.TypeTiny: var data int64 if isUnique { @@ -273,9 +273,9 @@ func genColumnData(table *table, column *column) (string, error) { case mysql.TypeVarchar, mysql.TypeString, mysql.TypeTinyBlob, mysql.TypeBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob: data := []byte{'\''} if isUnique { - data = append(data, []byte(column.data.uniqString(tp.Flen))...) + data = append(data, []byte(column.data.uniqString(tp.GetFlen()))...) } else { - data = append(data, []byte(randString(randInt(1, tp.Flen)))...) + data = append(data, []byte(randString(randInt(1, tp.GetFlen())))...) } data = append(data, '\'') diff --git a/tests/integration_tests/dailytest/job.go b/tests/integration_tests/dailytest/job.go index dd4c6aa6fc5..c6013162967 100644 --- a/tests/integration_tests/dailytest/job.go +++ b/tests/integration_tests/dailytest/job.go @@ -139,14 +139,9 @@ func doDDLProcess(table *table, db *sql.DB) { // do add column ddl index = randInt(2, len(table.columns)-1) colName := randString(5) - - col = &column{ - name: colName, - tp: &types.FieldType{ - Tp: mysql.TypeVarchar, - Flen: 45, - }, - } + tp := types.NewFieldType(mysql.TypeVarchar) + tp.SetFlen(45) + col = &column{name: colName, tp: tp} newCols := make([]*column, 0, len(table.columns)+1) newCols = append(newCols, table.columns[:index]...) From 7b0e8070b5b73be8da1f718d0f28f6d07d10af8e Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 11 May 2022 16:53:26 +0800 Subject: [PATCH 02/21] finish dm --- cdc/sink/codec/avro_test.go | 4 ++-- dm/syncer/ddl.go | 6 +++--- dm/syncer/dml.go | 6 +++--- dm/syncer/dml_test.go | 4 +++- dm/syncer/validate_worker.go | 2 +- dm/syncer/validate_worker_test.go | 16 ++++++++-------- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/cdc/sink/codec/avro_test.go b/cdc/sink/codec/avro_test.go index 2c969d8ccea..ecccb02e15e 100644 --- a/cdc/sink/codec/avro_test.go +++ b/cdc/sink/codec/avro_test.go @@ -72,12 +72,12 @@ func setBinChsClnFlag(ft *types.FieldType) *types.FieldType { } func setFlag(ft *types.FieldType, flag uint) *types.FieldType { - types.SetTypeFlag(&ft.Flag, flag, true) + ft.SetFlag(flag) return ft } func setElems(ft *types.FieldType, elems []string) *types.FieldType { - ft.GetElems() = elems + ft.SetElems(elems) return ft } diff --git a/dm/syncer/ddl.go b/dm/syncer/ddl.go index 9ec587263b6..9dd9169a71b 100644 --- a/dm/syncer/ddl.go +++ b/dm/syncer/ddl.go @@ -285,11 +285,11 @@ func adjustColumnsCollation(tctx *tcontext.Context, createStmt *ast.CreateTableS if fieldType.GetCollate() != "" { continue } - if fieldType.Charset != "" { + if fieldType.GetCharset() != "" { // just have charset - collation, ok := charsetAndDefaultCollationMap[strings.ToLower(fieldType.Charset)] + collation, ok := charsetAndDefaultCollationMap[strings.ToLower(fieldType.GetCharset())] if !ok { - tctx.L().Warn("not found charset default collation for column.", zap.String("table", createStmt.Table.Name.String()), zap.String("column", col.Name.String()), zap.String("charset", strings.ToLower(fieldType.Charset))) + tctx.L().Warn("not found charset default collation for column.", zap.String("table", createStmt.Table.Name.String()), zap.String("column", col.Name.String()), zap.String("charset", strings.ToLower(fieldType.GetCharset()))) continue } col.Options = append(col.Options, &ast.ColumnOption{Tp: ast.ColumnOptionCollate, StrValue: collation}) diff --git a/dm/syncer/dml.go b/dm/syncer/dml.go index 75f743df2fe..d2d247f29a6 100644 --- a/dm/syncer/dml.go +++ b/dm/syncer/dml.go @@ -71,9 +71,9 @@ func extractValueFromData(data []interface{}, columns []*model.ColumnInfo, sourc d = v.String() case string: // convert string to []byte so that go-sql-driver/mysql can use _binary'value' for DML - if columns[i].Charset == charset.CharsetGBK { + if columns[i].GetCharset() == charset.CharsetGBK { d = []byte(v) - } else if columns[i].Charset == "" && sourceTI.Charset == charset.CharsetGBK { + } else if columns[i].GetCharset() == "" && sourceTI.Charset == charset.CharsetGBK { d = []byte(v) } } @@ -265,7 +265,7 @@ RowLoop: } func castUnsigned(data interface{}, ft *types.FieldType) interface{} { - if !mysql.HasUnsignedFlag(ft.Flag) { + if !mysql.HasUnsignedFlag(ft.GetFlag()) { return data } diff --git a/dm/syncer/dml_test.go b/dm/syncer/dml_test.go index b6efe30695f..d625479bf61 100644 --- a/dm/syncer/dml_test.go +++ b/dm/syncer/dml_test.go @@ -64,7 +64,9 @@ func (s *testSyncerSuite) TestCastUnsigned(c *C) { for _, cs := range cases { ft := types.NewFieldType(cs.Type) if cs.unsigned { - ft.Flag |= mysql.UnsignedFlag + flag := ft.GetFlag() + flag |= mysql.UnsignedFlag + ft.SetFlag(flag) } obtained := castUnsigned(cs.data, ft) c.Assert(obtained, Equals, cs.expected) diff --git a/dm/syncer/validate_worker.go b/dm/syncer/validate_worker.go index 5f4ed479995..20688c78fe8 100644 --- a/dm/syncer/validate_worker.go +++ b/dm/syncer/validate_worker.go @@ -450,7 +450,7 @@ func (c *validateCompareContext) compareData(key string, sourceData, targetData str1, str2 := data1.String, data2.String if str1 == str2 { continue - } else if column.FieldType.Tp == tidbmysql.TypeFloat || column.FieldType.Tp == tidbmysql.TypeDouble { + } else if column.FieldType.GetType() == tidbmysql.TypeFloat || column.FieldType.GetType() == tidbmysql.TypeDouble { // source and target data have different precision? num1, err1 := strconv.ParseFloat(str1, 64) num2, err2 := strconv.ParseFloat(str2, 64) diff --git a/dm/syncer/validate_worker_test.go b/dm/syncer/validate_worker_test.go index ccc83825d40..18e3bacfc4f 100644 --- a/dm/syncer/validate_worker_test.go +++ b/dm/syncer/validate_worker_test.go @@ -323,7 +323,7 @@ func TestValidatorWorkerValidateTableChanges(t *testing.T) { func TestValidatorWorkerCompareData(t *testing.T) { compareContext := validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeLong}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeLong)}}, } eq, err := compareContext.compareData("", []*sql.NullString{{String: "1", Valid: true}}, []*sql.NullString{{Valid: false}}) require.NoError(t, err) @@ -331,7 +331,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeFloat}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeFloat)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "1.1", Valid: true}}, []*sql.NullString{{String: "1.x", Valid: true}}) require.Error(t, err) @@ -339,7 +339,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeFloat}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeFloat)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "1.1", Valid: true}}, []*sql.NullString{{String: "1.1000011", Valid: true}}) require.NoError(t, err) @@ -347,7 +347,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeFloat}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeFloat)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "1.1", Valid: true}}, []*sql.NullString{{String: "1.1000001", Valid: true}}) require.NoError(t, err) @@ -355,7 +355,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeDouble}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeDouble)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "1.1", Valid: true}}, []*sql.NullString{{String: "1.1000001", Valid: true}}) require.NoError(t, err) @@ -363,7 +363,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeLong}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeLong)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "1", Valid: true}}, []*sql.NullString{{String: "1", Valid: true}}) require.NoError(t, err) @@ -371,7 +371,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeVarchar}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeVarchar)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "aaa", Valid: true}}, []*sql.NullString{{String: "aaa", Valid: true}}) require.NoError(t, err) @@ -379,7 +379,7 @@ func TestValidatorWorkerCompareData(t *testing.T) { compareContext = validateCompareContext{ logger: log.L(), - columns: []*model.ColumnInfo{{FieldType: types.FieldType{Tp: mysql.TypeVarString}}}, + columns: []*model.ColumnInfo{{FieldType: *types.NewFieldType(mysql.TypeVarString)}}, } eq, err = compareContext.compareData("", []*sql.NullString{{String: "\x01\x02", Valid: true}}, []*sql.NullString{{String: "\x01\x02", Valid: true}}) require.NoError(t, err) From 390c7e04e909fb6bf3e3b2c2400972f5605cd25d Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 11 May 2022 17:21:11 +0800 Subject: [PATCH 03/21] save --- cdc/entry/mounter.go | 12 +-- cdc/model/schema_storage_test.go | 145 ++++++++++++++----------------- cdc/model/sink_test.go | 70 +++++++-------- cdc/sink/codec/interface_test.go | 6 +- 4 files changed, 108 insertions(+), 125 deletions(-) diff --git a/cdc/entry/mounter.go b/cdc/entry/mounter.go index 4d91a2dd699..76ef8d30401 100644 --- a/cdc/entry/mounter.go +++ b/cdc/entry/mounter.go @@ -273,8 +273,8 @@ func datum2Column(tableInfo *model.TableInfo, datums map[int64]types.Datum, fill colSize += size cols[tableInfo.RowColumnsOffset[colInfo.ID]] = &model.Column{ Name: colName, - Type: colInfo.Tp, - Charset: colInfo.Charset, + Type: colInfo.GetType(), + Charset: colInfo.GetCharset(), Value: colValue, Flag: tableInfo.ColumnsFlag[colInfo.ID], // ApproximateBytes = column data size + column struct size @@ -387,7 +387,7 @@ func formatColVal(datum types.Datum, col *timodel.ColumnInfo) ( if datum.IsNull() { return nil, 0, "", nil } - switch col.Tp { + switch col.GetType() { case mysql.TypeDate, mysql.TypeDatetime, mysql.TypeNewDate, mysql.TypeTimestamp: v := datum.GetMysqlTime().String() return v, sizeOfString(v), "", nil @@ -464,18 +464,18 @@ func getDefaultOrZeroValue(col *timodel.ColumnInfo) (interface{}, int, string, e return d.GetValue(), sizeOfDatum(d), "", nil } - if !mysql.HasNotNullFlag(col.Flag) { + if !mysql.HasNotNullFlag(col.GetFlag()) { // NOTICE: NotNullCheck need do after OriginDefaultValue check, as when TiDB meet "amend + add column default xxx", // ref: https://github.com/pingcap/ticdc/issues/3929 // must use null if TiDB not write the column value when default value is null // and the value is null, see https://github.com/pingcap/tidb/issues/9304 d = types.NewDatum(nil) } else { - switch col.Tp { + switch col.GetType() { case mysql.TypeEnum: // For enum type, if no default value and not null is set, // the default value is the first element of the enum list - d = types.NewDatum(col.FieldType.Elems[0]) + d = types.NewDatum(col.FieldType.GetElem(0)) case mysql.TypeString, mysql.TypeVarString, mysql.TypeVarchar: return emptyBytes, sizeOfEmptyBytes, "", nil default: diff --git a/cdc/model/schema_storage_test.go b/cdc/model/schema_storage_test.go index 7653f5164ba..ba4204b74ec 100644 --- a/cdc/model/schema_storage_test.go +++ b/cdc/model/schema_storage_test.go @@ -24,22 +24,20 @@ import ( func TestPKShouldBeInTheFirstPlaceWhenPKIsNotHandle(t *testing.T) { t.Parallel() + ft := parser_types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.NotNullFlag) tbl := timodel.TableInfo{ Columns: []*timodel.ColumnInfo{ { - Name: timodel.CIStr{O: "group"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "group"}, + FieldType: *ft, + State: timodel.StatePublic, }, { - Name: timodel.CIStr{O: "name"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "name"}, + FieldType: *ft, + State: timodel.StatePublic, }, { Name: timodel.CIStr{O: "id"}, @@ -96,7 +94,8 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsNotHandle(t *testing.T) { func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { t.Parallel() - + ft := parser_types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.NotNullFlag) tbl := timodel.TableInfo{ Indices: []*timodel.IndexInfo{ { @@ -114,19 +113,15 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { Name: timodel.CIStr{ O: "job", }, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + FieldType: *ft, + State: timodel.StatePublic, }, { Name: timodel.CIStr{ O: "uid", }, - FieldType: parser_types.FieldType{ - Flag: mysql.PriKeyFlag, - }, - State: timodel.StatePublic, + FieldType: *ft, + State: timodel.StatePublic, }, }, PKIsHandle: true, @@ -140,22 +135,19 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { func TestUniqueKeyIsHandle(t *testing.T) { t.Parallel() - + ft := parser_types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.NotNullFlag) tbl := timodel.TableInfo{ Columns: []*timodel.ColumnInfo{ { - Name: timodel.CIStr{O: "group"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "group"}, + FieldType: *ft, + State: timodel.StatePublic, }, { - Name: timodel.CIStr{O: "name"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "name"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, Indices: []*timodel.IndexInfo{ @@ -194,29 +186,28 @@ func TestUniqueKeyIsHandle(t *testing.T) { func TestHandleKeyPriority(t *testing.T) { t.Parallel() + ftNull := parser_types.NewFieldType(mysql.TypeUnspecified) + ftNull.SetFlag(mysql.NotNullFlag) + + ftNotNull := parser_types.NewFieldType(mysql.TypeUnspecified) + ftNotNull.SetFlag(mysql.NotNullFlag | mysql.MultipleKeyFlag) tbl := timodel.TableInfo{ Columns: []*timodel.ColumnInfo{ { - Name: timodel.CIStr{O: "a"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag | mysql.MultipleKeyFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "a"}, + FieldType: *ftNotNull, + State: timodel.StatePublic, }, { - Name: timodel.CIStr{O: "b"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag | mysql.MultipleKeyFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "b"}, + FieldType: *ftNotNull, + State: timodel.StatePublic, }, { - Name: timodel.CIStr{O: "c"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag | mysql.UniqueKeyFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "c"}, + FieldType: *ftNotNull, + State: timodel.StatePublic, }, { Name: timodel.CIStr{O: "d"}, @@ -227,11 +218,9 @@ func TestHandleKeyPriority(t *testing.T) { State: timodel.StatePublic, }, { - Name: timodel.CIStr{O: "e"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + Name: timodel.CIStr{O: "e"}, + FieldType: *ftNull, + State: timodel.StatePublic, // test virtual generated column is not treated as unique key GeneratedExprString: "as d", GeneratedStored: false, @@ -302,36 +291,37 @@ func TestHandleKeyPriority(t *testing.T) { func TestTableInfoGetterFuncs(t *testing.T) { t.Parallel() + ftNull := parser_types.NewFieldType(mysql.TypeUnspecified) + ftNull.SetFlag(mysql.NotNullFlag) + + ftNotNull := parser_types.NewFieldType(mysql.TypeUnspecified) + ftNotNull.SetFlag(mysql.NotNullFlag | mysql.MultipleKeyFlag) + + ftNotNullBinCharset := parser_types.NewFieldType(mysql.TypeUnspecified) + ftNotNullBinCharset.SetFlag(mysql.NotNullFlag | mysql.MultipleKeyFlag) + ftNotNullBinCharset.SetCharset("binary") + tbl := timodel.TableInfo{ ID: 1071, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ { - ID: 0, - Name: timodel.CIStr{O: "a"}, - FieldType: parser_types.FieldType{ - // test binary flag - Flag: mysql.NotNullFlag | mysql.BinaryFlag, - Charset: "binary", - }, - State: timodel.StatePublic, + ID: 0, + Name: timodel.CIStr{O: "a"}, + FieldType: *ftNotNullBinCharset, + State: timodel.StatePublic, }, { - ID: 1, - Name: timodel.CIStr{O: "b"}, - FieldType: parser_types.FieldType{ - // test unsigned flag - Flag: mysql.NotNullFlag | mysql.UnsignedFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "b"}, + FieldType: *ftNotNull, + State: timodel.StatePublic, }, { - ID: 2, - Name: timodel.CIStr{O: "c"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + ID: 2, + Name: timodel.CIStr{O: "c"}, + FieldType: *ftNull, + State: timodel.StatePublic, }, }, Indices: []*timodel.IndexInfo{ @@ -420,18 +410,17 @@ func TestTableInfoGetterFuncs(t *testing.T) { func TestTableInfoClone(t *testing.T) { t.Parallel() - + ft := parser_types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.NotNullFlag) tbl := timodel.TableInfo{ ID: 1071, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ { - ID: 0, - Name: timodel.CIStr{O: "c"}, - FieldType: parser_types.FieldType{ - Flag: mysql.NotNullFlag, - }, - State: timodel.StatePublic, + ID: 0, + Name: timodel.CIStr{O: "c"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, Indices: []*timodel.IndexInfo{ diff --git a/cdc/model/sink_test.go b/cdc/model/sink_test.go index e97d9fec46b..f47c1c057e7 100644 --- a/cdc/model/sink_test.go +++ b/cdc/model/sink_test.go @@ -178,7 +178,7 @@ func TestFromTiColumnInfo(t *testing.T) { col := &ColumnInfo{} col.FromTiColumnInfo(&timodel.ColumnInfo{ Name: timodel.CIStr{O: "col1"}, - FieldType: types.FieldType{Tp: 3}, + FieldType: *types.NewFieldType(mysql.TypeLong), }) require.Equal(t, "col1", col.Name) require.Equal(t, uint8(3), col.Type) @@ -186,6 +186,8 @@ func TestFromTiColumnInfo(t *testing.T) { func TestDDLEventFromJob(t *testing.T) { t.Parallel() + ft := types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.PriKeyFlag) job := &timodel.Job{ ID: 1071, TableID: 49, @@ -198,7 +200,7 @@ func TestDDLEventFromJob(t *testing.T) { ID: 49, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ - {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: types.FieldType{Flag: mysql.PriKeyFlag}, State: timodel.StatePublic}, + {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: *ft, State: timodel.StatePublic}, {ID: 2, Name: timodel.CIStr{O: "a"}, FieldType: types.FieldType{}, State: timodel.StatePublic}, }, }, @@ -215,7 +217,7 @@ func TestDDLEventFromJob(t *testing.T) { ID: 49, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ - {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: types.FieldType{Flag: mysql.PriKeyFlag}, State: timodel.StatePublic}, + {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: *ft, State: timodel.StatePublic}, }, }, } @@ -231,6 +233,8 @@ func TestDDLEventFromJob(t *testing.T) { } func TestDDLEventFromRenameTablesJob(t *testing.T) { + ft := types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.PriKeyFlag | mysql.UniqueFlag) job := &timodel.Job{ ID: 71, TableID: 69, @@ -246,12 +250,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t10"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, }, @@ -260,12 +262,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t20"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, }, @@ -284,12 +284,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, }, @@ -300,12 +298,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t10"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, } @@ -331,12 +327,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t2"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, }, @@ -347,12 +341,10 @@ func TestDDLEventFromRenameTablesJob(t *testing.T) { Name: timodel.CIStr{O: "t20"}, Columns: []*timodel.ColumnInfo{ { - ID: 1, - Name: timodel.CIStr{O: "id"}, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag | mysql.UniqueFlag, - }, - State: timodel.StatePublic, + ID: 1, + Name: timodel.CIStr{O: "id"}, + FieldType: *ft, + State: timodel.StatePublic, }, }, } diff --git a/cdc/sink/codec/interface_test.go b/cdc/sink/codec/interface_test.go index 5af0007270f..20153429a2d 100644 --- a/cdc/sink/codec/interface_test.go +++ b/cdc/sink/codec/interface_test.go @@ -56,6 +56,8 @@ func TestCreate(t *testing.T) { require.Equal(t, rowEvent.Table.Table, *msg.Table) require.Equal(t, config.ProtocolOpen, msg.Protocol) + ft := types.NewFieldType(0) + ft.SetFlag(mysql.PriKeyFlag) job := &timodel.Job{ ID: 1071, TableID: 49, @@ -68,7 +70,7 @@ func TestCreate(t *testing.T) { ID: 49, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ - {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: types.FieldType{Flag: mysql.PriKeyFlag}, State: timodel.StatePublic}, + {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: *ft, State: timodel.StatePublic}, {ID: 2, Name: timodel.CIStr{O: "a"}, FieldType: types.FieldType{}, State: timodel.StatePublic}, }, }, @@ -85,7 +87,7 @@ func TestCreate(t *testing.T) { ID: 49, Name: timodel.CIStr{O: "t1"}, Columns: []*timodel.ColumnInfo{ - {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: types.FieldType{Flag: mysql.PriKeyFlag}, State: timodel.StatePublic}, + {ID: 1, Name: timodel.CIStr{O: "id"}, FieldType: *ft, State: timodel.StatePublic}, }, }, } From 15f5ec52b710fd506ceddc45106b30944e6fed5e Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 11 May 2022 17:48:11 +0800 Subject: [PATCH 04/21] save work --- cdc/entry/mounter.go | 2 +- cdc/entry/mounter_test.go | 35 +++++++++++++++----------------- cdc/entry/schema_storage_test.go | 23 ++++++++++++--------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cdc/entry/mounter.go b/cdc/entry/mounter.go index 76ef8d30401..0c9343e5c23 100644 --- a/cdc/entry/mounter.go +++ b/cdc/entry/mounter.go @@ -481,7 +481,7 @@ func getDefaultOrZeroValue(col *timodel.ColumnInfo) (interface{}, int, string, e default: d = table.GetZeroValue(col) if d.IsNull() { - log.Error("meet unsupported column type", zap.String("columnInfo", col.String())) + log.Error("meet unsupported column type", zap.String("columnInfo", col.FieldType.String())) } } } diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index bbf5219f3ee..e8369b43bf6 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -440,6 +440,15 @@ func walkTableSpanInStore(t *testing.T, store tidbkv.Storage, tableID int64, f f func TestGetDefaultZeroValue(t *testing.T) { // Check following MySQL type, ref to: // https://github.com/pingcap/tidb/blob/master/parser/mysql/type.go + + // mysql flag null + ftNull := types.NewFieldType(mysql.TypeUnspecified) + ftNull.SetFlag(0) + + // mysql.TypeTiny + notnull + nodefault + ftTinyIntNotNull := types.NewFieldType(mysql.TypeTiny) + ftTinyIntNotNull.SetFlag(mysql.NotNullFlag) + testCases := []struct { Name string ColInfo timodel.ColumnInfo @@ -447,34 +456,22 @@ func TestGetDefaultZeroValue(t *testing.T) { }{ // mysql flag null { - Name: "mysql flag null", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Flag: uint(0), - }, - }, - Res: nil, + Name: "mysql flag null", + ColInfo: timodel.ColumnInfo{FieldType: *ftNull}, + Res: nil, }, // mysql.TypeTiny + notnull + nodefault { - Name: "mysql.TypeTiny + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeTiny + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNull}, + Res: int64(0), }, // mysql.TypeTiny + notnull + default { Name: "mysql.TypeTiny + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: -1314, - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTinyIntNotNull, }, Res: int64(-1314), }, diff --git a/cdc/entry/schema_storage_test.go b/cdc/entry/schema_storage_test.go index 8e737ffed52..bfbb79df942 100644 --- a/cdc/entry/schema_storage_test.go +++ b/cdc/entry/schema_storage_test.go @@ -478,13 +478,14 @@ func testDoDDLAndCheck(t *testing.T, snap *schema.Snapshot, job *timodel.Job, is } func TestPKShouldBeInTheFirstPlaceWhenPKIsNotHandle(t *testing.T) { + ft := types.NewFieldType(mysql.TypeUnspecified) + ft.SetFlag(mysql.NotNullFlag) + tblInfo := timodel.TableInfo{ Columns: []*timodel.ColumnInfo{ { - Name: timodel.CIStr{O: "name"}, - FieldType: types.FieldType{ - Flag: mysql.NotNullFlag, - }, + Name: timodel.CIStr{O: "name"}, + FieldType: *ft, }, {Name: timodel.CIStr{O: "id"}}, }, @@ -524,6 +525,12 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsNotHandle(t *testing.T) { } func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { + ftNotNUll := types.NewFieldType(mysql.TypeUnspecified) + ftNotNUll.SetFlag(mysql.NotNullFlag) + + ftPK := types.NewFieldType(mysql.TypeUnspecified) + ftPK.SetFlag(mysql.PriKeyFlag) + tblInfo := timodel.TableInfo{ Indices: []*timodel.IndexInfo{ { @@ -541,17 +548,13 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { Name: timodel.CIStr{ O: "job", }, - FieldType: types.FieldType{ - Flag: mysql.NotNullFlag, - }, + FieldType: *ftNotNUll, }, { Name: timodel.CIStr{ O: "uid", }, - FieldType: types.FieldType{ - Flag: mysql.PriKeyFlag, - }, + FieldType: *ftPK, }, }, PKIsHandle: true, From 29eaa6664a2b6f43cd9666f9078e32d67e25a39d Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Thu, 12 May 2022 10:10:56 +0800 Subject: [PATCH 05/21] finish cdc --- cdc/entry/mounter_test.go | 529 +++++++++++++++++--------------------- 1 file changed, 229 insertions(+), 300 deletions(-) diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index e8369b43bf6..9cfdc962e70 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -445,10 +445,136 @@ func TestGetDefaultZeroValue(t *testing.T) { ftNull := types.NewFieldType(mysql.TypeUnspecified) ftNull.SetFlag(0) - // mysql.TypeTiny + notnull + nodefault + // mysql.TypeTiny + notnull ftTinyIntNotNull := types.NewFieldType(mysql.TypeTiny) ftTinyIntNotNull.SetFlag(mysql.NotNullFlag) + // mysql.TypeTiny + notnull + unsigned + ftTinyIntNotNullUnSigned := types.NewFieldType(mysql.TypeTiny) + ftTinyIntNotNull.SetFlag(mysql.NotNullFlag | mysql.UnsignedFlag) + + // mysql.TypeTiny + null + ftTinyIntNull := types.NewFieldType(mysql.TypeTiny) + ftNull.SetFlag(0) + + // mysql.TypeShort + notnull + ftShortNotNull := types.NewFieldType(mysql.TypeShort) + ftShortNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeLong + notnull + ftLongNotNull := types.NewFieldType(mysql.TypeLong) + ftLongNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeLonglong + notnull + ftLongLongNotNull := types.NewFieldType(mysql.TypeLonglong) + ftLongLongNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeInt24 + notnull + ftInt24NotNull := types.NewFieldType(mysql.TypeInt24) + ftInt24NotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeFloat + notnull + ftTypeFloatNotNull := types.NewFieldType(mysql.TypeFloat) + ftTypeFloatNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeFloat + notnull + unsigned + ftTypeFloatNotNullUnSigned := types.NewFieldType(mysql.TypeFloat) + ftTypeFloatNotNullUnSigned.SetFlag(mysql.NotNullFlag | mysql.UnsignedFlag) + + // mysql.TypeFloat + null + ftTypeFloatNull := types.NewFieldType(mysql.TypeFloat) + ftTypeFloatNull.SetFlag(0) + + // mysql.TypeDouble + notnull + ftTypeDoubleNotNull := types.NewFieldType(mysql.TypeDouble) + ftTypeDoubleNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeNewDecimal + notnull + ftTypeNewDecimalNotNull := types.NewFieldType(mysql.TypeNewDecimal) + ftTypeNewDecimalNotNull.SetFlag(mysql.NotNullFlag) + ftTypeNewDecimalNotNull.SetFlen(5) + ftTypeNewDecimalNotNull.SetDecimal(2) + + // mysql.TypeNull + ftTypeNull := types.NewFieldType(mysql.TypeNull) + + // mysql.TypeTimestamp + notnull + ftTypeTimestampNotNull := types.NewFieldType(mysql.TypeTimestamp) + ftTypeTimestampNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeTimestamp + notnull + ftTypeTimestampNull := types.NewFieldType(mysql.TypeTimestamp) + ftTypeTimestampNull.SetFlag(0) + + // mysql.TypeDate + notnull + ftTypeDateNotNull := types.NewFieldType(mysql.TypeDate) + ftTypeDateNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeDuration + notnull + ftTypeDurationNotNull := types.NewFieldType(mysql.TypeDuration) + ftTypeDurationNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeDatetime + notnull + ftTypeDatetimeNotNull := types.NewFieldType(mysql.TypeDatetime) + ftTypeDatetimeNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeYear + notnull + ftTypeYearNotNull := types.NewFieldType(mysql.TypeYear) + ftTypeYearNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeNewDate + notnull + ftTypeNewDateNotNull := types.NewFieldType(mysql.TypeNewDate) + ftTypeNewDateNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeVarchar + notnull + ftTypeVarcharNotNull := types.NewFieldType(mysql.TypeVarchar) + ftTypeVarcharNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeTinyBlob + notnull + ftTypeTinyBlobNotNull := types.NewFieldType(mysql.TypeTinyBlob) + ftTypeTinyBlobNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeMediumBlob + notnull + ftTypeMediumBlobNotNull := types.NewFieldType(mysql.TypeMediumBlob) + ftTypeMediumBlobNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeLongBlob + notnull + ftTypeLongBlobNotNull := types.NewFieldType(mysql.TypeLongBlob) + ftTypeLongBlobNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeBlob + notnull + ftTypeBlobNotNull := types.NewFieldType(mysql.TypeBlob) + ftTypeBlobNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeVarString + notnull + ftTypeVarStringNotNull := types.NewFieldType(mysql.TypeVarString) + ftTypeVarStringNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeString + notnull + ftTypeStringNotNull := types.NewFieldType(mysql.TypeString) + ftTypeStringNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeBit + notnull + ftTypeBitNotNull := types.NewFieldType(mysql.TypeBit) + ftTypeBitNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeJSON + notnull + ftTypeJSONNotNull := types.NewFieldType(mysql.TypeJSON) + ftTypeJSONNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeEnum + notnull + nodefault + ftTypeEnumNotNull := types.NewFieldType(mysql.TypeEnum) + ftTypeEnumNotNull.SetFlag(mysql.NotNullFlag) + ftTypeEnumNotNull.SetElems([]string{"e0", "e1"}) + + // mysql.TypeSet + notnull + ftTypeSetNotNull := types.NewFieldType(mysql.TypeSet) + ftTypeSetNotNull.SetFlag(mysql.NotNullFlag) + + // mysql.TypeGeometry + notnull + ftTypeGeometryNotNull := types.NewFieldType(mysql.TypeGeometry) + ftTypeGeometryNotNull.SetFlag(mysql.NotNullFlag) + testCases := []struct { Name string ColInfo timodel.ColumnInfo @@ -477,114 +603,67 @@ func TestGetDefaultZeroValue(t *testing.T) { }, // mysql.TypeTiny + notnull + default + unsigned { - Name: "mysql.TypeTiny + notnull + default + unsigned", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: mysql.NotNullFlag | mysql.UnsignedFlag, - }, - }, - Res: uint64(0), + Name: "mysql.TypeTiny + notnull + default + unsigned", + ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNullUnSigned}, + Res: uint64(0), }, // mysql.TypeTiny + notnull + unsigned { - Name: "mysql.TypeTiny + notnull + unsigned", - ColInfo: timodel.ColumnInfo{ - OriginDefaultValue: uint64(1314), - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: mysql.NotNullFlag | mysql.UnsignedFlag, - }, - }, - Res: uint64(1314), + Name: "mysql.TypeTiny + notnull + unsigned", + ColInfo: timodel.ColumnInfo{OriginDefaultValue: uint64(1314), FieldType: *ftTinyIntNotNullUnSigned}, + Res: uint64(1314), }, // mysql.TypeTiny + null + default { Name: "mysql.TypeTiny + null + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: -1314, - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: uint(0), - }, + FieldType: *ftTinyIntNull, }, Res: int64(-1314), }, // mysql.TypeTiny + null + nodefault { - Name: "mysql.TypeTiny + null + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeTiny, - Flag: uint(0), - }, - }, - Res: nil, + Name: "mysql.TypeTiny + null + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNull}, + Res: nil, }, // mysql.TypeShort, others testCases same as tiny { - Name: "mysql.TypeShort, others testCases same as tiny", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeShort, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeShort, others testCases same as tiny", + ColInfo: timodel.ColumnInfo{FieldType: *ftShortNotNull}, + Res: int64(0), }, // mysql.TypeLong, others testCases same as tiny { - Name: "mysql.TypeLong, others testCases same as tiny", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeLong, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeLong, others testCases same as tiny", + ColInfo: timodel.ColumnInfo{FieldType: *ftLongNotNull}, + Res: int64(0), }, // mysql.TypeLonglong, others testCases same as tiny { - Name: "mysql.TypeLonglong, others testCases same as tiny", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeLonglong, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeLonglong, others testCases same as tiny", + ColInfo: timodel.ColumnInfo{FieldType: *ftLongLongNotNull}, + Res: int64(0), }, // mysql.TypeInt24, others testCases same as tiny { - Name: "mysql.TypeInt24, others testCases same as tiny", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeInt24, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeInt24, others testCases same as tiny", + ColInfo: timodel.ColumnInfo{FieldType: *ftInt24NotNull}, + Res: int64(0), }, // mysql.TypeFloat + notnull + nodefault { - Name: "mysql.TypeFloat + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: mysql.NotNullFlag, - }, - }, - Res: float64(0), + Name: "mysql.TypeFloat + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeFloatNotNull}, + Res: float64(0), }, // mysql.TypeFloat + notnull + default { Name: "mysql.TypeFloat + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: -3.1415, - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeFloatNotNull, }, Res: float64(-3.1415), }, @@ -593,10 +672,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeFloat + notnull + default + unsigned", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: 3.1415, - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: mysql.NotNullFlag | mysql.UnsignedFlag, - }, + FieldType: *ftTypeFloatNotNullUnSigned, }, Res: float64(3.1415), }, @@ -604,10 +680,7 @@ func TestGetDefaultZeroValue(t *testing.T) { { Name: "mysql.TypeFloat + notnull + unsigned", ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: mysql.NotNullFlag | mysql.UnsignedFlag, - }, + FieldType: *ftTypeFloatNotNullUnSigned, }, Res: float64(0), }, @@ -616,10 +689,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeFloat + null + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: -3.1415, - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: uint(0), - }, + FieldType: *ftTypeFloatNull, }, Res: float64(-3.1415), }, @@ -627,94 +697,55 @@ func TestGetDefaultZeroValue(t *testing.T) { { Name: "mysql.TypeFloat + null + nodefault", ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeFloat, - Flag: uint(0), - }, + FieldType: *ftTypeFloatNull, }, Res: nil, }, // mysql.TypeDouble, other testCases same as float { - Name: "mysql.TypeDouble, other testCases same as float", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeDouble, - Flag: mysql.NotNullFlag, - }, - }, - Res: float64(0), + Name: "mysql.TypeDouble, other testCases same as float", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDoubleNotNull}, + Res: float64(0), }, // mysql.TypeNewDecimal + notnull + nodefault { - Name: "mysql.TypeNewDecimal + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeNewDecimal, - Flag: mysql.NotNullFlag, - Flen: 5, - Decimal: 2, - }, - }, - Res: "0", // related with Flen and Decimal + Name: "mysql.TypeNewDecimal + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNotNull}, + Res: "0", // related with Flen and Decimal }, // mysql.TypeNewDecimal + null + nodefault { - Name: "mysql.TypeNewDecimal + null + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeNewDecimal, - Flag: uint(0), - Flen: 5, - Decimal: 2, - }, - }, - Res: nil, + Name: "mysql.TypeNewDecimal + null + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNotNull}, + Res: nil, }, // mysql.TypeNewDecimal + null + default { Name: "mysql.TypeNewDecimal + null + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "-3.14", // no float - FieldType: types.FieldType{ - Tp: mysql.TypeNewDecimal, - Flag: uint(0), - Flen: 5, - Decimal: 2, - }, + FieldType: *ftTypeNewDecimalNotNull, }, Res: "-3.14", }, // mysql.TypeNull { - Name: "mysql.TypeNull", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeNull, - }, - }, - Res: nil, + Name: "mysql.TypeNull", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNull}, + Res: nil, }, // mysql.TypeTimestamp + notnull + nodefault { - Name: "mysql.TypeTimestamp + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeTimestamp, - Flag: mysql.NotNullFlag, - }, - }, - Res: "0000-00-00 00:00:00", + Name: "mysql.TypeTimestamp + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeTimestampNotNull}, + Res: "0000-00-00 00:00:00", }, // mysql.TypeTimestamp + notnull + default { Name: "mysql.TypeTimestamp + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "2020-11-19 12:12:12", - FieldType: types.FieldType{ - Tp: mysql.TypeTimestamp, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeTimestampNotNull, }, Res: "2020-11-19 12:12:12", }, @@ -723,204 +754,119 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeTimestamp + null + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "2020-11-19 12:12:12", - FieldType: types.FieldType{ - Tp: mysql.TypeTimestamp, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeTimestampNull, }, Res: "2020-11-19 12:12:12", }, // mysql.TypeDate, other testCases same as TypeTimestamp { - Name: "mysql.TypeDate, other testCases same as TypeTimestamp", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeDate, - Flag: mysql.NotNullFlag, - }, - }, - Res: "0000-00-00", + Name: "mysql.TypeDate, other testCases same as TypeTimestamp", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDateNotNull}, + Res: "0000-00-00", }, // mysql.TypeDuration, other testCases same as TypeTimestamp { - Name: "mysql.TypeDuration, other testCases same as TypeTimestamp", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeDuration, - Flag: mysql.NotNullFlag, - }, - }, - Res: "00:00:00", + Name: "mysql.TypeDuration, other testCases same as TypeTimestamp", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDurationNotNull}, + Res: "00:00:00", }, // mysql.TypeDatetime, other testCases same as TypeTimestamp { - Name: "mysql.TypeDatetime, other testCases same as TypeTimestamp", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeDatetime, - Flag: mysql.NotNullFlag, - }, - }, - Res: "0000-00-00 00:00:00", + Name: "mysql.TypeDatetime, other testCases same as TypeTimestamp", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDatetimeNotNull}, + Res: "0000-00-00 00:00:00", }, // mysql.TypeYear + notnull + nodefault { - Name: "mysql.TypeYear + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeYear, - Flag: mysql.NotNullFlag, - }, - }, - Res: int64(0), + Name: "mysql.TypeYear + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeYearNotNull}, + Res: int64(0), }, // mysql.TypeYear + notnull + default { Name: "mysql.TypeYear + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "2021", - FieldType: types.FieldType{ - Tp: mysql.TypeYear, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeYearNotNull, }, // TypeYear default value will be a string and then translate to []byte Res: "2021", }, // mysql.TypeNewDate { - Name: "mysql.TypeNewDate", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeNewDate, - Flag: mysql.NotNullFlag, - }, - }, - Res: nil, // [TODO] seems not support by TiDB, need check + Name: "mysql.TypeNewDate", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDateNotNull}, + Res: nil, // [TODO] seems not support by TiDB, need check }, // mysql.TypeVarchar + notnull + nodefault { - Name: "mysql.TypeVarchar + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeVarchar, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeVarchar + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeVarcharNotNull}, + Res: []byte{}, }, // mysql.TypeVarchar + notnull + default { Name: "mysql.TypeVarchar + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "e0", - FieldType: types.FieldType{ - Tp: mysql.TypeVarchar, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeVarcharNotNull, }, // TypeVarchar default value will be a string and then translate to []byte Res: "e0", }, // mysql.TypeTinyBlob { - Name: "mysql.TypeTinyBlob", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeTinyBlob, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeTinyBlob", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeTinyBlobNotNull}, + Res: []byte{}, }, // mysql.TypeMediumBlob { - Name: "mysql.TypeMediumBlob", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeMediumBlob, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeMediumBlob", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeMediumBlobNotNull}, + Res: []byte{}, }, // mysql.TypeLongBlob { - Name: "mysql.TypeLongBlob", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeLongBlob, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeLongBlob", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeLongBlobNotNull}, + Res: []byte{}, }, // mysql.TypeBlob { - Name: "mysql.TypeBlob", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeBlob, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeBlob", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeBlobNotNull}, + Res: []byte{}, }, // mysql.TypeVarString { - Name: "mysql.TypeVarString", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeVarString, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeVarString", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeVarStringNotNull}, + Res: []byte{}, }, // mysql.TypeString { - Name: "mysql.TypeString", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeString, - Flag: mysql.NotNullFlag, - }, - }, - Res: []byte{}, + Name: "mysql.TypeString", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeStringNotNull}, + Res: []byte{}, }, // mysql.TypeBit { - Name: "mysql.TypeBit", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Flag: mysql.NotNullFlag, - Tp: mysql.TypeBit, - }, - }, - Res: uint64(0), + Name: "mysql.TypeBit", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeBitNotNull}, + Res: uint64(0), }, // BLOB, TEXT, GEOMETRY or JSON column can't have a default value // mysql.TypeJSON { - Name: "mysql.TypeJSON", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeJSON, - Flag: mysql.NotNullFlag, - }, - }, - Res: "null", + Name: "mysql.TypeJSON", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeJSONNotNull}, + Res: "null", }, // mysql.TypeEnum + notnull + nodefault { - Name: "mysql.TypeEnum + notnull + nodefault", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeEnum, - Flag: mysql.NotNullFlag, - Elems: []string{"e0", "e1"}, - }, - }, + Name: "mysql.TypeEnum + notnull + nodefault", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeEnumNotNull}, // TypeEnum value will be a string and then translate to []byte // NotNull && no default will choose first element Res: uint64(0), @@ -930,49 +876,32 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeEnum + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "e1", - FieldType: types.FieldType{ - Tp: mysql.TypeEnum, - Flag: mysql.NotNullFlag, - Elems: []string{"e0", "e1"}, - }, + FieldType: *ftTypeEnumNotNull, }, // TypeEnum default value will be a string and then translate to []byte Res: "e1", }, // mysql.TypeSet + notnull { - Name: "mysql.TypeSet + notnull", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeSet, - Flag: mysql.NotNullFlag, - }, - }, - Res: uint64(0), + Name: "mysql.TypeSet + notnull", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeSetNotNull}, + Res: uint64(0), }, // mysql.TypeSet + notnull + default { Name: "mysql.TypeSet + notnull + default", ColInfo: timodel.ColumnInfo{ OriginDefaultValue: "1,e", - FieldType: types.FieldType{ - Tp: mysql.TypeSet, - Flag: mysql.NotNullFlag, - }, + FieldType: *ftTypeSetNotNull, }, // TypeSet default value will be a string and then translate to []byte Res: "1,e", }, // mysql.TypeGeometry { - Name: "mysql.TypeGeometry", - ColInfo: timodel.ColumnInfo{ - FieldType: types.FieldType{ - Tp: mysql.TypeGeometry, - Flag: mysql.NotNullFlag, - }, - }, - Res: nil, // not support yet + Name: "mysql.TypeGeometry", + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeGeometryNotNull}, + Res: nil, // not support yet }, } From bf1d7b6fc01fa580ef8cebda0963740c22be745b Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Tue, 17 May 2022 10:55:36 +0800 Subject: [PATCH 06/21] update mod --- go.mod | 70 ++++++++++++++++---------------- go.sum | 125 +++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 116 insertions(+), 79 deletions(-) diff --git a/go.mod b/go.mod index 173423c883d..8f5c02e5355 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/google/btree v1.0.1 github.com/google/go-cmp v0.5.7 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 - github.com/google/uuid v1.1.2 + github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -48,12 +48,12 @@ require ( github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0 github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 - github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73 + github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453 github.com/pingcap/log v1.1.0 - github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b - github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompatible - github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725 - github.com/prometheus/client_golang v1.11.0 + github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607 + github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible + github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607 + github.com/prometheus/client_golang v1.12.2 github.com/prometheus/client_model v0.2.0 github.com/r3labs/diff v1.1.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 @@ -66,7 +66,7 @@ require ( github.com/swaggo/gin-swagger v1.2.0 github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476 github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 - github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869 + github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101 github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710 github.com/tinylib/msgp v1.1.6 @@ -83,9 +83,9 @@ require ( go.uber.org/goleak v1.1.12 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f + golang.org/x/net v0.0.0-20220516155154-20f960328961 + golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 + golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a golang.org/x/text v0.3.7 golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 golang.org/x/tools v0.1.10 // indirect @@ -108,8 +108,6 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.2.0 // indirect github.com/DataDog/zstd v1.4.6-0.20210211175136-c6db21d202f4 // indirect github.com/KyleBanks/depth v1.2.1 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/VividCortex/ewma v1.1.1 // indirect github.com/apache/pulsar-client-go/oauth2 v0.0.0-20201120111947-b8bd55bc02bd // indirect github.com/apache/thrift v0.13.1-0.20201008052519-daf620915714 // indirect @@ -131,7 +129,7 @@ require ( github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8 // indirect github.com/danieljoos/wincred v1.0.2 // indirect - github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37 // indirect + github.com/danjacques/gofslock v0.0.0-20220131014315-6e321f4509c8 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/ristretto v0.1.1-0.20220403145359-8e850b710d6d // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect @@ -141,13 +139,14 @@ require ( github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.3 // indirect - github.com/go-openapi/spec v0.19.4 // indirect - github.com/go-openapi/swag v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/spec v0.20.6 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-playground/validator/v10 v10.9.0 // indirect @@ -173,7 +172,8 @@ require ( github.com/jedib0t/go-pretty/v6 v6.2.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df // indirect - github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/jonboulle/clockwork v0.3.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/klauspost/compress v1.15.1 // indirect @@ -183,21 +183,21 @@ require ( github.com/labstack/echo/v4 v4.2.1 // indirect github.com/labstack/gommon v0.3.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect + github.com/lufia/plan9stats v0.0.0-20220326011226-f1430873d8db // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mattn/go-runewidth v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-sqlite3 v2.0.2+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/ncw/directio v1.0.5 // indirect - github.com/ngaut/log v0.0.0-20180314031856-b8e36e7ba5ac // indirect + github.com/ngaut/log v0.0.0-20210830112240-0124ec040aeb // indirect github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 // indirect github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef // indirect - github.com/opentracing/basictracer-go v1.0.0 // indirect + github.com/opentracing/basictracer-go v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/philhofer/fwd v1.1.1 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect @@ -205,19 +205,19 @@ require ( github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059 // indirect github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4 // indirect - github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609 // indirect + github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188 // indirect github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect + github.com/prometheus/common v0.34.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect - github.com/shirou/gopsutil/v3 v3.21.12 // indirect + github.com/shirou/gopsutil/v3 v3.22.4 // indirect github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 // indirect github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect @@ -227,11 +227,11 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/stretchr/objx v0.2.0 // indirect github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 // indirect - github.com/tklauser/go-sysconf v0.3.9 // indirect - github.com/tklauser/numcpus v0.3.0 // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.4.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/twmb/murmur3 v1.1.3 // indirect - github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ugorji/go/codec v1.2.6 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect @@ -257,13 +257,13 @@ require ( go.opentelemetry.io/otel/trace v0.20.0 // indirect go.opentelemetry.io/proto/otlp v0.7.0 // indirect golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect - golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/exp v0.0.0-20220516143420-24438e51023a // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect google.golang.org/api v0.69.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/go.sum b/go.sum index ef30f91ba57..5913763e87b 100644 --- a/go.sum +++ b/go.sum @@ -92,9 +92,7 @@ github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6Xge github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.3.0/go.mod h1:zbo6Pv/28e21Z8CzzqgYRArQYGYtjONRxaAKGxzQvG4= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -253,8 +251,9 @@ github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0 github.com/cznic/y v0.0.0-20170802143616-045f81c6662a/go.mod h1:1rk5VM7oSnA4vjp+hrLQ3HWHa+Y4yPCa3/CsJrcNnvs= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37 h1:X6mKGhCFOxrKeeHAjv/3UvT6e5RRxW6wRdlqlV6/H4w= github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37/go.mod h1:DC3JtzuG7kxMvJ6dZmf2ymjNyoXwgtklr7FN+Um2B0U= +github.com/danjacques/gofslock v0.0.0-20220131014315-6e321f4509c8 h1:+4P40F8AqFAW4/ft2WXiZXrgtRbS8RLb61D8e6NcMw0= +github.com/danjacques/gofslock v0.0.0-20220131014315-6e321f4509c8/go.mod h1:VT5Ecrx/r1oHkQbiEBwkLiuQ51igUBmxXuiw9tnSLqY= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -334,7 +333,8 @@ github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebP github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsouza/fake-gcs-server v1.19.0 h1:XyaGOlqo+R5sjT03x2ymk0xepaQlgwhRLTT2IopW0zA= github.com/fsouza/fake-gcs-server v1.19.0/go.mod h1:JtXHY/QzHhtyIxsNfIuQ+XgHtRb5B/w8nqbL5O8zqo0= github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= @@ -371,9 +371,11 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-mysql-org/go-mysql v1.4.1-0.20220221114137-89145541e0d4 h1:6AopLIKxyLXWY8PRxIq0q33BedlkNNcJfgJSBZh6Bks= @@ -389,15 +391,19 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= @@ -547,8 +553,9 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -697,9 +704,12 @@ github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwA github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df h1:Zrb0IbuLOGHL7nrO2WrcuNWgDTlzFv3zY69QMx4ggQE= github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df/go.mod h1:mAVCUAYtW9NG31eB30umMSLKcDt6mCUWSjoSn5qBh0k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= +github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -787,14 +797,17 @@ github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/ github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lufia/plan9stats v0.0.0-20220326011226-f1430873d8db h1:m2s7Fwo4OwmcheIWUc/Nw9/MZ0eFtP3to0ovTpqOiCQ= +github.com/lufia/plan9stats v0.0.0-20220326011226-f1430873d8db/go.mod h1:VgrrWVwBO2+6XKn8ypT3WUqvoxCa8R2M5to2tRzGovI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -820,8 +833,9 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= @@ -872,8 +886,9 @@ github.com/ncw/directio v1.0.4/go.mod h1:CKGdcN7StAaqjT7Qack3lAXeX4pjnyc46YeqZH1 github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4= github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/ngaut/log v0.0.0-20180314031856-b8e36e7ba5ac h1:wyheT2lPXRQqYPWY2IVW5BTLrbqCsnhL61zK2R5goLA= github.com/ngaut/log v0.0.0-20180314031856-b8e36e7ba5ac/go.mod h1:ueVCjKQllPmX7uEvCYnZD5b8qjidGf1TCH61arVe4SU= +github.com/ngaut/log v0.0.0-20210830112240-0124ec040aeb h1:XL3Y/FWIBw1bONrCJwXH+JWCI+usIo9EoaHRQNeJoPo= +github.com/ngaut/log v0.0.0-20210830112240-0124ec040aeb/go.mod h1:ueVCjKQllPmX7uEvCYnZD5b8qjidGf1TCH61arVe4SU= github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdcNTgsos+vFzULLwyElndwn+5c= github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7/go.mod h1:iWMfgwqYW+e8n5lC/jjNEhwcjbRDpl5NT7n2h+4UNcI= github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef h1:K0Fn+DoFqNqktdZtdV3bPQ/0cuYh2H4rkg0tytX/07k= @@ -903,8 +918,9 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= +github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -962,8 +978,8 @@ github.com/pingcap/kvproto v0.0.0-20210915062418-0f5764a128ad/go.mod h1:IOdRDPLy github.com/pingcap/kvproto v0.0.0-20220228094105-9bb22e5a97fc/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220304032058-ccd676426a27/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= -github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73 h1:jKixsi6Iw00hL0+o23hmr8BNzlsQP9pShHTOwyuf/Os= -github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453 h1:Zm7MOLXFWsxLORJu2euSTQhfpnwTwsJKb7E8F6ukRCo= +github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= @@ -982,21 +998,21 @@ github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d/go.mod h1:7j18ezaW github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4 h1:HYbcxtnkN3s5tqrZ/z3eJS4j3Db8wMphEm1q10lY/TM= github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4/go.mod h1:sDCsM39cGiv2vwunZkaFA917vVkqDTGSPbbV7z4Oops= github.com/pingcap/tidb v1.1.0-beta.0.20211023132847-efa94595c071/go.mod h1:Ci7ABF58a4jn6YtaHi7655jP409edqC2JxWWFRqOubg= -github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b h1:Q8AC0l4GQdoHAXUiolE0xdiD/ofiuMOfKUK6YdeGaUY= -github.com/pingcap/tidb v1.1.0-beta.0.20220511072035-ed9e72a4518b/go.mod h1:luW4sIZoLHY3bCWuKqyqk2QgMvF+/M7nWOXf/me0+fY= +github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607 h1:/0sO//UefHNz+aUSwuh2FyBz/TVka6Wg3EoIpqk7qbo= +github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607/go.mod h1:D8sZJ0Dy+My380Rq8FXgOk+B1tvekM2QbTNlxnb4wNs= github.com/pingcap/tidb-dashboard v0.0.0-20210312062513-eef5d6404638/go.mod h1:OzFN8H0EDMMqeulPhPMw2i2JaiZWOKFQ7zdRPhENNgo= github.com/pingcap/tidb-dashboard v0.0.0-20210716172320-2226872e3296/go.mod h1:OCXbZTBTIMRcIt0jFsuCakZP+goYRv6IjawKbwLS2TQ= github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba/go.mod h1:4hk/3owVGWdvI9Kx6yCqqvM1T5PVgwyQNyMQxD3rwfc= github.com/pingcap/tidb-tools v5.0.3+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= -github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompatible h1:gmBthrqxfjHTLUpbS+PYIEVvSrlyip8s45JpUdWQwQ4= -github.com/pingcap/tidb-tools v6.0.0-alpha.0.20220317013353-dfc5146f4746+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= +github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible h1:dAfZKHR4Wu3bdFDNDsH2c4fWrkqbkgVlwY5pC4Nmp6Q= +github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tidb/parser v0.0.0-20211011031125-9b13dc409c5e/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= github.com/pingcap/tidb/parser v0.0.0-20211023132847-efa94595c071/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= -github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725 h1:4PgJg9dmgiszTWkQBpXEzZKNEfexzpEvZEUaIKEzml4= -github.com/pingcap/tidb/parser v0.0.0-20220511034434-48e94a18f725/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= +github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607 h1:wtjxwH1O/WdvmVojeP5jbhzymDc8iNktT3Lu5r729YE= +github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= github.com/pingcap/tipb v0.0.0-20211008080435-3fd327dfce0e/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= -github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609 h1:BiCS1ZRnW0szOvTAa3gCqWIhyo+hv83SVaBgrUghXIU= -github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= +github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188 h1:+46isFI9fR9R+nJVDMI55tCC/TCwp+bvVA4HLGEv1rY= +github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -1009,8 +1025,9 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -1019,8 +1036,10 @@ github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQ github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1035,8 +1054,9 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1044,8 +1064,9 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/r3labs/diff v1.1.0 h1:V53xhrbTHrWFWq3gI4b94AjgEJOerO1+1l0xyHOBi8M= github.com/r3labs/diff v1.1.0/go.mod h1:7WjXasNzi0vJetRcB/RqNl5dlIsmXcTTLmF5IoH6Xig= @@ -1086,8 +1107,9 @@ github.com/shhdgit/testfixtures/v3 v3.6.2-0.20211219171712-c4f264d673d3/go.mod h github.com/shirou/gopsutil v2.19.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.2+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.3+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= +github.com/shirou/gopsutil/v3 v3.22.4 h1:srAQaiX6jX/cYL6q29aE0m8lOskT9CurZ9N61YR3yoI= +github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.3.0 h1:KK3gWIXskZ2O1U/JNTisNcvH+jveJxZYrjbTsrbbnh8= @@ -1148,6 +1170,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df h1:rh3VYpfvzXRbJ90ymx1yfhGl/wq8ac2m/cUbao61kwY= github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -1172,8 +1195,8 @@ github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJH github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tikv/client-go/v2 v2.0.0-alpha.0.20211011083157-49c8dd23f1f0/go.mod h1:00plYwQsQ5kBUmafHO+JkjznGgFaBokMZl82TZIbsQk= -github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869 h1:yOApqwZVzC1ne1v9Qc1OQtCe5Wtm1Vv6xqaOs6/y4NQ= -github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= +github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101 h1:LEdgY/R6ir0V7mSuNW2m7ZgS0hbmBhsnnrLOxoBoC74= +github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= github.com/tikv/pd v1.1.0-beta.0.20210323121136-78679e5e209d/go.mod h1:Jw9KG11C/23Rr7DW4XWQ7H5xOgGZo6DFL1OKAF4+Igw= github.com/tikv/pd v1.1.0-beta.0.20210818082359-acba1da0018d/go.mod h1:rammPjeZgpvfrQRPkijcx8tlxF1XM5+m6kRXrkDzCAA= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 h1:lIfIwqe1HPa0suhMpiI200nYxau+rXWXTqZxSGg1HS4= @@ -1183,11 +1206,13 @@ github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710/go.mod h1:AtvppPwki github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw= github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1197,8 +1222,9 @@ github.com/twmb/murmur3 v1.1.3 h1:D83U0XYKcHRYwYIpBKf3Pks91Z0Byda/9SJ8B6EMRcA= github.com/twmb/murmur3 v1.1.3/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -1401,8 +1427,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20220516143420-24438e51023a h1:tiLLxEjKNE6Hrah/Dp/cyHvsyjDLcMFSocOHO5XDmOM= +golang.org/x/exp v0.0.0-20220516143420-24438e51023a/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1466,6 +1492,7 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -1492,8 +1519,10 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220516155154-20f960328961 h1:+W/iTMPG0EL7aW+/atntZwZrvSRIj3m3yX414dSULUU= +golang.org/x/net v0.0.0-20220516155154-20f960328961/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1509,8 +1538,9 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1521,8 +1551,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1618,13 +1649,16 @@ golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f h1:8w7RhxzTVgUzw/AH/9mUV5q0vMgy40SQRursCcfmkCw= -golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a h1:N2T1jUrTQE9Re6TFF5PhvEHXHCguynGhKjWVsIUt5cY= +golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1733,8 +1767,9 @@ golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= @@ -1904,8 +1939,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= @@ -1949,6 +1985,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.0.6/go.mod h1:KdrTanmfLPPyAOeYGyG+UpDys7/7eeWT1zCq+oekYnU= From 6d562b223fdb4526967b9b731e025a7ccda9d0ef Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Tue, 17 May 2022 11:01:50 +0800 Subject: [PATCH 07/21] fix mod --- go.mod | 8 ++-- go.sum | 121 +++++++++++++++------------------------------------------ 2 files changed, 36 insertions(+), 93 deletions(-) diff --git a/go.mod b/go.mod index 8f5c02e5355..21eeab6049a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/pingcap/tiflow go 1.18 require ( - github.com/BurntSushi/toml v0.3.1 + github.com/BurntSushi/toml v1.1.0 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/Shopify/sarama v1.29.0 github.com/apache/pulsar-client-go v0.6.0 @@ -11,7 +11,7 @@ require ( github.com/benbjohnson/clock v1.3.0 github.com/bradleyjkemp/grpc-tools v0.2.5 github.com/cenkalti/backoff/v4 v4.0.2 - github.com/chaos-mesh/go-sqlsmith v0.0.0-20211025024535-03ae33408684 + github.com/chaos-mesh/go-sqlsmith v0.0.0-20220512075501-53f2916ae240 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e github.com/cockroachdb/pebble v0.0.0-20211124172904-3ca75111760c github.com/coreos/go-semver v0.3.0 @@ -89,8 +89,8 @@ require ( golang.org/x/text v0.3.7 golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 golang.org/x/tools v0.1.10 // indirect - google.golang.org/genproto v0.0.0-20220216160803-4663080d8bc8 - google.golang.org/grpc v1.44.0 + google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3 + google.golang.org/grpc v1.46.2 gopkg.in/yaml.v2 v2.4.0 upper.io/db.v3 v3.7.1+incompatible ) diff --git a/go.sum b/go.sum index 5913763e87b..5bcf537514e 100644 --- a/go.sum +++ b/go.sum @@ -52,7 +52,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.16.1/go.mod h1:LaNorbty3ehnU3rEjXSNV/NRgQA0O8Y+uh6bPe5UOk4= cloud.google.com/go/storage v1.21.0 h1:HwnT2u2D309SFDHQII6m18HlrCi3jAXhUMTLOWXYH14= cloud.google.com/go/storage v1.21.0/go.mod h1:XmRlxkgPjlBONznT2dDUU/5XlpU2OjMnKuqnZI01LAA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -70,8 +69,9 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1 h1:BUYIbDf/mMZ8945v3QkG3Ou github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.2.0 h1:62Ew5xXg5UCGIXDOM7+y4IL5/6mQJq1nenhBCJAeGX8= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.2.0/go.mod h1:eHWhQKXc1Gv1DvWH//UzgWjWFEo0Pp4pH2vBzjBw8Fc= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= @@ -81,8 +81,8 @@ github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.6-0.20210211175136-c6db21d202f4 h1:++HGU87uq9UsSTlFeiOV9uZR3NpYkndUXeYyLv2DTc8= github.com/DataDog/zstd v1.4.6-0.20210211175136-c6db21d202f4/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Jeffail/gabs/v2 v2.5.1 h1:ANfZYjpMlfTTKebycu4X1AgkVWumFVDYQl7JwOr4mDk= github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= @@ -103,7 +103,6 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= -github.com/VividCortex/mysqlerr v0.0.0-20200629151747-c28746d985dd/go.mod h1:f3HiCrHjHBdcm6E83vGaXh1KomZMA2P6aeo3hKx/wg0= github.com/VividCortex/mysqlerr v1.0.0/go.mod h1:xERx8E4tBhLvpjzdUyQiSfUxeMcATEQrflDAfXsqcAE= github.com/Xeoncross/go-aesctr-with-hmac v0.0.0-20200623134604-12b17a7ff502/go.mod h1:pmnBM9bxWSiHvC/gSWunUIyDvGn33EkP2CUjxFKtTTM= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -124,7 +123,6 @@ github.com/apache/pulsar-client-go/oauth2 v0.0.0-20201120111947-b8bd55bc02bd/go. github.com/apache/thrift v0.0.0-20181112125854-24918abba929/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.1-0.20201008052519-daf620915714 h1:Jz3KVLYY5+JO7rDiX0sAuRGtuv2vG01r17Y9nLMWNUw= github.com/apache/thrift v0.13.1-0.20201008052519-daf620915714/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/appleboy/gin-jwt/v2 v2.6.3/go.mod h1:MfPYA4ogzvOcVkRwAxT7quHOtQmVKDpTwxyUrC2DNw0= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= github.com/ardielle/ardielle-go v1.5.2/go.mod h1:I4hy1n795cUhaVt/ojz83SNVCYIGsAFAONtv2Dr7HUI= @@ -166,12 +164,11 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chaos-mesh/go-sqlsmith v0.0.0-20211025024535-03ae33408684 h1:0Enh5fMRp4pS/DY//eGF9X2s98O/fP79wRBH3bAB7Lo= -github.com/chaos-mesh/go-sqlsmith v0.0.0-20211025024535-03ae33408684/go.mod h1:VjxGQM2bcHchm+RMFrn+r66K0jW0qd3wPiCdw/IJ+cE= +github.com/chaos-mesh/go-sqlsmith v0.0.0-20220512075501-53f2916ae240 h1:SuKXFR8dNkgpLv15iFjpmTXBWV8YNSeRJL1K0+LbNfc= +github.com/chaos-mesh/go-sqlsmith v0.0.0-20220512075501-53f2916ae240/go.mod h1:Es+s5MxdatQefWfq1RqglgBqkTPmdVMtN35/PKo32Ro= github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA= github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA= github.com/cheynewallace/tabby v1.1.1/go.mod h1:Pba/6cUL8uYqvOc9RkyvFbHGrQ9wShyrn6/S/1OYVys= @@ -189,6 +186,7 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -213,7 +211,6 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= github.com/coocood/bbloom v0.0.0-20190830030839-58deb6228d64 h1:W1SHiII3e0jVwvaQFglwu3kS9NLxOeTpvik7MbKCyuQ= github.com/coocood/bbloom v0.0.0-20190830030839-58deb6228d64/go.mod h1:F86k/6c7aDUdwSUevnLpHS/3Q9hzYCE99jGk2xsHnt0= -github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coocood/freecache v1.2.1 h1:/v1CqMq45NFH9mp/Pt142reundeBM0dVUD3osQBeu/U= github.com/coocood/freecache v1.2.1/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= github.com/coocood/rtutil v0.0.0-20190304133409-c84515f646f2 h1:NnLfQ77q0G4k2Of2c1ceQ0ec6MkLQyDp+IGdVM0D8XM= @@ -262,12 +259,10 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE= github.com/deepmap/oapi-codegen v1.9.0 h1:qpyRY+dzjMai5QejjA53ebnBtcSvIcZOtYwVlsgdxOc= github.com/deepmap/oapi-codegen v1.9.0/go.mod h1:7t4DbSxmAffcTEgrWvsPYEE2aOARZ8ZKWp3hDuZkHNc= -github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE= github.com/dgraph-io/ristretto v0.1.1-0.20220403145359-8e850b710d6d h1:Wrc3UKTS+cffkOx0xRGFC+ZesNuTfn0ThvEC72N0krk= github.com/dgraph-io/ristretto v0.1.1-0.20220403145359-8e850b710d6d/go.mod h1:RAy2GVV4sTWVlNMavv3xhLsk18rxhfhDnombTe6EF5c= github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -305,8 +300,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= @@ -333,6 +328,7 @@ github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebP github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsouza/fake-gcs-server v1.19.0 h1:XyaGOlqo+R5sjT03x2ymk0xepaQlgwhRLTT2IopW0zA= @@ -355,7 +351,6 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.4 h1:QmUZXrvJ9qZ3GfWvQ+2wnW/1ePrTEJqPKMYEU3lD/DM= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= @@ -406,12 +401,9 @@ github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrK github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/overalls v0.0.0-20180201144345-22ec1a223b7c/go.mod h1:UqxAgEOt89sCiXlrc/ycnx00LVvUO/eS8tMUkWX4R7w= -github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= @@ -421,7 +413,6 @@ github.com/go-playground/validator/v10 v10.9.0 h1:NgTtmN58D0m8+UuxtYmGztBJB7VnPg github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w/BIH7cC3Q= github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -430,7 +421,6 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-graphviz v0.0.5/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= github.com/goccy/go-json v0.7.8/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= @@ -534,7 +524,6 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200407044318-7d83b28da2e9/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -548,11 +537,9 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20211122183932-1daafda22083 h1:c8EUapQFi+kjzedr4c6WqbwMdmB95+oDBWZ5XFHFYxY= github.com/google/pprof v0.0.0-20211122183932-1daafda22083/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -619,8 +606,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/henrylee2cn/ameda v1.4.10/go.mod h1:liZulR8DgHxdK+MEwvZIylGnmcjzQ6N6f2PlWe7nEO4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hypnoglow/gormzap v0.3.0/go.mod h1:5Wom8B7Jl2oK0Im9hs6KQ+Kl92w4Y7gKCrj66rhyvw0= -github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -687,9 +672,7 @@ github.com/jedib0t/go-pretty/v6 v6.2.2 h1:o3McN0rQ4X+IU+HduppSp9TwRdGLRW2rhJXy9C github.com/jedib0t/go-pretty/v6 v6.2.2/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= @@ -699,7 +682,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.3.3 h1:j82X0bf7oQ27XeqxicSZsTU5suPwKElg3oyxNn43iTk= github.com/jmoiron/sqlx v1.3.3/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df h1:Zrb0IbuLOGHL7nrO2WrcuNWgDTlzFv3zY69QMx4ggQE= github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df/go.mod h1:mAVCUAYtW9NG31eB30umMSLKcDt6mCUWSjoSn5qBh0k= @@ -776,7 +758,6 @@ github.com/labstack/echo/v4 v4.2.1 h1:LF5Iq7t/jrtUuSutNuiEWtB5eiHfZ5gSe2pcu5exjQ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -789,7 +770,6 @@ github.com/lestrrat-go/jwx v1.2.7/go.mod h1:bw24IXWbavc0R2RsOtpXL7RtMyP589yZ1+L7 github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -836,13 +816,11 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v2.0.2+incompatible h1:qzw9c2GNT8UFrgWNDhCTqRqYUSmu/Dav/9Z58LGpk7U= github.com/mattn/go-sqlite3 v2.0.2+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= @@ -893,7 +871,6 @@ github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7 h1:7KAv7KMGTTqSmYZtNdc github.com/ngaut/pools v0.0.0-20180318154953-b7bc8c42aac7/go.mod h1:iWMfgwqYW+e8n5lC/jjNEhwcjbRDpl5NT7n2h+4UNcI= github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef h1:K0Fn+DoFqNqktdZtdV3bPQ/0cuYh2H4rkg0tytX/07k= github.com/ngaut/sync2 v0.0.0-20141008032647-7a24ed77b2ef/go.mod h1:7WjlapSfwQyo6LNmIvEWzsW1hbBQfpUO4JWnuQRmva8= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -928,8 +905,6 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20211229010228-4d14c490ee36/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= @@ -940,13 +915,11 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pingcap/badger v1.5.1-0.20210831093107-2f6cb8008145/go.mod h1:LyrqUOHZrUDf9oGi1yoz1+qw9ckSIhQb5eMa1acOLNQ= github.com/pingcap/badger v1.5.1-0.20220314162537-ab58fbf40580 h1:MKVFZuqFvAMiDtv3AbihOQ6rY5IE8LWflI1BuZ/hF0Y= github.com/pingcap/badger v1.5.1-0.20220314162537-ab58fbf40580/go.mod h1:upwDfet29M5y5koWilbWWA6ca3Lr0YVuzwX/DK58Vdk= github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ= github.com/pingcap/check v0.0.0-20191107115940-caf2b9e6ccf4/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= github.com/pingcap/check v0.0.0-20191216031241-8a5a85928f12/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= -github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0 h1:HVl5539r48eA+uDuX/ziBmQCxzT1pGrzWbKuXT46Bq0= github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc= github.com/pingcap/errcode v0.3.0/go.mod h1:4b2X8xSqxIroj/IZ9MX/VGZhAwc11wB9wRIzHvz6SeM= @@ -957,12 +930,9 @@ github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d/go.mod h1:g4vx// github.com/pingcap/errors v0.11.5-0.20201029093017-5a7df2af2ac7/go.mod h1:G7x87le1poQzLB/TqvTJI2ILrSgobnq4Ut7luOwvfvI= github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3/go.mod h1:G7x87le1poQzLB/TqvTJI2ILrSgobnq4Ut7luOwvfvI= github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= -github.com/pingcap/errors v0.11.5-0.20210513014640-40f9a1999b3b/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c h1:xpW9bvK+HuuTmyFqUwr+jcCvpVkK7sumiz+ko5H9eq4= github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= -github.com/pingcap/failpoint v0.0.0-20191029060244-12f4ac2fd11d/go.mod h1:DNS3Qg7bEDhU6EXNHF+XSv/PGznQaMJ5FWvctpm6pQI= github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce/go.mod h1:w4PEZ5y16LeofeeGwdgZB4ddv9bLyDuIX+ljstgKZyk= -github.com/pingcap/failpoint v0.0.0-20210316064728-7acb0f0a3dfd/go.mod h1:IVF+ijPSMZVtx2oIqxAg7ur6EyixtTYfOHwpfmlhqI4= github.com/pingcap/failpoint v0.0.0-20210918120811-547c13e3eb00/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 h1:kJolJWbyadVeL8RKBlqmXQR7FRKPsIeU85TUYyhbhiQ= github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3/go.mod h1:4qGtCB0QK0wBzKtFEGDhxXnSnbQApw1gc9siScUl8ew= @@ -972,17 +942,15 @@ github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw= github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w= github.com/pingcap/kvproto v0.0.0-20200411081810-b85805c9476c/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= -github.com/pingcap/kvproto v0.0.0-20210219064844-c1844a4775d6/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= -github.com/pingcap/kvproto v0.0.0-20210805052247-76981389e818/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= -github.com/pingcap/kvproto v0.0.0-20210915062418-0f5764a128ad/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220228094105-9bb22e5a97fc/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220304032058-ccd676426a27/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= +github.com/pingcap/kvproto v0.0.0-20220429093005-2839fa5a1ed6/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453 h1:Zm7MOLXFWsxLORJu2euSTQhfpnwTwsJKb7E8F6ukRCo= github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM= github.com/pingcap/log v0.0.0-20210906054005-afc726e70354/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= @@ -990,27 +958,20 @@ github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee/go.mod h1:DWQW5jICDR7U github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8= github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= github.com/pingcap/parser v0.0.0-20210415081931-48e7f467fd74/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw= -github.com/pingcap/parser v0.0.0-20210525032559-c37778aff307/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw= -github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= -github.com/pingcap/sysutil v0.0.0-20210315073920-cc0985d983a3/go.mod h1:tckvA041UWP+NqYzrJ3fMgC/Hw9wnmQ/tUkp/JaHly8= -github.com/pingcap/sysutil v0.0.0-20210730114356-fcd8a63f68c5/go.mod h1:XsOaV712rUk63aOEKYP9PhXTIE3FMNHmC2r1wX5wElY= github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d/go.mod h1:7j18ezaWTao2LHOyMlsc2Dg1vW+mDY9dEbPzVyOlaeM= github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4 h1:HYbcxtnkN3s5tqrZ/z3eJS4j3Db8wMphEm1q10lY/TM= github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4/go.mod h1:sDCsM39cGiv2vwunZkaFA917vVkqDTGSPbbV7z4Oops= -github.com/pingcap/tidb v1.1.0-beta.0.20211023132847-efa94595c071/go.mod h1:Ci7ABF58a4jn6YtaHi7655jP409edqC2JxWWFRqOubg= +github.com/pingcap/tidb v1.1.0-beta.0.20220511160835-98c31070d958/go.mod h1:luW4sIZoLHY3bCWuKqyqk2QgMvF+/M7nWOXf/me0+fY= github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607 h1:/0sO//UefHNz+aUSwuh2FyBz/TVka6Wg3EoIpqk7qbo= github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607/go.mod h1:D8sZJ0Dy+My380Rq8FXgOk+B1tvekM2QbTNlxnb4wNs= -github.com/pingcap/tidb-dashboard v0.0.0-20210312062513-eef5d6404638/go.mod h1:OzFN8H0EDMMqeulPhPMw2i2JaiZWOKFQ7zdRPhENNgo= -github.com/pingcap/tidb-dashboard v0.0.0-20210716172320-2226872e3296/go.mod h1:OCXbZTBTIMRcIt0jFsuCakZP+goYRv6IjawKbwLS2TQ= github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba/go.mod h1:4hk/3owVGWdvI9Kx6yCqqvM1T5PVgwyQNyMQxD3rwfc= -github.com/pingcap/tidb-tools v5.0.3+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible h1:dAfZKHR4Wu3bdFDNDsH2c4fWrkqbkgVlwY5pC4Nmp6Q= github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tidb/parser v0.0.0-20211011031125-9b13dc409c5e/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= -github.com/pingcap/tidb/parser v0.0.0-20211023132847-efa94595c071/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= +github.com/pingcap/tidb/parser v0.0.0-20220511160835-98c31070d958/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607 h1:wtjxwH1O/WdvmVojeP5jbhzymDc8iNktT3Lu5r729YE= github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= -github.com/pingcap/tipb v0.0.0-20211008080435-3fd327dfce0e/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= +github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188 h1:+46isFI9fR9R+nJVDMI55tCC/TCwp+bvVA4HLGEv1rY= github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98= @@ -1033,8 +994,6 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= @@ -1050,8 +1009,6 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -1061,8 +1018,6 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= @@ -1104,13 +1059,10 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shhdgit/testfixtures/v3 v3.6.2-0.20211219171712-c4f264d673d3/go.mod h1:Z0OLtuFJ7Y4yLsVijHK8uq95NjGFlYJy+I00ElAEtUQ= -github.com/shirou/gopsutil v2.19.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil v3.21.2+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.3+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shirou/gopsutil/v3 v3.22.4 h1:srAQaiX6jX/cYL6q29aE0m8lOskT9CurZ9N61YR3yoI= github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.3.0 h1:KK3gWIXskZ2O1U/JNTisNcvH+jveJxZYrjbTsrbbnh8= github.com/shopspring/decimal v1.3.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1119,7 +1071,6 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 h1:mj/nMDAwTBiaCqMEs4cYCqF7pO6Np7vhy1D1wcQGz+E= github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726 h1:xT+JlYxNGqyT+XcU8iUrN18JYed2TvG9yN5ULG2jATM= @@ -1186,19 +1137,15 @@ github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476/go.mod h1:xDhTyuFIuj github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/thoas/go-funk v0.8.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 h1:mbAskLJ0oJfDRtkanvQPiooDH8HvJ2FBh+iKT/OmiQQ= github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU= -github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tikv/client-go/v2 v2.0.0-alpha.0.20211011083157-49c8dd23f1f0/go.mod h1:00plYwQsQ5kBUmafHO+JkjznGgFaBokMZl82TZIbsQk= +github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101 h1:LEdgY/R6ir0V7mSuNW2m7ZgS0hbmBhsnnrLOxoBoC74= github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= -github.com/tikv/pd v1.1.0-beta.0.20210323121136-78679e5e209d/go.mod h1:Jw9KG11C/23Rr7DW4XWQ7H5xOgGZo6DFL1OKAF4+Igw= -github.com/tikv/pd v1.1.0-beta.0.20210818082359-acba1da0018d/go.mod h1:rammPjeZgpvfrQRPkijcx8tlxF1XM5+m6kRXrkDzCAA= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 h1:lIfIwqe1HPa0suhMpiI200nYxau+rXWXTqZxSGg1HS4= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800/go.mod h1:J/dj1zpEE9b7idgONGFttnXM+ncl88LmnkD/xDbq0hA= github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710 h1:jxgmKOscXSjaFEKQGRyY5qOpK8hLqxs2irb/uDJMtwk= @@ -1215,7 +1162,6 @@ github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq// github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/twmb/murmur3 v1.1.3 h1:D83U0XYKcHRYwYIpBKf3Pks91Z0Byda/9SJ8B6EMRcA= @@ -1249,11 +1195,8 @@ github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/msgpack/v5 v5.0.0-beta.1/go.mod h1:xlngVLeyQ/Qi05oQxhQ+oTuqa03RjMwMfk/7/TCs+QI= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wangjohn/quickselect v0.0.0-20161129230411-ed8402a42d5f h1:9DDCDwOyEy/gId+IEMrFHLuQ5R/WV0KNxWLler8X2OY= @@ -1276,7 +1219,6 @@ github.com/xitongsys/parquet-go-source v0.0.0-20200817004010-026bad9b25d0 h1:a74 github.com/xitongsys/parquet-go-source v0.0.0-20200817004010-026bad9b25d0/go.mod h1:HYhIKsdns7xz80OgkbgJYrtQY7FjHWHKH6cvN7+czGE= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yookoala/realpath v1.0.0/go.mod h1:gJJMA9wuX7AcqLy1+ffPatSCySA1FQ2S8Ya9AIoYBpE= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= @@ -1285,6 +1227,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -1295,8 +1238,6 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20210512015243-d19fbe541bf9/go.mod h1:q+i20RPAmay+xq8LJ3VMOhXCNk4YCk3V7QP91meFavw= go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= @@ -1352,9 +1293,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/dig v1.9.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/fx v1.10.0/go.mod h1:vLRicqpG/qQEzno4SYU86iCwfT95EZza+Eba0ItuxqY= go.uber.org/fx v1.12.0/go.mod h1:egT3Kyg1JFYQkvKLZ3EsykxkNrZxgXS+gKoKo7abERY= go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -1371,7 +1310,6 @@ go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95a go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1398,7 +1336,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1427,6 +1364,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/exp v0.0.0-20220516143420-24438e51023a h1:tiLLxEjKNE6Hrah/Dp/cyHvsyjDLcMFSocOHO5XDmOM= golang.org/x/exp v0.0.0-20220516143420-24438e51023a/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -1457,7 +1395,10 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1519,8 +1460,11 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220516155154-20f960328961 h1:+W/iTMPG0EL7aW+/atntZwZrvSRIj3m3yX414dSULUU= golang.org/x/net v0.0.0-20220516155154-20f960328961/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1587,7 +1531,6 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1644,6 +1587,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1651,7 +1595,9 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a h1:N2T1jUrTQE9Re6TFF5PhvEHXHCguynGhKjWVsIUt5cY= golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1736,7 +1682,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1760,6 +1705,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1873,7 +1820,6 @@ google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= @@ -1888,8 +1834,9 @@ google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20220114231437-d2e6a121cae0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220201184016-50beb8ab5c44/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220211171837-173942840c17/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220216160803-4663080d8bc8 h1:divpuJZKgX3Qt7MFDE5v62yu0yQcQbTCD9VJp9leX58= google.golang.org/genproto v0.0.0-20220216160803-4663080d8bc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3 h1:q1kiSVscqoDeqTF27eQ2NnLLDmqF0I373qQNXYMy0fo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -1924,8 +1871,10 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1942,9 +1891,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1956,7 +1903,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= @@ -1979,7 +1925,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -2001,14 +1946,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.2.0/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= modernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254= modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk= modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/parser v1.0.0/go.mod h1:H20AntYJ2cHHL6MHthJ8LZzXCdDCHMWt1KZXtIMjejA= modernc.org/parser v1.0.2/go.mod h1:TXNq3HABP3HMaqLK7brD1fLA/LfN0KS6JxZn71QdDqs= From b2ec760e544d5df6222b4a5df04fdc0b93525d9d Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Tue, 17 May 2022 14:53:13 +0800 Subject: [PATCH 08/21] fix a test --- cdc/entry/mounter.go | 1 + cdc/entry/mounter_test.go | 11 ++++++----- cdc/model/schema_storage_test.go | 12 ++++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cdc/entry/mounter.go b/cdc/entry/mounter.go index 0c9343e5c23..7ab7aaf2124 100644 --- a/cdc/entry/mounter.go +++ b/cdc/entry/mounter.go @@ -480,6 +480,7 @@ func getDefaultOrZeroValue(col *timodel.ColumnInfo) (interface{}, int, string, e return emptyBytes, sizeOfEmptyBytes, "", nil default: d = table.GetZeroValue(col) + log.Info("indeebug", zap.String("columnInfo", col.FieldType.String()), zap.Any("d", d), zap.Any("signed", mysql.HasUnsignedFlag(col.GetFlag()))) if d.IsNull() { log.Error("meet unsupported column type", zap.String("columnInfo", col.FieldType.String())) } diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index 9cfdc962e70..abc249e55b8 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -443,11 +443,11 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql flag null ftNull := types.NewFieldType(mysql.TypeUnspecified) - ftNull.SetFlag(0) + ftNull.SetFlag(uint(0)) // mysql.TypeTiny + notnull ftTinyIntNotNull := types.NewFieldType(mysql.TypeTiny) - ftTinyIntNotNull.SetFlag(mysql.NotNullFlag) + ftTinyIntNotNull.SetFlag(uint(0) | mysql.NotNullFlag) // mysql.TypeTiny + notnull + unsigned ftTinyIntNotNullUnSigned := types.NewFieldType(mysql.TypeTiny) @@ -455,7 +455,7 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeTiny + null ftTinyIntNull := types.NewFieldType(mysql.TypeTiny) - ftNull.SetFlag(0) + ftNull.SetFlag(uint(0)) // mysql.TypeShort + notnull ftShortNotNull := types.NewFieldType(mysql.TypeShort) @@ -483,7 +483,7 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeFloat + null ftTypeFloatNull := types.NewFieldType(mysql.TypeFloat) - ftTypeFloatNull.SetFlag(0) + ftTypeFloatNull.SetFlag(uint(0)) // mysql.TypeDouble + notnull ftTypeDoubleNotNull := types.NewFieldType(mysql.TypeDouble) @@ -504,7 +504,7 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeTimestamp + notnull ftTypeTimestampNull := types.NewFieldType(mysql.TypeTimestamp) - ftTypeTimestampNull.SetFlag(0) + ftTypeTimestampNull.SetFlag(uint(0)) // mysql.TypeDate + notnull ftTypeDateNotNull := types.NewFieldType(mysql.TypeDate) @@ -906,6 +906,7 @@ func TestGetDefaultZeroValue(t *testing.T) { } for _, tc := range testCases { + println("run case", tc.Name) val, _, _, _ := getDefaultOrZeroValue(&tc.ColInfo) require.Equal(t, tc.Res, val, tc.Name) } diff --git a/cdc/model/schema_storage_test.go b/cdc/model/schema_storage_test.go index ba4204b74ec..6761fcb5725 100644 --- a/cdc/model/schema_storage_test.go +++ b/cdc/model/schema_storage_test.go @@ -94,8 +94,12 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsNotHandle(t *testing.T) { func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { t.Parallel() - ft := parser_types.NewFieldType(mysql.TypeUnspecified) - ft.SetFlag(mysql.NotNullFlag) + jobft := parser_types.NewFieldType(mysql.TypeUnspecified) + jobft.SetFlag(mysql.NotNullFlag) + + uidft := jobft.Clone() + uidft.SetFlag(mysql.PriKeyFlag) + tbl := timodel.TableInfo{ Indices: []*timodel.IndexInfo{ { @@ -113,14 +117,14 @@ func TestPKShouldBeInTheFirstPlaceWhenPKIsHandle(t *testing.T) { Name: timodel.CIStr{ O: "job", }, - FieldType: *ft, + FieldType: *jobft, State: timodel.StatePublic, }, { Name: timodel.CIStr{ O: "uid", }, - FieldType: *ft, + FieldType: *uidft, State: timodel.StatePublic, }, }, From 665e2dd36abd98f3dbe516d752d1b01b801acd3f Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Tue, 17 May 2022 15:20:28 +0800 Subject: [PATCH 09/21] fix more --- cdc/entry/mounter.go | 1 - cdc/entry/mounter_test.go | 18 ++++++++++-------- dm/syncer/dml_test.go | 4 +--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cdc/entry/mounter.go b/cdc/entry/mounter.go index 7ab7aaf2124..0c9343e5c23 100644 --- a/cdc/entry/mounter.go +++ b/cdc/entry/mounter.go @@ -480,7 +480,6 @@ func getDefaultOrZeroValue(col *timodel.ColumnInfo) (interface{}, int, string, e return emptyBytes, sizeOfEmptyBytes, "", nil default: d = table.GetZeroValue(col) - log.Info("indeebug", zap.String("columnInfo", col.FieldType.String()), zap.Any("d", d), zap.Any("signed", mysql.HasUnsignedFlag(col.GetFlag()))) if d.IsNull() { log.Error("meet unsupported column type", zap.String("columnInfo", col.FieldType.String())) } diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index abc249e55b8..0e1146d4b92 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -443,19 +443,18 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql flag null ftNull := types.NewFieldType(mysql.TypeUnspecified) - ftNull.SetFlag(uint(0)) // mysql.TypeTiny + notnull ftTinyIntNotNull := types.NewFieldType(mysql.TypeTiny) - ftTinyIntNotNull.SetFlag(uint(0) | mysql.NotNullFlag) + ftTinyIntNotNull.AddFlag(mysql.NotNullFlag) // mysql.TypeTiny + notnull + unsigned ftTinyIntNotNullUnSigned := types.NewFieldType(mysql.TypeTiny) - ftTinyIntNotNull.SetFlag(mysql.NotNullFlag | mysql.UnsignedFlag) + ftTinyIntNotNullUnSigned.SetFlag(mysql.NotNullFlag) + ftTinyIntNotNullUnSigned.AddFlag(mysql.UnsignedFlag) // mysql.TypeTiny + null ftTinyIntNull := types.NewFieldType(mysql.TypeTiny) - ftNull.SetFlag(uint(0)) // mysql.TypeShort + notnull ftShortNotNull := types.NewFieldType(mysql.TypeShort) @@ -483,12 +482,16 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeFloat + null ftTypeFloatNull := types.NewFieldType(mysql.TypeFloat) - ftTypeFloatNull.SetFlag(uint(0)) // mysql.TypeDouble + notnull ftTypeDoubleNotNull := types.NewFieldType(mysql.TypeDouble) ftTypeDoubleNotNull.SetFlag(mysql.NotNullFlag) + // mysql.TypeNewDecimal + notnull + ftTypeNewDecimalNull := types.NewFieldType(mysql.TypeNewDecimal) + ftTypeNewDecimalNull.SetFlen(5) + ftTypeNewDecimalNull.SetDecimal(2) + // mysql.TypeNewDecimal + notnull ftTypeNewDecimalNotNull := types.NewFieldType(mysql.TypeNewDecimal) ftTypeNewDecimalNotNull.SetFlag(mysql.NotNullFlag) @@ -504,7 +507,6 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeTimestamp + notnull ftTypeTimestampNull := types.NewFieldType(mysql.TypeTimestamp) - ftTypeTimestampNull.SetFlag(uint(0)) // mysql.TypeDate + notnull ftTypeDateNotNull := types.NewFieldType(mysql.TypeDate) @@ -589,7 +591,7 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeTiny + notnull + nodefault { Name: "mysql.TypeTiny + notnull + nodefault", - ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNull}, + ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNull.Clone()}, Res: int64(0), }, // mysql.TypeTiny + notnull + default @@ -716,7 +718,7 @@ func TestGetDefaultZeroValue(t *testing.T) { // mysql.TypeNewDecimal + null + nodefault { Name: "mysql.TypeNewDecimal + null + nodefault", - ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNotNull}, + ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNull}, Res: nil, }, // mysql.TypeNewDecimal + null + default diff --git a/dm/syncer/dml_test.go b/dm/syncer/dml_test.go index d625479bf61..e56c906ef97 100644 --- a/dm/syncer/dml_test.go +++ b/dm/syncer/dml_test.go @@ -64,9 +64,7 @@ func (s *testSyncerSuite) TestCastUnsigned(c *C) { for _, cs := range cases { ft := types.NewFieldType(cs.Type) if cs.unsigned { - flag := ft.GetFlag() - flag |= mysql.UnsignedFlag - ft.SetFlag(flag) + ft.AddFlag(mysql.UnsignedFlag) } obtained := castUnsigned(cs.data, ft) c.Assert(obtained, Equals, cs.expected) From 2f677516f40cb6d849c1d310d526e14e10fd90ab Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Mon, 23 May 2022 10:38:57 +0800 Subject: [PATCH 10/21] fix mode --- go.mod | 2 +- go.sum | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index caf6dcbec02..adfb9d3c11e 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 github.com/swaggo/gin-swagger v1.2.0 github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476 diff --git a/go.sum b/go.sum index d6159162a2b..cf1f3cef41f 100644 --- a/go.sum +++ b/go.sum @@ -370,11 +370,9 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-mysql-org/go-mysql v1.4.1-0.20220221114137-89145541e0d4 h1:6AopLIKxyLXWY8PRxIq0q33BedlkNNcJfgJSBZh6Bks= @@ -678,7 +676,6 @@ github.com/jedib0t/go-pretty/v6 v6.2.2 h1:o3McN0rQ4X+IU+HduppSp9TwRdGLRW2rhJXy9C github.com/jedib0t/go-pretty/v6 v6.2.2/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= @@ -833,7 +830,6 @@ github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGw github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v2.0.2+incompatible h1:qzw9c2GNT8UFrgWNDhCTqRqYUSmu/Dav/9Z58LGpk7U= github.com/mattn/go-sqlite3 v2.0.2+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= @@ -999,9 +995,8 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= -github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -1009,7 +1004,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1024,9 +1018,8 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= -github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1134,8 +1127,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df h1:rh3VYpfvzXRbJ90ymx1yfhGl/wq8ac2m/cUbao61kwY= +github.com/stretchr/testify v1.7.2-0.20220504104629-106ec21d14df/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 h1:PyYN9JH5jY9j6av01SpfRMb+1DWg/i3MbGOKPxJ2wjM= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= @@ -1305,7 +1299,6 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/dig v1.9.0 h1:pJTDXKEhRqBI8W7rU7kwT5EgyRZuSMVSFcZolOvKK9U= go.uber.org/dig v1.9.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.12.0/go.mod h1:egT3Kyg1JFYQkvKLZ3EsykxkNrZxgXS+gKoKo7abERY= @@ -1479,7 +1472,6 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220516155154-20f960328961 h1:+W/iTMPG0EL7aW+/atntZwZrvSRIj3m3yX414dSULUU= golang.org/x/net v0.0.0-20220516155154-20f960328961/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= From 7dc264f8e4bad5a69e3480d633ea58d681e06946 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 10:36:45 +0800 Subject: [PATCH 11/21] revert some changes --- CONTRIBUTING.md | 17 +- docs/swagger/swagger.json | 1854 +++++++++++++++------------- engine/README.md | 4 +- engine/ansible/README.md | 2 +- engine/dm/README.md | 3 +- engine/executor/README.md | 10 +- engine/sample/README.md | 4 +- engine/sample/config/demo.json | 6 +- engine/sample/config/fake_job.json | 6 +- engine/servermaster/README.md | 2 +- engine/test/e2e/docker.json | 6 +- engine/test/e2e/tispace.json | 14 +- tests/integration_tests/README.md | 65 +- 13 files changed, 1041 insertions(+), 952 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6884b6be7bc..0aeabd99950 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,8 +14,8 @@ your contribution accepted. Developing TiDB-CDC requires: -- [Go 1.18+](https://go.dev/doc/code) -- An internet connection to download the dependencies +* [Go 1.18+](https://go.dev/doc/code) +* An internet connection to download the dependencies Simply run `make` to build the program. @@ -31,7 +31,6 @@ See [tests/integration_tests/README.md](./tests/integration_tests/README.md) for For more information on how to trigger these tests, please see the [command help](./docs/ci/command.md). ### Debug with [delve](https://github.com/go-delve/delve) - ```shell dlv debug --build-flags="-ldflags='-X github.com/pingcap/tiflow/pkg/version.ReleaseVersion=$(git describe --tags)'" ./cmd/cdc -- server ``` @@ -88,13 +87,13 @@ The first line is the subject and should be no longer than 70 characters, the se lines should be wrapped at 80 characters. This allows the message to be easier to read on GitHub as well as in various git tools. -If the change affects more than one subsystem, you can use comma to separate them like `capture,puller:`. If the -change affects many subsystems, you can use `*` instead, like `*:`. +If the change affects more than one subsystem, you can use comma to separate them like ```capture,puller:```. If the +change affects many subsystems, you can use ```*``` instead, like ```*:```. -If this change only affects ticdc, fill in `(ticdc)`, -if it only affects dm, fill in `(dm)`, -if it only affects dataflow engine, fill in `(engine)`. -If it involves a code that is used by all products, fill in `(all)`. +If this change only affects ticdc, fill in ```(ticdc)```, +if it only affects dm, fill in ```(dm)```, +if it only affects dataflow engine, fill in ```(engine)```. +If it involves a code that is used by all products, fill in ```(all)```. For the why part, if no specific reason for the change, you can use one of some generic reasons like "Improve documentation.", diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 84f3022ae12..56771004727 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -1,925 +1,1021 @@ { "swagger": "2.0", "info": { - "contact": {} + "contact": {} }, "paths": { - "/api/v1/captures": { - "get": { - "description": "list all captures in cdc cluster", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["capture"], - "summary": "List captures", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Capture" + "/api/v1/captures": { + "get": { + "description": "list all captures in cdc cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "capture" + ], + "summary": "List captures", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Capture" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } } - } - } - }, - "/api/v1/changefeeds": { - "get": { - "description": "list all changefeeds in cdc cluster", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "List changefeed", - "parameters": [ - { - "type": "string", - "description": "state", - "name": "state", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ChangefeedCommonInfo" + }, + "/api/v1/changefeeds": { + "get": { + "description": "list all changefeeds in cdc cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "List changefeed", + "parameters": [ + { + "type": "string", + "description": "state", + "name": "state", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ChangefeedCommonInfo" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } } - } }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + "post": { + "description": "create a new changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Create changefeed", + "parameters": [ + { + "description": "changefeed config", + "name": "changefeed", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ChangefeedConfig" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } }, - "post": { - "description": "create a new changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Create changefeed", - "parameters": [ - { - "description": "changefeed config", - "name": "changefeed", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.ChangefeedConfig" - } - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}": { - "get": { - "description": "get detail information of a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Get changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ChangefeedDetail" - } + "/api/v1/changefeeds/{changefeed_id}": { + "get": { + "description": "get detail information of a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Get changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ChangefeedDetail" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + "put": { + "description": "Update a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Update a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + }, + { + "description": "changefeed target ts", + "name": "target_ts", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "sink uri", + "name": "sink_uri", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "filter rules", + "name": "filter_rules", + "in": "body", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "ignore transaction start ts", + "name": "ignore_txn_start_ts", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "mounter worker nums", + "name": "mounter_worker_num", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "sink config", + "name": "sink_config", + "in": "body", + "schema": { + "$ref": "#/definitions/config.SinkConfig" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + "delete": { + "description": "Remove a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Remove a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } }, - "put": { - "description": "Update a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Update a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - }, - { - "description": "changefeed target ts", - "name": "target_ts", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "sink uri", - "name": "sink_uri", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "filter rules", - "name": "filter_rules", - "in": "body", - "schema": { - "type": "array", - "items": { - "type": "string" + "/api/v1/changefeeds/{changefeed_id}/pause": { + "post": { + "description": "Pause a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Pause a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } } - } - }, - { - "description": "ignore transaction start ts", - "name": "ignore_txn_start_ts", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "mounter worker nums", - "name": "mounter_worker_num", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "sink config", - "name": "sink_config", - "in": "body", - "schema": { - "$ref": "#/definitions/config.SinkConfig" - } } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } }, - "delete": { - "description": "Remove a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Remove a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/pause": { - "post": { - "description": "Pause a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Pause a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/resume": { - "post": { - "description": "Resume a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "Resume a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed-id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/tables/move_table": { - "post": { - "description": "move one table to the target capture", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "move table", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - }, - { - "description": "table_id", - "name": "table_id", - "in": "body", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "capture_id", - "name": "capture_id", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/tables/rebalance_table": { - "post": { - "description": "rebalance all tables of a changefeed", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["changefeed"], - "summary": "rebalance tables", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true + "/api/v1/changefeeds/{changefeed_id}/resume": { + "post": { + "description": "Resume a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Resume a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed-id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/changefeeds/{changefeed_id}/tables/move_table": { + "post": { + "description": "move one table to the target capture", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "move table", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + }, + { + "description": "table_id", + "name": "table_id", + "in": "body", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "capture_id", + "name": "capture_id", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } - } - }, - "/api/v1/health": { - "get": { - "description": "check if CDC cluster is health", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["common"], - "summary": "Check if CDC cluster is health", - "responses": { - "200": { - "description": "" - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/changefeeds/{changefeed_id}/tables/rebalance_table": { + "post": { + "description": "rebalance all tables of a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "rebalance tables", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } - } - }, - "/api/v1/log": { - "post": { - "description": "change TiCDC log level dynamically", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["common"], - "summary": "Change TiCDC log level", - "parameters": [ - { - "description": "log level", - "name": "log_level", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + }, + "/api/v1/health": { + "get": { + "description": "check if CDC cluster is health", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Check if CDC cluster is health", + "responses": { + "200": { + "description": "" + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - ], - "responses": { - "200": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/log": { + "post": { + "description": "change TiCDC log level dynamically", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Change TiCDC log level", + "parameters": [ + { + "description": "log level", + "name": "log_level", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } - } - }, - "/api/v1/owner/resign": { - "post": { - "description": "notify the current owner to resign", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["owner"], - "summary": "notify the owner to resign", - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/owner/resign": { + "post": { + "description": "notify the current owner to resign", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "owner" + ], + "summary": "notify the owner to resign", + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } - } - }, - "/api/v1/processors": { - "get": { - "description": "list all processors in the TiCDC cluster", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["processor"], - "summary": "List processors", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProcessorCommonInfo" + }, + "/api/v1/processors": { + "get": { + "description": "list all processors in the TiCDC cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "processor" + ], + "summary": "List processors", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ProcessorCommonInfo" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } } - } - } - }, - "/api/v1/processors/{changefeed_id}/{capture_id}": { - "get": { - "description": "get the detail information of a processor", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["processor"], - "summary": "Get processor detail information", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ProcessorDetail" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/processors/{changefeed_id}/{capture_id}": { + "get": { + "description": "get the detail information of a processor", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "processor" + ], + "summary": "Get processor detail information", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ProcessorDetail" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } - } - }, - "/api/v1/status": { - "get": { - "description": "get the status of a server(capture)", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["common"], - "summary": "Get server status", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ServerStatus" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } + }, + "/api/v1/status": { + "get": { + "description": "get the status of a server(capture)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Get server status", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ServerStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } } - } } - } }, "definitions": { - "config.ColumnSelector": { - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "string" + "config.ColumnSelector": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "matcher": { + "type": "array", + "items": { + "type": "string" + } + } } - }, - "matcher": { - "type": "array", - "items": { - "type": "string" + }, + "config.DispatchRule": { + "type": "object", + "properties": { + "dispatcher": { + "description": "Deprecated, please use PartitionRule.", + "type": "string" + }, + "matcher": { + "type": "array", + "items": { + "type": "string" + } + }, + "partition": { + "description": "PartitionRule is an alias added for DispatcherRule to mitigate confusions.\nIn the future release, the DispatcherRule is expected to be removed .", + "type": "string" + }, + "topic": { + "type": "string" + } } - } - } - }, - "config.DispatchRule": { - "type": "object", - "properties": { - "dispatcher": { - "description": "Deprecated, please use PartitionRule.", - "type": "string" - }, - "matcher": { - "type": "array", - "items": { - "type": "string" + }, + "config.SinkConfig": { + "type": "object", + "properties": { + "column-selectors": { + "type": "array", + "items": { + "$ref": "#/definitions/config.ColumnSelector" + } + }, + "dispatchers": { + "type": "array", + "items": { + "$ref": "#/definitions/config.DispatchRule" + } + }, + "protocol": { + "type": "string" + }, + "schema-registry": { + "type": "string" + } } - }, - "partition": { - "description": "PartitionRule is an alias added for DispatcherRule to mitigate confusions.\nIn the future release, the DispatcherRule is expected to be removed .", - "type": "string" - }, - "topic": { - "type": "string" - } - } - }, - "config.SinkConfig": { - "type": "object", - "properties": { - "column-selectors": { - "type": "array", - "items": { - "$ref": "#/definitions/config.ColumnSelector" + }, + "model.Capture": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_owner": { + "type": "boolean" + } } - }, - "dispatchers": { - "type": "array", - "items": { - "$ref": "#/definitions/config.DispatchRule" + }, + "model.CaptureTaskStatus": { + "type": "object", + "properties": { + "capture_id": { + "type": "string" + }, + "table_ids": { + "description": "Table list, containing tables that processor should process", + "type": "array", + "items": { + "type": "integer" + } + }, + "table_operations": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/model.TableOperation" + } + } } - }, - "protocol": { - "type": "string" - }, - "schema-registry": { - "type": "string" - } - } - }, - "model.Capture": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_owner": { - "type": "boolean" - } - } - }, - "model.CaptureTaskStatus": { - "type": "object", - "properties": { - "capture_id": { - "type": "string" - }, - "table_ids": { - "description": "Table list, containing tables that processor should process", - "type": "array", - "items": { - "type": "integer" + }, + "model.ChangefeedCommonInfo": { + "type": "object", + "properties": { + "checkpoint_time": { + "type": "string" + }, + "checkpoint_tso": { + "type": "integer" + }, + "error": { + "$ref": "#/definitions/model.RunningError" + }, + "id": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "state": { + "type": "string" + } } - }, - "table_operations": { + }, + "model.ChangefeedConfig": { "type": "object", - "additionalProperties": { - "$ref": "#/definitions/model.TableOperation" + "properties": { + "changefeed_id": { + "type": "string" + }, + "filter_rules": { + "type": "array", + "items": { + "type": "string" + } + }, + "force_replicate": { + "description": "if true, force to replicate some ineligible tables", + "type": "boolean", + "default": false + }, + "ignore_ineligible_table": { + "type": "boolean", + "default": false + }, + "ignore_txn_start_ts": { + "type": "array", + "items": { + "type": "integer" + } + }, + "mounter_worker_num": { + "type": "integer", + "default": 16 + }, + "namespace": { + "type": "string" + }, + "sink_config": { + "$ref": "#/definitions/config.SinkConfig" + }, + "sink_uri": { + "type": "string" + }, + "start_ts": { + "type": "integer" + }, + "target_ts": { + "type": "integer" + }, + "timezone": { + "description": "timezone used when checking sink uri", + "type": "string", + "default": "system" + } } - } - } - }, - "model.ChangefeedCommonInfo": { - "type": "object", - "properties": { - "checkpoint_time": { - "type": "string" - }, - "checkpoint_tso": { - "type": "integer" - }, - "error": { - "$ref": "#/definitions/model.RunningError" - }, - "id": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "state": { - "type": "string" - } - } - }, - "model.ChangefeedConfig": { - "type": "object", - "properties": { - "changefeed_id": { - "type": "string" - }, - "filter_rules": { - "type": "array", - "items": { - "type": "string" + }, + "model.ChangefeedDetail": { + "type": "object", + "properties": { + "checkpoint_time": { + "type": "string" + }, + "checkpoint_tso": { + "type": "integer" + }, + "create_time": { + "type": "string" + }, + "creator_version": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/model.RunningError" + }, + "error_history": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "resolved_ts": { + "type": "integer" + }, + "sink_uri": { + "type": "string" + }, + "sort_engine": { + "type": "string" + }, + "start_ts": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "target_ts": { + "type": "integer" + }, + "task_status": { + "type": "array", + "items": { + "$ref": "#/definitions/model.CaptureTaskStatus" + } + } } - }, - "force_replicate": { - "description": "if true, force to replicate some ineligible tables", - "type": "boolean", - "default": false - }, - "ignore_ineligible_table": { - "type": "boolean", - "default": false - }, - "ignore_txn_start_ts": { - "type": "array", - "items": { - "type": "integer" + }, + "model.HTTPError": { + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "error_msg": { + "type": "string" + } } - }, - "mounter_worker_num": { - "type": "integer", - "default": 16 - }, - "namespace": { - "type": "string" - }, - "sink_config": { - "$ref": "#/definitions/config.SinkConfig" - }, - "sink_uri": { - "type": "string" - }, - "start_ts": { - "type": "integer" - }, - "target_ts": { - "type": "integer" - }, - "timezone": { - "description": "timezone used when checking sink uri", - "type": "string", - "default": "system" - } - } - }, - "model.ChangefeedDetail": { - "type": "object", - "properties": { - "checkpoint_time": { - "type": "string" - }, - "checkpoint_tso": { - "type": "integer" - }, - "create_time": { - "type": "string" - }, - "creator_version": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/model.RunningError" - }, - "error_history": { - "type": "array", - "items": { - "type": "integer" + }, + "model.ProcessorCommonInfo": { + "type": "object", + "properties": { + "capture_id": { + "type": "string" + }, + "changefeed_id": { + "type": "string" + }, + "namespace": { + "type": "string" + } } - }, - "id": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "resolved_ts": { - "type": "integer" - }, - "sink_uri": { - "type": "string" - }, - "sort_engine": { - "type": "string" - }, - "start_ts": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "target_ts": { - "type": "integer" - }, - "task_status": { - "type": "array", - "items": { - "$ref": "#/definitions/model.CaptureTaskStatus" + }, + "model.ProcessorDetail": { + "type": "object", + "properties": { + "checkpoint_ts": { + "description": "The maximum event CommitTs that has been synchronized.", + "type": "integer" + }, + "count": { + "description": "The count of events that have been replicated.", + "type": "integer" + }, + "error": { + "description": "Error code when error happens", + "$ref": "#/definitions/model.RunningError" + }, + "resolved_ts": { + "description": "The event that satisfies CommitTs \u003c= ResolvedTs can be synchronized.", + "type": "integer" + }, + "table_ids": { + "description": "all table ids that this processor are replicating", + "type": "array", + "items": { + "type": "integer" + } + } } - } - } - }, - "model.HTTPError": { - "type": "object", - "properties": { - "error_code": { - "type": "string" - }, - "error_msg": { - "type": "string" - } - } - }, - "model.ProcessorCommonInfo": { - "type": "object", - "properties": { - "capture_id": { - "type": "string" - }, - "changefeed_id": { - "type": "string" - }, - "namespace": { - "type": "string" - } - } - }, - "model.ProcessorDetail": { - "type": "object", - "properties": { - "checkpoint_ts": { - "description": "The maximum event CommitTs that has been synchronized.", - "type": "integer" - }, - "count": { - "description": "The count of events that have been replicated.", - "type": "integer" - }, - "error": { - "description": "Error code when error happens", - "$ref": "#/definitions/model.RunningError" - }, - "resolved_ts": { - "description": "The event that satisfies CommitTs \u003c= ResolvedTs can be synchronized.", - "type": "integer" - }, - "table_ids": { - "description": "all table ids that this processor are replicating", - "type": "array", - "items": { - "type": "integer" + }, + "model.RunningError": { + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "model.ServerStatus": { + "type": "object", + "properties": { + "git_hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_owner": { + "type": "boolean" + }, + "pid": { + "type": "integer" + }, + "version": { + "type": "string" + } + } + }, + "model.TableOperation": { + "type": "object", + "properties": { + "boundary_ts": { + "description": "if the operation is a delete operation, BoundaryTs is checkpoint ts\nif the operation is an add operation, BoundaryTs is start ts", + "type": "integer" + }, + "delete": { + "type": "boolean" + }, + "flag": { + "type": "integer" + }, + "status": { + "type": "integer" + } } - } - } - }, - "model.RunningError": { - "type": "object", - "properties": { - "addr": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, - "model.ServerStatus": { - "type": "object", - "properties": { - "git_hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_owner": { - "type": "boolean" - }, - "pid": { - "type": "integer" - }, - "version": { - "type": "string" - } - } - }, - "model.TableOperation": { - "type": "object", - "properties": { - "boundary_ts": { - "description": "if the operation is a delete operation, BoundaryTs is checkpoint ts\nif the operation is an add operation, BoundaryTs is start ts", - "type": "integer" - }, - "delete": { - "type": "boolean" - }, - "flag": { - "type": "integer" - }, - "status": { - "type": "integer" - } } - } } -} +} \ No newline at end of file diff --git a/engine/README.md b/engine/README.md index 2fa0dc40b5f..9e15b3d809f 100644 --- a/engine/README.md +++ b/engine/README.md @@ -28,7 +28,7 @@ Use `make unit_test` to run unit test and integrated test. Run `make dev` before submitting pr. -# Run it +# Run it ## Master @@ -53,7 +53,7 @@ TODO ### Start Master on Single Node ```[shell] -./bin/master --config=./sample/config/master.toml --master-addr 0.0.0.0:10240 --advertise-addr ${ip0}:10240 +./bin/master --config=./sample/config/master.toml --master-addr 0.0.0.0:10240 --advertise-addr ${ip0}:10240 ``` Replace **ip0** with your advertising ip. diff --git a/engine/ansible/README.md b/engine/ansible/README.md index 6d0f52f63b6..1e05c965971 100644 --- a/engine/ansible/README.md +++ b/engine/ansible/README.md @@ -24,4 +24,4 @@ Execute `ansible-playbook -i hosts destroy.yml` ## Start Test -Enter `test/e2e` directory and change the tispace config file. Executor ` CONFIG=./tispace.json go test -run=TestSubmitTest`. The default timeout is 10 minutes. You can use `--timeout` to specify a timeout. +Enter `test/e2e` directory and change the tispace config file. Executor ` CONFIG=./tispace.json go test -run=TestSubmitTest`. The default timeout is 10 minutes. You can use `--timeout` to specify a timeout. \ No newline at end of file diff --git a/engine/dm/README.md b/engine/dm/README.md index d9f441c6f14..6273b13fa57 100644 --- a/engine/dm/README.md +++ b/engine/dm/README.md @@ -2,7 +2,7 @@ ### a dump-load-sync demo -start a 1-master-1-executor cluster, since now we can't require DMLoadWorker to +start a 1-master-1-executor cluster, since now we can't require DMLoadWorker to be started on the executor of DMDumpWorker. ```shell @@ -15,7 +15,6 @@ start MySQL listening on 0.0.0.0:3306 with user root and password "123456" start TiDB listening on 0.0.0.0:4000 with user root and no password in another shell - ```shell cd ./test/e2e && go test -count=1 -v -run=TestDMSubtask ``` diff --git a/engine/executor/README.md b/engine/executor/README.md index 981c699b7b6..df6f9f27dfd 100644 --- a/engine/executor/README.md +++ b/engine/executor/README.md @@ -11,14 +11,14 @@ executor-server is in charge of: The task runtime maintains some important structures and implements the interface: -- **runtime**, the _singleton_ instance organizes and executes tasks. +- **runtime**, the *singleton* instance organizes and executes tasks. - **Run** function that actually drives the execution of the tasks and is thread-safe. - - _Queue_ field that contains the runnable tasks. + - *Queue* field that contains the runnable tasks. - **taskContainer** wraps the logic of operator and maintains the status and input/output channels. - **Poll** triggers a executing action of the task, which will return quickly. During the poll action, the task will - read inputs channels, if the channels are empty, return `blocked`. The read action fetches a batch of data. - - _status_ records the current status of task, including - - `runnable` means the task is in the _Queue_ and can run immediately. + - *status* records the current status of task, including + - `runnable` means the task is in the *Queue* and can run immediately. - `blocked` means the task is waiting someone to trigger, say output data consuming, input data arriving or i/o task completed. - `awaiting` means this task has been awoken by someone. If the **Poll** function ends and checks this status, we should put this task back to queue and reset the status to runnable. - **Operator** actually implement the user logic. Every operator is contained by a task. Ideally, operators can construct an operating tree like a typical sql engine. @@ -27,4 +27,4 @@ The task runtime maintains some important structures and implements the interfac - **next(ctx \*taskContext, r \*record, index int)** accepts the incoming data and returns the result data or blocked status. `index` indicates which input the record comes from. - **NextWantedInputIdx** returns a integer indicating which input the task should read in this poll. In normal cases it returns non-negative value. There are two special value: - **DontNeedData** suggests not to read data from input. It happens when the operator reads data from grpc streams or the operator was blocked last time and need to digest current blocking record at this time. - - **DontRequireData**. Given a union operator, it can read from any inputs without caring about the read order. In this case, we return this status. + - **DontRequireData**. Given a union operator, it can read from any inputs without caring about the read order. In this case, we return this status. \ No newline at end of file diff --git a/engine/sample/README.md b/engine/sample/README.md index f353bf3bd8f..affde65f2fe 100644 --- a/engine/sample/README.md +++ b/engine/sample/README.md @@ -6,7 +6,7 @@ This component shows how to start the cluster and run some tests by docker and d To build this repo, you can simply run `./prepare.sh`. Make sure you have installed docker and have run the docker daemon. -If you have build the binary on your local Linux, you can try `./build_image_from_local.sh`. +If you have build the binary on your local Linux, you can try `./build_image_from_local.sh`. ## Deploy @@ -27,4 +27,4 @@ docker-compose -f ./3m3e.yaml -f ./demo.yaml up --force-recreate ## Cleanup -sudo rm -rf /tmp/df/master +sudo rm -rf /tmp/df/master \ No newline at end of file diff --git a/engine/sample/config/demo.json b/engine/sample/config/demo.json index cf1607e8af5..90dfc0b48b7 100644 --- a/engine/sample/config/demo.json +++ b/engine/sample/config/demo.json @@ -1,5 +1,5 @@ { - "srcHost": "demo-server:1234", - "dstHost": "demo-server:1234", - "dstDir": "/data1" + "srcHost":"demo-server:1234", + " dstHost":"demo-server:1234", + " dstDir":"/data1" } diff --git a/engine/sample/config/fake_job.json b/engine/sample/config/fake_job.json index b7b7de542d9..fb72d9de032 100644 --- a/engine/sample/config/fake_job.json +++ b/engine/sample/config/fake_job.json @@ -1,5 +1,5 @@ { - "job-name": "test-fake-job-1", - "worker-count": 20, - "target-tick": 300 + "job-name": "test-fake-job-1", + "worker-count": 20, + "target-tick": 300 } diff --git a/engine/servermaster/README.md b/engine/servermaster/README.md index 5e6c3e5a8e4..6df6e72c1db 100644 --- a/engine/servermaster/README.md +++ b/engine/servermaster/README.md @@ -47,4 +47,4 @@ The master module consists of several components: 3. Start working thread. 4. Dispatch the tasks. - If failed, go back to step 2. - - If success, Update HA Store. + - If success, Update HA Store. \ No newline at end of file diff --git a/engine/test/e2e/docker.json b/engine/test/e2e/docker.json index 7fe13a2e6c5..b3cfe9bd0d7 100644 --- a/engine/test/e2e/docker.json +++ b/engine/test/e2e/docker.json @@ -1,11 +1,7 @@ { "demo_address": ["127.0.0.1:1234"], "demo_host": ["demo-server:1234"], - "master_address_list": [ - "127.0.0.1:10245", - "127.0.0.1:10246", - "127.0.0.1:10247" - ], + "master_address_list": ["127.0.0.1:10245", "127.0.0.1:10246", "127.0.0.1:10247"], "demo_record_num": 5000000, "job_num": 2, "file_num": 5 diff --git a/engine/test/e2e/tispace.json b/engine/test/e2e/tispace.json index e89aa186d76..ad9e4bdd95d 100644 --- a/engine/test/e2e/tispace.json +++ b/engine/test/e2e/tispace.json @@ -1,9 +1,9 @@ { - "demo_address": ["demo0:1234", "demo1:1234"], - "demo_host": ["demo0:1234", "demo1:1234"], - "master_address_list": ["cosm0:10240", "cosm1:10240", "cosm2:10240"], - "demo_record_num": 2000000, - "job_num": 300, - "file_num": 50, - "demo_data_dir": "/data" + "demo_address": ["demo0:1234", "demo1:1234"], + "demo_host": ["demo0:1234", "demo1:1234"], + "master_address_list": ["cosm0:10240", "cosm1:10240", "cosm2:10240"], + "demo_record_num": 2000000, + "job_num": 300, + "file_num": 50, + "demo_data_dir": "/data" } diff --git a/tests/integration_tests/README.md b/tests/integration_tests/README.md index 7473c24d475..a004c232890 100644 --- a/tests/integration_tests/README.md +++ b/tests/integration_tests/README.md @@ -2,49 +2,48 @@ ### Run integration tests locally -1. The following executables must be copied or generated or linked into these locations. The versions of them should be - the same as that of TiCDC. If you are compiling the master branch of TiCDC, try the latest release versions of the +1. The following executables must be copied or generated or linked into these locations. The versions of them should be + the same as that of TiCDC. If you are compiling the master branch of TiCDC, try the latest release versions of the components. - - `bin/tidb-server` # version >= 6.0.0-rc.1 - - `bin/tikv-server` # version >= 6.0.0-rc.1 - - `bin/pd-server` # version >= 6.0.0-rc.1 - - `bin/pd-ctl` # version >= 6.0.0-rc.1 - - `bin/tiflash` # needs tiflash binary and some necessary so files - - `bin/sync_diff_inspector` - - [bin/go-ycsb](https://github.com/pingcap/go-ycsb) - - [bin/etcdctl](https://github.com/etcd-io/etcd/tree/master/etcdctl) - - [bin/jq](https://stedolan.github.io/jq/) - - [bin/minio](https://github.com/minio/minio) - - > You can also download the binaries. `sync_diff_inspector` can be downloaded - > from [tidb-community-toolkit](https://download.pingcap.org/tidb-community-toolkit-v6.0.0-linux-amd64.tar.gz), - > `tidb-server` related binaries can be downloaded + * `bin/tidb-server` # version >= 6.0.0-rc.1 + * `bin/tikv-server` # version >= 6.0.0-rc.1 + * `bin/pd-server` # version >= 6.0.0-rc.1 + * `bin/pd-ctl` # version >= 6.0.0-rc.1 + * `bin/tiflash` # needs tiflash binary and some necessary so files + * `bin/sync_diff_inspector` + * [bin/go-ycsb](https://github.com/pingcap/go-ycsb) + * [bin/etcdctl](https://github.com/etcd-io/etcd/tree/master/etcdctl) + * [bin/jq](https://stedolan.github.io/jq/) + * [bin/minio](https://github.com/minio/minio) + + > You can also download the binaries. `sync_diff_inspector` can be downloaded + > from [tidb-community-toolkit](https://download.pingcap.org/tidb-community-toolkit-v6.0.0-linux-amd64.tar.gz), + > `tidb-server` related binaries can be downloaded > from [tidb-community-server](https://download.pingcap.org/tidb-community-server-v6.0.0-linux-amd64.tar.gz): - > If you are running tests on MacOS, tidb related binaries can be downloaded from tiup mirrors, such as - > https://tiup-mirrors.pingcap.com/tidb-v4.0.2-darwin-amd64.tar.gz. And `sync_diff_inspector` can be compiled by + > If you are running tests on MacOS, tidb related binaries can be downloaded from tiup mirrors, such as + > https://tiup-mirrors.pingcap.com/tidb-v4.0.2-darwin-amd64.tar.gz. And `sync_diff_inspector` can be compiled by > yourself from source [tidb-tools](https://github.com/pingcap/tidb-tools) - - > All Tiflash required files can be found in - > [tidb-community-server](https://download.pingcap.org/tidb-community-server-v6.0.0-linux-amd64.tar.gz) packages. + + > All Tiflash required files can be found in + > [tidb-community-server](https://download.pingcap.org/tidb-community-server-v6.0.0-linux-amd64.tar.gz) packages. > You should put `flash_cluster_manager`, `libtiflash_proxy.so` and `tiflash` into `bin` directory in TiCDC code base. > Old versions of Minio may cause the integration test cases to fail. You can get a newer version by installing it from source > ([Source Installation](https://github.com/minio/minio#install-from-source)). > [RELEASE.2022-05-08T23-50-31Z](https://github.com/minio/minio/releases/tag/RELEASE.2022-05-08T23-50-31Z) is suggested. -2. These are programs/packages need be installed. - - - [mysql](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/) (the MySQL cli client, +2. These are programs/packages need be installed. + * [mysql](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/) (the MySQL cli client, currently [mysql client 8.0 is not supported](https://github.com/pingcap/tidb/issues/14021)) - - [s3cmd](https://s3tools.org/download) - - unzip - - psmisc - + * [s3cmd](https://s3tools.org/download) + * unzip + * psmisc + > You can install `unzip` and `psmisc` using `apt-get` (Ubuntu / Debian) or `yum` (RHEL). - - > Since the integration test cases will use port 3306 on localhost, please make sure in advance that port 3306 is + + > Since the integration test cases will use port 3306 on localhost, please make sure in advance that port 3306 is > not occupied. (You’d like to stop the local MySQL service on port 3306, if there is one) 3. The user used to execute the tests must have permission to create the folder /tmp/tidb_cdc_test. All test artifacts @@ -54,8 +53,8 @@ The following programs must be installed: -- [docker](https://docs.docker.com/get-docker/) -- [docker-compose](https://docs.docker.com/compose/install/) +* [docker](https://docs.docker.com/get-docker/) +* [docker-compose](https://docs.docker.com/compose/install/) We recommend that you provide docker with at least 6+ cores and 8G+ memory. Of course, the more resources, the better. @@ -78,7 +77,7 @@ We recommend that you provide docker with at least 6+ cores and 8G+ memory. Of c 2. Execute `tests/integration_tests/run.sh` > If want to run one integration test case only, just pass the CASE parameter, such as `make integration_test CASE=simple`. - + > If want to run integration test cases from the specified one, just pass the START_AT parameter, such as `make integration_test START_AT=simple` . > There exists some environment variables that you can set by yourself, variable details can be found in [test_prepare](_utils/test_prepare). From 1df50acf97633758b1e6f1754be815bae7efadb3 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 10:41:52 +0800 Subject: [PATCH 12/21] fix more --- docs/swagger/swagger.json | 2038 ++++++++++++++++---------------- engine/sample/config/demo.json | 8 +- engine/test/e2e/docker.json | 12 +- 3 files changed, 1029 insertions(+), 1029 deletions(-) diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 56771004727..687cb281589 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -1,1021 +1,1021 @@ { - "swagger": "2.0", - "info": { - "contact": {} - }, - "paths": { - "/api/v1/captures": { - "get": { - "description": "list all captures in cdc cluster", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "capture" - ], - "summary": "List captures", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.Capture" - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds": { - "get": { - "description": "list all changefeeds in cdc cluster", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "List changefeed", - "parameters": [ - { - "type": "string", - "description": "state", - "name": "state", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ChangefeedCommonInfo" - } - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - }, - "post": { - "description": "create a new changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Create changefeed", - "parameters": [ - { - "description": "changefeed config", - "name": "changefeed", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/model.ChangefeedConfig" - } - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}": { - "get": { - "description": "get detail information of a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Get changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ChangefeedDetail" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - }, - "put": { - "description": "Update a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Update a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - }, - { - "description": "changefeed target ts", - "name": "target_ts", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "sink uri", - "name": "sink_uri", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "filter rules", - "name": "filter_rules", - "in": "body", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "description": "ignore transaction start ts", - "name": "ignore_txn_start_ts", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "mounter worker nums", - "name": "mounter_worker_num", - "in": "body", - "schema": { - "type": "integer" - } - }, - { - "description": "sink config", - "name": "sink_config", - "in": "body", - "schema": { - "$ref": "#/definitions/config.SinkConfig" - } - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - }, - "delete": { - "description": "Remove a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Remove a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/pause": { - "post": { - "description": "Pause a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Pause a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/resume": { - "post": { - "description": "Resume a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "Resume a changefeed", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed-id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/tables/move_table": { - "post": { - "description": "move one table to the target capture", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "move table", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - }, - { - "description": "table_id", - "name": "table_id", - "in": "body", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "capture_id", - "name": "capture_id", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/changefeeds/{changefeed_id}/tables/rebalance_table": { - "post": { - "description": "rebalance all tables of a changefeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "changefeed" - ], - "summary": "rebalance tables", - "parameters": [ - { - "type": "string", - "description": "changefeed_id", - "name": "changefeed_id", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/health": { - "get": { - "description": "check if CDC cluster is health", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "common" - ], - "summary": "Check if CDC cluster is health", - "responses": { - "200": { - "description": "" - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/log": { - "post": { - "description": "change TiCDC log level dynamically", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "common" - ], - "summary": "Change TiCDC log level", - "parameters": [ - { - "description": "log level", - "name": "log_level", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/owner/resign": { - "post": { - "description": "notify the current owner to resign", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "owner" - ], - "summary": "notify the owner to resign", - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/processors": { - "get": { - "description": "list all processors in the TiCDC cluster", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "processor" - ], - "summary": "List processors", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/model.ProcessorCommonInfo" - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/processors/{changefeed_id}/{capture_id}": { - "get": { - "description": "get the detail information of a processor", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "processor" - ], - "summary": "Get processor detail information", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ProcessorDetail" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - }, - "/api/v1/status": { - "get": { - "description": "get the status of a server(capture)", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "common" - ], - "summary": "Get server status", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/model.ServerStatus" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/model.HTTPError" - } - } - } - } - } - }, - "definitions": { - "config.ColumnSelector": { - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "string" - } - }, - "matcher": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "config.DispatchRule": { - "type": "object", - "properties": { - "dispatcher": { - "description": "Deprecated, please use PartitionRule.", - "type": "string" - }, - "matcher": { - "type": "array", - "items": { - "type": "string" - } - }, - "partition": { - "description": "PartitionRule is an alias added for DispatcherRule to mitigate confusions.\nIn the future release, the DispatcherRule is expected to be removed .", - "type": "string" - }, - "topic": { - "type": "string" - } - } - }, - "config.SinkConfig": { - "type": "object", - "properties": { - "column-selectors": { - "type": "array", - "items": { - "$ref": "#/definitions/config.ColumnSelector" - } - }, - "dispatchers": { - "type": "array", - "items": { - "$ref": "#/definitions/config.DispatchRule" - } - }, - "protocol": { - "type": "string" - }, - "schema-registry": { - "type": "string" - } - } - }, - "model.Capture": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_owner": { - "type": "boolean" - } - } - }, - "model.CaptureTaskStatus": { - "type": "object", - "properties": { - "capture_id": { - "type": "string" - }, - "table_ids": { - "description": "Table list, containing tables that processor should process", - "type": "array", - "items": { - "type": "integer" - } - }, - "table_operations": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/model.TableOperation" - } - } - } - }, - "model.ChangefeedCommonInfo": { - "type": "object", - "properties": { - "checkpoint_time": { - "type": "string" - }, - "checkpoint_tso": { - "type": "integer" - }, - "error": { - "$ref": "#/definitions/model.RunningError" - }, - "id": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "state": { - "type": "string" - } - } - }, - "model.ChangefeedConfig": { - "type": "object", - "properties": { - "changefeed_id": { - "type": "string" - }, - "filter_rules": { - "type": "array", - "items": { - "type": "string" - } - }, - "force_replicate": { - "description": "if true, force to replicate some ineligible tables", - "type": "boolean", - "default": false - }, - "ignore_ineligible_table": { - "type": "boolean", - "default": false - }, - "ignore_txn_start_ts": { - "type": "array", - "items": { - "type": "integer" - } - }, - "mounter_worker_num": { - "type": "integer", - "default": 16 - }, - "namespace": { - "type": "string" - }, - "sink_config": { - "$ref": "#/definitions/config.SinkConfig" - }, - "sink_uri": { - "type": "string" - }, - "start_ts": { - "type": "integer" - }, - "target_ts": { - "type": "integer" - }, - "timezone": { - "description": "timezone used when checking sink uri", - "type": "string", - "default": "system" - } - } - }, - "model.ChangefeedDetail": { - "type": "object", - "properties": { - "checkpoint_time": { - "type": "string" - }, - "checkpoint_tso": { - "type": "integer" - }, - "create_time": { - "type": "string" - }, - "creator_version": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/model.RunningError" - }, - "error_history": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "resolved_ts": { - "type": "integer" - }, - "sink_uri": { - "type": "string" - }, - "sort_engine": { - "type": "string" - }, - "start_ts": { - "type": "integer" - }, - "state": { - "type": "string" - }, - "target_ts": { - "type": "integer" - }, - "task_status": { - "type": "array", - "items": { - "$ref": "#/definitions/model.CaptureTaskStatus" - } - } - } - }, - "model.HTTPError": { - "type": "object", - "properties": { - "error_code": { - "type": "string" - }, - "error_msg": { - "type": "string" - } - } - }, - "model.ProcessorCommonInfo": { - "type": "object", - "properties": { - "capture_id": { - "type": "string" - }, - "changefeed_id": { - "type": "string" - }, - "namespace": { - "type": "string" - } - } - }, - "model.ProcessorDetail": { - "type": "object", - "properties": { - "checkpoint_ts": { - "description": "The maximum event CommitTs that has been synchronized.", - "type": "integer" - }, - "count": { - "description": "The count of events that have been replicated.", - "type": "integer" - }, - "error": { - "description": "Error code when error happens", - "$ref": "#/definitions/model.RunningError" - }, - "resolved_ts": { - "description": "The event that satisfies CommitTs \u003c= ResolvedTs can be synchronized.", - "type": "integer" - }, - "table_ids": { - "description": "all table ids that this processor are replicating", - "type": "array", - "items": { - "type": "integer" - } - } - } - }, - "model.RunningError": { - "type": "object", - "properties": { - "addr": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, - "model.ServerStatus": { - "type": "object", - "properties": { - "git_hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_owner": { - "type": "boolean" - }, - "pid": { - "type": "integer" - }, - "version": { - "type": "string" - } - } - }, - "model.TableOperation": { - "type": "object", - "properties": { - "boundary_ts": { - "description": "if the operation is a delete operation, BoundaryTs is checkpoint ts\nif the operation is an add operation, BoundaryTs is start ts", - "type": "integer" - }, - "delete": { - "type": "boolean" - }, - "flag": { - "type": "integer" - }, - "status": { - "type": "integer" - } - } - } - } + "swagger": "2.0", + "info": { + "contact": {} + }, + "paths": { + "/api/v1/captures": { + "get": { + "description": "list all captures in cdc cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "capture" + ], + "summary": "List captures", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Capture" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds": { + "get": { + "description": "list all changefeeds in cdc cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "List changefeed", + "parameters": [ + { + "type": "string", + "description": "state", + "name": "state", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ChangefeedCommonInfo" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + }, + "post": { + "description": "create a new changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Create changefeed", + "parameters": [ + { + "description": "changefeed config", + "name": "changefeed", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ChangefeedConfig" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds/{changefeed_id}": { + "get": { + "description": "get detail information of a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Get changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ChangefeedDetail" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + }, + "put": { + "description": "Update a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Update a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + }, + { + "description": "changefeed target ts", + "name": "target_ts", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "sink uri", + "name": "sink_uri", + "in": "body", + "schema": { + "type": "string" + } + }, + { + "description": "filter rules", + "name": "filter_rules", + "in": "body", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "ignore transaction start ts", + "name": "ignore_txn_start_ts", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "mounter worker nums", + "name": "mounter_worker_num", + "in": "body", + "schema": { + "type": "integer" + } + }, + { + "description": "sink config", + "name": "sink_config", + "in": "body", + "schema": { + "$ref": "#/definitions/config.SinkConfig" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + }, + "delete": { + "description": "Remove a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Remove a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds/{changefeed_id}/pause": { + "post": { + "description": "Pause a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Pause a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds/{changefeed_id}/resume": { + "post": { + "description": "Resume a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "Resume a changefeed", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed-id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds/{changefeed_id}/tables/move_table": { + "post": { + "description": "move one table to the target capture", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "move table", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + }, + { + "description": "table_id", + "name": "table_id", + "in": "body", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "capture_id", + "name": "capture_id", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/changefeeds/{changefeed_id}/tables/rebalance_table": { + "post": { + "description": "rebalance all tables of a changefeed", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "changefeed" + ], + "summary": "rebalance tables", + "parameters": [ + { + "type": "string", + "description": "changefeed_id", + "name": "changefeed_id", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/health": { + "get": { + "description": "check if CDC cluster is health", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Check if CDC cluster is health", + "responses": { + "200": { + "description": "" + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/log": { + "post": { + "description": "change TiCDC log level dynamically", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Change TiCDC log level", + "parameters": [ + { + "description": "log level", + "name": "log_level", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/owner/resign": { + "post": { + "description": "notify the current owner to resign", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "owner" + ], + "summary": "notify the owner to resign", + "responses": { + "202": { + "description": "" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/processors": { + "get": { + "description": "list all processors in the TiCDC cluster", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "processor" + ], + "summary": "List processors", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ProcessorCommonInfo" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/processors/{changefeed_id}/{capture_id}": { + "get": { + "description": "get the detail information of a processor", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "processor" + ], + "summary": "Get processor detail information", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ProcessorDetail" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + }, + "/api/v1/status": { + "get": { + "description": "get the status of a server(capture)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "common" + ], + "summary": "Get server status", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/model.ServerStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/model.HTTPError" + } + } + } + } + } + }, + "definitions": { + "config.ColumnSelector": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "matcher": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "config.DispatchRule": { + "type": "object", + "properties": { + "dispatcher": { + "description": "Deprecated, please use PartitionRule.", + "type": "string" + }, + "matcher": { + "type": "array", + "items": { + "type": "string" + } + }, + "partition": { + "description": "PartitionRule is an alias added for DispatcherRule to mitigate confusions.\nIn the future release, the DispatcherRule is expected to be removed .", + "type": "string" + }, + "topic": { + "type": "string" + } + } + }, + "config.SinkConfig": { + "type": "object", + "properties": { + "column-selectors": { + "type": "array", + "items": { + "$ref": "#/definitions/config.ColumnSelector" + } + }, + "dispatchers": { + "type": "array", + "items": { + "$ref": "#/definitions/config.DispatchRule" + } + }, + "protocol": { + "type": "string" + }, + "schema-registry": { + "type": "string" + } + } + }, + "model.Capture": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_owner": { + "type": "boolean" + } + } + }, + "model.CaptureTaskStatus": { + "type": "object", + "properties": { + "capture_id": { + "type": "string" + }, + "table_ids": { + "description": "Table list, containing tables that processor should process", + "type": "array", + "items": { + "type": "integer" + } + }, + "table_operations": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/model.TableOperation" + } + } + } + }, + "model.ChangefeedCommonInfo": { + "type": "object", + "properties": { + "checkpoint_time": { + "type": "string" + }, + "checkpoint_tso": { + "type": "integer" + }, + "error": { + "$ref": "#/definitions/model.RunningError" + }, + "id": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "model.ChangefeedConfig": { + "type": "object", + "properties": { + "changefeed_id": { + "type": "string" + }, + "filter_rules": { + "type": "array", + "items": { + "type": "string" + } + }, + "force_replicate": { + "description": "if true, force to replicate some ineligible tables", + "type": "boolean", + "default": false + }, + "ignore_ineligible_table": { + "type": "boolean", + "default": false + }, + "ignore_txn_start_ts": { + "type": "array", + "items": { + "type": "integer" + } + }, + "mounter_worker_num": { + "type": "integer", + "default": 16 + }, + "namespace": { + "type": "string" + }, + "sink_config": { + "$ref": "#/definitions/config.SinkConfig" + }, + "sink_uri": { + "type": "string" + }, + "start_ts": { + "type": "integer" + }, + "target_ts": { + "type": "integer" + }, + "timezone": { + "description": "timezone used when checking sink uri", + "type": "string", + "default": "system" + } + } + }, + "model.ChangefeedDetail": { + "type": "object", + "properties": { + "checkpoint_time": { + "type": "string" + }, + "checkpoint_tso": { + "type": "integer" + }, + "create_time": { + "type": "string" + }, + "creator_version": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/model.RunningError" + }, + "error_history": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "resolved_ts": { + "type": "integer" + }, + "sink_uri": { + "type": "string" + }, + "sort_engine": { + "type": "string" + }, + "start_ts": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "target_ts": { + "type": "integer" + }, + "task_status": { + "type": "array", + "items": { + "$ref": "#/definitions/model.CaptureTaskStatus" + } + } + } + }, + "model.HTTPError": { + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "error_msg": { + "type": "string" + } + } + }, + "model.ProcessorCommonInfo": { + "type": "object", + "properties": { + "capture_id": { + "type": "string" + }, + "changefeed_id": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "model.ProcessorDetail": { + "type": "object", + "properties": { + "checkpoint_ts": { + "description": "The maximum event CommitTs that has been synchronized.", + "type": "integer" + }, + "count": { + "description": "The count of events that have been replicated.", + "type": "integer" + }, + "error": { + "description": "Error code when error happens", + "$ref": "#/definitions/model.RunningError" + }, + "resolved_ts": { + "description": "The event that satisfies CommitTs \u003c= ResolvedTs can be synchronized.", + "type": "integer" + }, + "table_ids": { + "description": "all table ids that this processor are replicating", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "model.RunningError": { + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "model.ServerStatus": { + "type": "object", + "properties": { + "git_hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_owner": { + "type": "boolean" + }, + "pid": { + "type": "integer" + }, + "version": { + "type": "string" + } + } + }, + "model.TableOperation": { + "type": "object", + "properties": { + "boundary_ts": { + "description": "if the operation is a delete operation, BoundaryTs is checkpoint ts\nif the operation is an add operation, BoundaryTs is start ts", + "type": "integer" + }, + "delete": { + "type": "boolean" + }, + "flag": { + "type": "integer" + }, + "status": { + "type": "integer" + } + } + } + } } \ No newline at end of file diff --git a/engine/sample/config/demo.json b/engine/sample/config/demo.json index 90dfc0b48b7..3f0a88ec6ec 100644 --- a/engine/sample/config/demo.json +++ b/engine/sample/config/demo.json @@ -1,5 +1,5 @@ { - "srcHost":"demo-server:1234", - " dstHost":"demo-server:1234", - " dstDir":"/data1" -} + "srcHost":"demo-server:1234", + "dstHost":"demo-server:1234", + "dstDir":"/data1" +} \ No newline at end of file diff --git a/engine/test/e2e/docker.json b/engine/test/e2e/docker.json index b3cfe9bd0d7..e0cac9c87ac 100644 --- a/engine/test/e2e/docker.json +++ b/engine/test/e2e/docker.json @@ -1,8 +1,8 @@ { - "demo_address": ["127.0.0.1:1234"], - "demo_host": ["demo-server:1234"], - "master_address_list": ["127.0.0.1:10245", "127.0.0.1:10246", "127.0.0.1:10247"], - "demo_record_num": 5000000, - "job_num": 2, - "file_num": 5 + "demo_address": ["127.0.0.1:1234"], + "demo_host": ["demo-server:1234"], + "master_address_list": ["127.0.0.1:10245", "127.0.0.1:10246", "127.0.0.1:10247"], + "demo_record_num": 5000000, + "job_num": 2, + "file_num": 5 } From 1057f364631ef660df5373eefd6776db8bf1cef3 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 10:43:51 +0800 Subject: [PATCH 13/21] fix --- engine/sample/config/demo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/sample/config/demo.json b/engine/sample/config/demo.json index 3f0a88ec6ec..d9973346064 100644 --- a/engine/sample/config/demo.json +++ b/engine/sample/config/demo.json @@ -2,4 +2,4 @@ "srcHost":"demo-server:1234", "dstHost":"demo-server:1234", "dstDir":"/data1" -} \ No newline at end of file +} From 17eb660366d3aaf8bb2fd45bbd5987ed0572cbff Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 10:44:21 +0800 Subject: [PATCH 14/21] fix --- engine/sample/config/demo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/sample/config/demo.json b/engine/sample/config/demo.json index d9973346064..dcbb7688adf 100644 --- a/engine/sample/config/demo.json +++ b/engine/sample/config/demo.json @@ -1,5 +1,5 @@ { - "srcHost":"demo-server:1234", - "dstHost":"demo-server:1234", - "dstDir":"/data1" + "srcHost":"demo-server:1234", + "dstHost":"demo-server:1234", + "dstDir":"/data1" } From c39ff51fd96331cfc1e94c3537bd1bf032cb3ed5 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 10:44:51 +0800 Subject: [PATCH 15/21] fix json --- engine/sample/config/demo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/sample/config/demo.json b/engine/sample/config/demo.json index dcbb7688adf..85165f14b32 100644 --- a/engine/sample/config/demo.json +++ b/engine/sample/config/demo.json @@ -1,5 +1,5 @@ { - "srcHost":"demo-server:1234", - "dstHost":"demo-server:1234", - "dstDir":"/data1" + "srcHost":"demo-server:1234", + "dstHost":"demo-server:1234", + "dstDir":"/data1" } From f4f5196d64b576f807979143c0534de5aec0c0f8 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 11:02:25 +0800 Subject: [PATCH 16/21] fix more --- cdc/entry/mounter_test.go | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index d335314a759..c92ea42c87d 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -588,12 +588,14 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql flag null", ColInfo: timodel.ColumnInfo{FieldType: *ftNull}, Res: nil, + Default: nil, }, // mysql.TypeTiny + notnull + nodefault { Name: "mysql.TypeTiny + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNull.Clone()}, Res: int64(0), + Default: nil, }, // mysql.TypeTiny + notnull + default { @@ -610,6 +612,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeTiny + notnull + default + unsigned", ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNotNullUnSigned}, Res: uint64(0), + Default: nil, }, // mysql.TypeTiny + notnull + default + unsigned { @@ -624,44 +627,49 @@ func TestGetDefaultZeroValue(t *testing.T) { OriginDefaultValue: -1314, FieldType: *ftTinyIntNull, }, - Res: int64(-1314), - Default: int64(-1314), + Res: int64(-1314), }, // mysql.TypeTiny + null + nodefault { Name: "mysql.TypeTiny + null + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTinyIntNull}, Res: nil, + Default: nil, }, // mysql.TypeShort, others testCases same as tiny { Name: "mysql.TypeShort, others testCases same as tiny", ColInfo: timodel.ColumnInfo{FieldType: *ftShortNotNull}, Res: int64(0), + Default: nil, }, // mysql.TypeLong, others testCases same as tiny { Name: "mysql.TypeLong, others testCases same as tiny", ColInfo: timodel.ColumnInfo{FieldType: *ftLongNotNull}, Res: int64(0), + Default: nil, }, // mysql.TypeLonglong, others testCases same as tiny { Name: "mysql.TypeLonglong, others testCases same as tiny", ColInfo: timodel.ColumnInfo{FieldType: *ftLongLongNotNull}, Res: int64(0), + Default: nil, }, // mysql.TypeInt24, others testCases same as tiny { Name: "mysql.TypeInt24, others testCases same as tiny", ColInfo: timodel.ColumnInfo{FieldType: *ftInt24NotNull}, Res: int64(0), + Default: nil, }, // mysql.TypeFloat + notnull + nodefault { Name: "mysql.TypeFloat + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeFloatNotNull}, Res: float64(0), + Default: nil, }, // mysql.TypeFloat + notnull + default { @@ -716,18 +724,21 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeDouble, other testCases same as float", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDoubleNotNull}, Res: float64(0), + Default: nil, }, // mysql.TypeNewDecimal + notnull + nodefault { Name: "mysql.TypeNewDecimal + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNotNull}, Res: "0", // related with Flen and Decimal + Default: nil, }, // mysql.TypeNewDecimal + null + nodefault { Name: "mysql.TypeNewDecimal + null + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDecimalNull}, Res: nil, + Default: nil, }, // mysql.TypeNewDecimal + null + default { @@ -744,12 +755,14 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeNull", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNull}, Res: nil, + Default: nil, }, // mysql.TypeTimestamp + notnull + nodefault { Name: "mysql.TypeTimestamp + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeTimestampNotNull}, Res: "0000-00-00 00:00:00", + Default: nil, }, // mysql.TypeTimestamp + notnull + default { @@ -776,24 +789,28 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeDate, other testCases same as TypeTimestamp", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDateNotNull}, Res: "0000-00-00", + Default: nil, }, // mysql.TypeDuration, other testCases same as TypeTimestamp { Name: "mysql.TypeDuration, other testCases same as TypeTimestamp", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDurationNotNull}, Res: "00:00:00", + Default: nil, }, // mysql.TypeDatetime, other testCases same as TypeTimestamp { Name: "mysql.TypeDatetime, other testCases same as TypeTimestamp", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeDatetimeNotNull}, Res: "0000-00-00 00:00:00", + Default: nil, }, // mysql.TypeYear + notnull + nodefault { Name: "mysql.TypeYear + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeYearNotNull}, Res: int64(0), + Default: nil, }, // mysql.TypeYear + notnull + default { @@ -811,12 +828,14 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeNewDate", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeNewDateNotNull}, Res: nil, // [TODO] seems not support by TiDB, need check + Default: nil, }, // mysql.TypeVarchar + notnull + nodefault { Name: "mysql.TypeVarchar + notnull + nodefault", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeVarcharNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeVarchar + notnull + default { @@ -834,42 +853,49 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeTinyBlob", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeTinyBlobNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeMediumBlob { Name: "mysql.TypeMediumBlob", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeMediumBlobNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeLongBlob { Name: "mysql.TypeLongBlob", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeLongBlobNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeBlob { Name: "mysql.TypeBlob", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeBlobNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeVarString { Name: "mysql.TypeVarString", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeVarStringNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeString { Name: "mysql.TypeString", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeStringNotNull}, Res: []byte{}, + Default: nil, }, // mysql.TypeBit { Name: "mysql.TypeBit", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeBitNotNull}, Res: uint64(0), + Default: nil, }, // BLOB, TEXT, GEOMETRY or JSON column can't have a default value // mysql.TypeJSON @@ -877,6 +903,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeJSON", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeJSONNotNull}, Res: "null", + Default: nil, }, // mysql.TypeEnum + notnull + nodefault { @@ -903,6 +930,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeSet + notnull", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeSetNotNull}, Res: uint64(0), + Default: nil, }, // mysql.TypeSet + notnull + default { @@ -920,6 +948,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeGeometry", ColInfo: timodel.ColumnInfo{FieldType: *ftTypeGeometryNotNull}, Res: nil, // not support yet + Default: nil, }, } From 0d9fc9d04c6850c727832d581f3fe0ed6a140223 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 11:06:19 +0800 Subject: [PATCH 17/21] fix ut --- cdc/sink/mq/codec/avro.go | 14 +++++++------- cdc/sink/mq/codec/avro_test.go | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cdc/sink/mq/codec/avro.go b/cdc/sink/mq/codec/avro.go index a0d0e0042b9..6a451566960 100644 --- a/cdc/sink/mq/codec/avro.go +++ b/cdc/sink/mq/codec/avro.go @@ -541,7 +541,7 @@ func columnToAvroSchema( Parameters: map[string]string{tidbType: tt}, }, nil case mysql.TypeBit: - displayFlen := ft.Flen + displayFlen := ft.GetFlen() if displayFlen == -1 { displayFlen, _ = mysql.GetDefaultFieldLengthAndDecimal(col.Type) } @@ -554,8 +554,8 @@ func columnToAvroSchema( }, nil case mysql.TypeNewDecimal: if decimalHandlingMode == decimalHandlingModePrecise { - defaultFlen, defaultDecimal := mysql.GetDefaultFieldLengthAndDecimal(ft.Tp) - displayFlen, displayDecimal := ft.Flen, ft.Decimal + defaultFlen, defaultDecimal := mysql.GetDefaultFieldLengthAndDecimal(ft.GetType()) + displayFlen, displayDecimal := ft.GetFlen(), ft.GetDecimal() // length not specified, set it to system type default if displayFlen == -1 { displayFlen = defaultFlen @@ -598,8 +598,8 @@ func columnToAvroSchema( Parameters: map[string]string{tidbType: tt}, }, nil case mysql.TypeEnum, mysql.TypeSet: - es := make([]string, 0, len(ft.Elems)) - for _, e := range ft.Elems { + es := make([]string, 0, len(ft.GetElems())) + for _, e := range ft.GetElems() { e = escapeEnumAndSetOptions(e) es = append(es, e) } @@ -742,7 +742,7 @@ func columnToAvroData( if v, ok := col.Value.(string); ok { return v, "string", nil } - enumVar, err := types.ParseEnumValue(ft.Elems, col.Value.(uint64)) + enumVar, err := types.ParseEnumValue(ft.GetElems(), col.Value.(uint64)) if err != nil { return nil, "", cerror.WrapError(cerror.ErrAvroEncodeFailed, err) } @@ -751,7 +751,7 @@ func columnToAvroData( if v, ok := col.Value.(string); ok { return v, "string", nil } - setVar, err := types.ParseSetValue(ft.Elems, col.Value.(uint64)) + setVar, err := types.ParseSetValue(ft.GetElems(), col.Value.(uint64)) if err != nil { return nil, "", cerror.WrapError(cerror.ErrAvroEncodeFailed, err) } diff --git a/cdc/sink/mq/codec/avro_test.go b/cdc/sink/mq/codec/avro_test.go index 87e99de4ec1..5afb731ae83 100644 --- a/cdc/sink/mq/codec/avro_test.go +++ b/cdc/sink/mq/codec/avro_test.go @@ -78,12 +78,12 @@ func setBinChsClnFlag(ft *types.FieldType) *types.FieldType { } func setFlag(ft *types.FieldType, flag uint) *types.FieldType { - types.SetTypeFlag(&ft.Flag, flag, true) + ft.SetFlag(flag) return ft } func setElems(ft *types.FieldType, elems []string) *types.FieldType { - ft.Elems = elems + ft.SetElems(elems) return ft } From bf80577a28d1aeb440b056edeb89fa46036ae001 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 11:15:48 +0800 Subject: [PATCH 18/21] fix mounter test --- cdc/entry/mounter_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cdc/entry/mounter_test.go b/cdc/entry/mounter_test.go index c92ea42c87d..cc5dd8c26ef 100644 --- a/cdc/entry/mounter_test.go +++ b/cdc/entry/mounter_test.go @@ -619,6 +619,7 @@ func TestGetDefaultZeroValue(t *testing.T) { Name: "mysql.TypeTiny + notnull + unsigned", ColInfo: timodel.ColumnInfo{OriginDefaultValue: uint64(1314), FieldType: *ftTinyIntNotNullUnSigned}, Res: uint64(1314), + Default: uint64(1314), }, // mysql.TypeTiny + null + default { @@ -627,7 +628,8 @@ func TestGetDefaultZeroValue(t *testing.T) { OriginDefaultValue: -1314, FieldType: *ftTinyIntNull, }, - Res: int64(-1314), + Res: int64(-1314), + Default: int64(-1314), }, // mysql.TypeTiny + null + nodefault { @@ -953,7 +955,6 @@ func TestGetDefaultZeroValue(t *testing.T) { } for _, tc := range testCases { - println("run case", tc.Name) val, _, _, _ := getDefaultOrZeroValue(&tc.ColInfo) require.Equal(t, tc.Res, val, tc.Name) val = getDDLDefaultDefinition(&tc.ColInfo) From a7eb56982f2a6ff0f7521c30c17797f0ac05061a Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Wed, 25 May 2022 13:44:27 +0800 Subject: [PATCH 19/21] fix a test --- cdc/entry/schema_storage_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdc/entry/schema_storage_test.go b/cdc/entry/schema_storage_test.go index bfbb79df942..7f23d0c26d7 100644 --- a/cdc/entry/schema_storage_test.go +++ b/cdc/entry/schema_storage_test.go @@ -821,7 +821,7 @@ func TestExplicitTables(t *testing.T) { require.GreaterOrEqual(t, snap2.TableCount(false), 4) require.Equal(t, snap3.TableCount(true)-snap1.TableCount(true), 5) - require.Equal(t, snap3.TableCount(false), 36) + require.Equal(t, snap3.TableCount(false), 37) } /* From 919f6d078a89d8dc2a4f6f06bfc06eb65ae4a738 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Sat, 28 May 2022 13:08:59 +0800 Subject: [PATCH 20/21] port #5388 --- cdc/puller/mock_puller.go | 636 +++++++++++++------------- dm/pkg/conn/basedb.go | 6 +- dm/pkg/schema/tracker.go | 2 +- dm/relay/relay.go | 4 +- dm/syncer/util.go | 4 +- dm/tests/tls/conf/source-only-ca.yaml | 13 + dm/tests/tls/run.sh | 13 +- go.mod | 9 +- go.sum | 21 +- 9 files changed, 366 insertions(+), 342 deletions(-) create mode 100644 dm/tests/tls/conf/source-only-ca.yaml diff --git a/cdc/puller/mock_puller.go b/cdc/puller/mock_puller.go index 953585454f7..bbfb788f85c 100644 --- a/cdc/puller/mock_puller.go +++ b/cdc/puller/mock_puller.go @@ -13,321 +13,321 @@ package puller -import ( - "context" - "sync" - "time" - - "github.com/pingcap/check" - "github.com/pingcap/kvproto/pkg/kvrpcpb" - "github.com/pingcap/log" - "github.com/pingcap/tidb/domain" - tidbkv "github.com/pingcap/tidb/kv" - timodel "github.com/pingcap/tidb/parser/model" - "github.com/pingcap/tidb/session" - "github.com/pingcap/tidb/store/mockstore" - "github.com/pingcap/tidb/util/testkit" - "github.com/pingcap/tiflow/cdc/model" - "github.com/pingcap/tiflow/pkg/regionspan" - "github.com/tikv/client-go/v2/testutils" - "go.uber.org/zap" -) - -type mvccListener struct { - testutils.MVCCStore - mu sync.RWMutex - postPrewrite func(req *kvrpcpb.PrewriteRequest, result []error) - postCommit func(keys [][]byte, startTs, commitTs uint64, result error) - postRollback func(keys [][]byte, startTs uint64, result error) -} - -func newMVCCListener(store testutils.MVCCStore) *mvccListener { - return &mvccListener{ - MVCCStore: store, - postPrewrite: func(_ *kvrpcpb.PrewriteRequest, _ []error) {}, - postCommit: func(_ [][]byte, _, _ uint64, _ error) {}, - postRollback: func(_ [][]byte, _ uint64, _ error) {}, - } -} - -// Prewrite implements the MVCCStore interface -func (l *mvccListener) Prewrite(req *kvrpcpb.PrewriteRequest) []error { - l.mu.RLock() - defer l.mu.RUnlock() - result := l.MVCCStore.Prewrite(req) - log.Debug("mvccListener Prewrite", zap.Reflect("req", req), zap.Reflect("result", result)) - l.postPrewrite(req, result) - return result -} - -// Commit implements the MVCCStore interface -func (l *mvccListener) Commit(keys [][]byte, startTs, commitTs uint64) error { - l.mu.RLock() - defer l.mu.RUnlock() - result := l.MVCCStore.Commit(keys, startTs, commitTs) - log.Debug("mvccListener Commit", zap.Reflect("keys", keys), - zap.Uint64("startTs", startTs), - zap.Uint64("commitTs", commitTs), - zap.Reflect("result", result)) - l.postCommit(keys, startTs, commitTs, result) - return result -} - -// Rollback implements the MVCCStore interface -func (l *mvccListener) Rollback(keys [][]byte, startTs uint64) error { - l.mu.RLock() - defer l.mu.RUnlock() - result := l.MVCCStore.Rollback(keys, startTs) - log.Debug("mvccListener Commit", zap.Reflect("keys", keys), - zap.Uint64("startTs", startTs), - zap.Reflect("result", result)) - l.postRollback(keys, startTs, result) - return result -} - -func (l *mvccListener) registerPostPrewrite(fn func(req *kvrpcpb.PrewriteRequest, result []error)) { - l.mu.Lock() - defer l.mu.Unlock() - l.postPrewrite = fn -} - -func (l *mvccListener) registerPostCommit(fn func(keys [][]byte, startTs, commitTs uint64, result error)) { - l.mu.Lock() - defer l.mu.Unlock() - l.postCommit = fn -} - -func (l *mvccListener) registerPostRollback(fn func(keys [][]byte, startTs uint64, result error)) { - l.mu.Lock() - defer l.mu.Unlock() - l.postRollback = fn -} - -// MockPullerManager keeps track of transactions for mock pullers -type MockPullerManager struct { - mvccStore testutils.MVCCStore - store tidbkv.Storage - domain *domain.Domain - - txnMap map[uint64]*kvrpcpb.PrewriteRequest - tidbKit *testkit.TestKit - - rawKVEntries []*model.RawKVEntry - - txnMapMu sync.Mutex - rawKVEntriesMu sync.RWMutex - closeCh chan struct{} - - c *check.C -} - -var _ Puller = &mockPuller{} - -type mockPuller struct { - pm *MockPullerManager - spans []regionspan.ComparableSpan - resolvedTs uint64 - startTs uint64 - rawKVOffset int -} - -func (p *mockPuller) Output() <-chan *model.RawKVEntry { - panic("implement me") -} - -func (p *mockPuller) SortedOutput(ctx context.Context) <-chan *model.RawKVEntry { - output := make(chan *model.RawKVEntry, 16) - go func() { - for { - p.pm.rawKVEntriesMu.RLock() - for ; p.rawKVOffset < len(p.pm.rawKVEntries); p.rawKVOffset++ { - rawKV := p.pm.rawKVEntries[p.rawKVOffset] - if rawKV.StartTs < p.startTs { - continue - } - p.resolvedTs = rawKV.StartTs - if !regionspan.KeyInSpans(rawKV.Key, p.spans) { - continue - } - select { - case <-ctx.Done(): - return - case output <- rawKV: - } - } - p.pm.rawKVEntriesMu.RUnlock() - time.Sleep(time.Millisecond * 100) - } - }() - return output -} - -func (p *mockPuller) Run(ctx context.Context) error { - // Do nothing - select { - case <-ctx.Done(): - return ctx.Err() - case <-p.pm.closeCh: - return nil - } -} - -func (p *mockPuller) GetResolvedTs() uint64 { - return p.resolvedTs -} - -func (p *mockPuller) IsInitialized() bool { - return false -} - -// NewMockPullerManager creates and sets up a mock puller manager -func NewMockPullerManager(c *check.C, newRowFormat bool) *MockPullerManager { - m := &MockPullerManager{ - txnMap: make(map[uint64]*kvrpcpb.PrewriteRequest), - closeCh: make(chan struct{}), - c: c, - } - m.setUp(newRowFormat) - return m -} - -func (m *MockPullerManager) setUp(newRowFormat bool) { - // avoid to print too many logs - logLevel := log.GetLevel() - log.SetLevel(zap.FatalLevel) - defer log.SetLevel(logLevel) - - rpcClient, _, _, _ := testutils.NewMockTiKV("", nil) - mvccListener := newMVCCListener(rpcClient.MvccStore) - - m.mvccStore = mvccListener - store, err := mockstore.NewMockStore() - if err != nil { - log.Panic("create mock puller failed", zap.Error(err)) - } - m.store = store - - session.SetSchemaLease(0) - session.DisableStats4Test() - m.domain, err = session.BootstrapSession(m.store) - if err != nil { - log.Panic("create mock puller failed", zap.Error(err)) - } - - m.domain.SetStatsUpdating(true) - - m.tidbKit = testkit.NewTestKit(m.c, m.store) - m.MustExec("use test;") - m.tidbKit.Se.GetSessionVars().RowEncoder.Enable = newRowFormat - - mvccListener.registerPostPrewrite(m.postPrewrite) - mvccListener.registerPostCommit(m.postCommit) - mvccListener.registerPostRollback(m.postRollback) -} - -// TearDown release all resources in a mock puller manager -func (m *MockPullerManager) TearDown() { - m.mvccStore.Close() //nolint:errcheck - m.store.Close() //nolint:errcheck - m.domain.Close() -} - -// CreatePuller returns a mock puller with the specified start ts and spans -func (m *MockPullerManager) CreatePuller(startTs uint64, spans []regionspan.ComparableSpan) Puller { - return &mockPuller{ - spans: spans, - pm: m, - startTs: startTs, - } -} - -// MustExec delegates to TestKit.MustExec -func (m *MockPullerManager) MustExec(sql string, args ...interface{}) { - m.tidbKit.MustExec(sql, args...) -} - -// GetTableInfo queries the info schema with the table name and returns the TableInfo -func (m *MockPullerManager) GetTableInfo(schemaName, tableName string) *model.TableInfo { - is := m.domain.InfoSchema() - tbl, err := is.TableByName(timodel.NewCIStr(schemaName), timodel.NewCIStr(tableName)) - m.c.Assert(err, check.IsNil) - dbInfo, exist := is.SchemaByTable(tbl.Meta()) - m.c.Assert(exist, check.IsTrue) - return model.WrapTableInfo(dbInfo.ID, dbInfo.Name.O, 0, tbl.Meta()) -} - -func (m *MockPullerManager) postPrewrite(req *kvrpcpb.PrewriteRequest, result []error) { - m.txnMapMu.Lock() - defer m.txnMapMu.Unlock() - if anyError(result) { - return - } - m.txnMap[req.StartVersion] = req -} - -func (m *MockPullerManager) postCommit(keys [][]byte, startTs, commitTs uint64, result error) { - m.txnMapMu.Lock() - if result != nil { - return - } - prewrite, exist := m.txnMap[startTs] - if !exist { - log.Panic("txn not found", zap.Uint64("startTs", startTs)) - } - delete(m.txnMap, startTs) - m.txnMapMu.Unlock() - - entries := prewrite2RawKV(prewrite, commitTs) - m.rawKVEntriesMu.Lock() - defer m.rawKVEntriesMu.Unlock() - m.rawKVEntries = append(m.rawKVEntries, entries...) -} - -func (m *MockPullerManager) postRollback(keys [][]byte, startTs uint64, result error) { - m.txnMapMu.Lock() - defer m.txnMapMu.Unlock() - if result != nil { - return - } - delete(m.txnMap, startTs) -} - -func prewrite2RawKV(req *kvrpcpb.PrewriteRequest, commitTs uint64) []*model.RawKVEntry { - var putEntries []*model.RawKVEntry - var deleteEntries []*model.RawKVEntry - for _, mut := range req.Mutations { - switch mut.Op { - case kvrpcpb.Op_Put, kvrpcpb.Op_Insert: - rawKV := &model.RawKVEntry{ - StartTs: req.GetStartVersion(), - CRTs: commitTs, - Key: mut.Key, - Value: mut.Value, - OpType: model.OpTypePut, - } - putEntries = append(putEntries, rawKV) - case kvrpcpb.Op_Del: - rawKV := &model.RawKVEntry{ - StartTs: req.GetStartVersion(), - CRTs: commitTs, - Key: mut.Key, - Value: mut.Value, - OpType: model.OpTypeResolved, - } - deleteEntries = append(deleteEntries, rawKV) - default: - continue - } - } - entries := append(deleteEntries, putEntries...) - return append(entries, &model.RawKVEntry{CRTs: commitTs, OpType: model.OpTypeResolved}) -} - -func anyError(errs []error) bool { - for _, err := range errs { - if err != nil { - return true - } - } - return false -} +// import ( +// "context" +// "sync" +// "time" + +// "github.com/pingcap/check" +// "github.com/pingcap/kvproto/pkg/kvrpcpb" +// "github.com/pingcap/log" +// "github.com/pingcap/tidb/domain" +// tidbkv "github.com/pingcap/tidb/kv" +// timodel "github.com/pingcap/tidb/parser/model" +// "github.com/pingcap/tidb/session" +// "github.com/pingcap/tidb/store/mockstore" +// "github.com/pingcap/tidb/util/testkit" +// "github.com/pingcap/tiflow/cdc/model" +// "github.com/pingcap/tiflow/pkg/regionspan" +// "github.com/tikv/client-go/v2/testutils" +// "go.uber.org/zap" +// ) + +// type mvccListener struct { +// testutils.MVCCStore +// mu sync.RWMutex +// postPrewrite func(req *kvrpcpb.PrewriteRequest, result []error) +// postCommit func(keys [][]byte, startTs, commitTs uint64, result error) +// postRollback func(keys [][]byte, startTs uint64, result error) +// } + +// func newMVCCListener(store testutils.MVCCStore) *mvccListener { +// return &mvccListener{ +// MVCCStore: store, +// postPrewrite: func(_ *kvrpcpb.PrewriteRequest, _ []error) {}, +// postCommit: func(_ [][]byte, _, _ uint64, _ error) {}, +// postRollback: func(_ [][]byte, _ uint64, _ error) {}, +// } +// } + +// // Prewrite implements the MVCCStore interface +// func (l *mvccListener) Prewrite(req *kvrpcpb.PrewriteRequest) []error { +// l.mu.RLock() +// defer l.mu.RUnlock() +// result := l.MVCCStore.Prewrite(req) +// log.Debug("mvccListener Prewrite", zap.Reflect("req", req), zap.Reflect("result", result)) +// l.postPrewrite(req, result) +// return result +// } + +// // Commit implements the MVCCStore interface +// func (l *mvccListener) Commit(keys [][]byte, startTs, commitTs uint64) error { +// l.mu.RLock() +// defer l.mu.RUnlock() +// result := l.MVCCStore.Commit(keys, startTs, commitTs) +// log.Debug("mvccListener Commit", zap.Reflect("keys", keys), +// zap.Uint64("startTs", startTs), +// zap.Uint64("commitTs", commitTs), +// zap.Reflect("result", result)) +// l.postCommit(keys, startTs, commitTs, result) +// return result +// } + +// // Rollback implements the MVCCStore interface +// func (l *mvccListener) Rollback(keys [][]byte, startTs uint64) error { +// l.mu.RLock() +// defer l.mu.RUnlock() +// result := l.MVCCStore.Rollback(keys, startTs) +// log.Debug("mvccListener Commit", zap.Reflect("keys", keys), +// zap.Uint64("startTs", startTs), +// zap.Reflect("result", result)) +// l.postRollback(keys, startTs, result) +// return result +// } + +// func (l *mvccListener) registerPostPrewrite(fn func(req *kvrpcpb.PrewriteRequest, result []error)) { +// l.mu.Lock() +// defer l.mu.Unlock() +// l.postPrewrite = fn +// } + +// func (l *mvccListener) registerPostCommit(fn func(keys [][]byte, startTs, commitTs uint64, result error)) { +// l.mu.Lock() +// defer l.mu.Unlock() +// l.postCommit = fn +// } + +// func (l *mvccListener) registerPostRollback(fn func(keys [][]byte, startTs uint64, result error)) { +// l.mu.Lock() +// defer l.mu.Unlock() +// l.postRollback = fn +// } + +// // MockPullerManager keeps track of transactions for mock pullers +// type MockPullerManager struct { +// mvccStore testutils.MVCCStore +// store tidbkv.Storage +// domain *domain.Domain + +// txnMap map[uint64]*kvrpcpb.PrewriteRequest +// tidbKit *testkit.TestKit + +// rawKVEntries []*model.RawKVEntry + +// txnMapMu sync.Mutex +// rawKVEntriesMu sync.RWMutex +// closeCh chan struct{} + +// c *check.C +// } + +// var _ Puller = &mockPuller{} + +// type mockPuller struct { +// pm *MockPullerManager +// spans []regionspan.ComparableSpan +// resolvedTs uint64 +// startTs uint64 +// rawKVOffset int +// } + +// func (p *mockPuller) Output() <-chan *model.RawKVEntry { +// panic("implement me") +// } + +// func (p *mockPuller) SortedOutput(ctx context.Context) <-chan *model.RawKVEntry { +// output := make(chan *model.RawKVEntry, 16) +// go func() { +// for { +// p.pm.rawKVEntriesMu.RLock() +// for ; p.rawKVOffset < len(p.pm.rawKVEntries); p.rawKVOffset++ { +// rawKV := p.pm.rawKVEntries[p.rawKVOffset] +// if rawKV.StartTs < p.startTs { +// continue +// } +// p.resolvedTs = rawKV.StartTs +// if !regionspan.KeyInSpans(rawKV.Key, p.spans) { +// continue +// } +// select { +// case <-ctx.Done(): +// return +// case output <- rawKV: +// } +// } +// p.pm.rawKVEntriesMu.RUnlock() +// time.Sleep(time.Millisecond * 100) +// } +// }() +// return output +// } + +// func (p *mockPuller) Run(ctx context.Context) error { +// // Do nothing +// select { +// case <-ctx.Done(): +// return ctx.Err() +// case <-p.pm.closeCh: +// return nil +// } +// } + +// func (p *mockPuller) GetResolvedTs() uint64 { +// return p.resolvedTs +// } + +// func (p *mockPuller) IsInitialized() bool { +// return false +// } + +// // NewMockPullerManager creates and sets up a mock puller manager +// func NewMockPullerManager(c *check.C, newRowFormat bool) *MockPullerManager { +// m := &MockPullerManager{ +// txnMap: make(map[uint64]*kvrpcpb.PrewriteRequest), +// closeCh: make(chan struct{}), +// c: c, +// } +// m.setUp(newRowFormat) +// return m +// } + +// func (m *MockPullerManager) setUp(newRowFormat bool) { +// // avoid to print too many logs +// logLevel := log.GetLevel() +// log.SetLevel(zap.FatalLevel) +// defer log.SetLevel(logLevel) + +// rpcClient, _, _, _ := testutils.NewMockTiKV("", nil) +// mvccListener := newMVCCListener(rpcClient.MvccStore) + +// m.mvccStore = mvccListener +// store, err := mockstore.NewMockStore() +// if err != nil { +// log.Panic("create mock puller failed", zap.Error(err)) +// } +// m.store = store + +// session.SetSchemaLease(0) +// session.DisableStats4Test() +// m.domain, err = session.BootstrapSession(m.store) +// if err != nil { +// log.Panic("create mock puller failed", zap.Error(err)) +// } + +// m.domain.SetStatsUpdating(true) + +// m.tidbKit = testkit.NewTestKit(m.c, m.store) +// m.MustExec("use test;") +// m.tidbKit.Se.GetSessionVars().RowEncoder.Enable = newRowFormat + +// mvccListener.registerPostPrewrite(m.postPrewrite) +// mvccListener.registerPostCommit(m.postCommit) +// mvccListener.registerPostRollback(m.postRollback) +// } + +// // TearDown release all resources in a mock puller manager +// func (m *MockPullerManager) TearDown() { +// m.mvccStore.Close() //nolint:errcheck +// m.store.Close() //nolint:errcheck +// m.domain.Close() +// } + +// // CreatePuller returns a mock puller with the specified start ts and spans +// func (m *MockPullerManager) CreatePuller(startTs uint64, spans []regionspan.ComparableSpan) Puller { +// return &mockPuller{ +// spans: spans, +// pm: m, +// startTs: startTs, +// } +// } + +// // MustExec delegates to TestKit.MustExec +// func (m *MockPullerManager) MustExec(sql string, args ...interface{}) { +// m.tidbKit.MustExec(sql, args...) +// } + +// // GetTableInfo queries the info schema with the table name and returns the TableInfo +// func (m *MockPullerManager) GetTableInfo(schemaName, tableName string) *model.TableInfo { +// is := m.domain.InfoSchema() +// tbl, err := is.TableByName(timodel.NewCIStr(schemaName), timodel.NewCIStr(tableName)) +// m.c.Assert(err, check.IsNil) +// dbInfo, exist := is.SchemaByTable(tbl.Meta()) +// m.c.Assert(exist, check.IsTrue) +// return model.WrapTableInfo(dbInfo.ID, dbInfo.Name.O, 0, tbl.Meta()) +// } + +// func (m *MockPullerManager) postPrewrite(req *kvrpcpb.PrewriteRequest, result []error) { +// m.txnMapMu.Lock() +// defer m.txnMapMu.Unlock() +// if anyError(result) { +// return +// } +// m.txnMap[req.StartVersion] = req +// } + +// func (m *MockPullerManager) postCommit(keys [][]byte, startTs, commitTs uint64, result error) { +// m.txnMapMu.Lock() +// if result != nil { +// return +// } +// prewrite, exist := m.txnMap[startTs] +// if !exist { +// log.Panic("txn not found", zap.Uint64("startTs", startTs)) +// } +// delete(m.txnMap, startTs) +// m.txnMapMu.Unlock() + +// entries := prewrite2RawKV(prewrite, commitTs) +// m.rawKVEntriesMu.Lock() +// defer m.rawKVEntriesMu.Unlock() +// m.rawKVEntries = append(m.rawKVEntries, entries...) +// } + +// func (m *MockPullerManager) postRollback(keys [][]byte, startTs uint64, result error) { +// m.txnMapMu.Lock() +// defer m.txnMapMu.Unlock() +// if result != nil { +// return +// } +// delete(m.txnMap, startTs) +// } + +// func prewrite2RawKV(req *kvrpcpb.PrewriteRequest, commitTs uint64) []*model.RawKVEntry { +// var putEntries []*model.RawKVEntry +// var deleteEntries []*model.RawKVEntry +// for _, mut := range req.Mutations { +// switch mut.Op { +// case kvrpcpb.Op_Put, kvrpcpb.Op_Insert: +// rawKV := &model.RawKVEntry{ +// StartTs: req.GetStartVersion(), +// CRTs: commitTs, +// Key: mut.Key, +// Value: mut.Value, +// OpType: model.OpTypePut, +// } +// putEntries = append(putEntries, rawKV) +// case kvrpcpb.Op_Del: +// rawKV := &model.RawKVEntry{ +// StartTs: req.GetStartVersion(), +// CRTs: commitTs, +// Key: mut.Key, +// Value: mut.Value, +// OpType: model.OpTypeResolved, +// } +// deleteEntries = append(deleteEntries, rawKV) +// default: +// continue +// } +// } +// entries := append(deleteEntries, putEntries...) +// return append(entries, &model.RawKVEntry{CRTs: commitTs, OpType: model.OpTypeResolved}) +// } + +// func anyError(errs []error) bool { +// for _, err := range errs { +// if err != nil { +// return true +// } +// } +// return false +// } diff --git a/dm/pkg/conn/basedb.go b/dm/pkg/conn/basedb.go index 979b9c2bc5f..50ac169ccb0 100644 --- a/dm/pkg/conn/basedb.go +++ b/dm/pkg/conn/basedb.go @@ -27,7 +27,7 @@ import ( "github.com/go-sql-driver/mysql" perrors "github.com/pingcap/errors" "github.com/pingcap/failpoint" - toolutils "github.com/pingcap/tidb-tools/pkg/utils" + "github.com/pingcap/tidb/util" "go.uber.org/zap" "github.com/pingcap/tiflow/dm/dm/config" @@ -70,14 +70,14 @@ func (d *DefaultDBProviderImpl) Apply(config *config.DBConfig) (*BaseDB, error) if loadErr := config.Security.LoadTLSContent(); loadErr != nil { return nil, terror.ErrCtlLoadTLSCfg.Delegate(loadErr) } - tlsConfig, err := toolutils.ToTLSConfigWithVerifyByRawbytes(config.Security.SSLCABytes, + tlsConfig, err := util.ToTLSConfigWithVerifyByRawbytes(config.Security.SSLCABytes, config.Security.SSLCertBytes, config.Security.SSLKEYBytes, config.Security.CertAllowedCN) if err != nil { return nil, terror.ErrConnInvalidTLSConfig.Delegate(err) } // NOTE for local test(use a self-signed or invalid certificate), we don't need to check CA file. // see more here https://github.com/go-sql-driver/mysql#tls - if config.Host == "127.0.0.1" { + if config.Host == "127.0.0.1" || len(config.Security.SSLCertBytes) == 0 || len(config.Security.SSLKEYBytes) == 0 { tlsConfig.InsecureSkipVerify = true } diff --git a/dm/pkg/schema/tracker.go b/dm/pkg/schema/tracker.go index d0ba900f2c1..da8eb537b7c 100644 --- a/dm/pkg/schema/tracker.go +++ b/dm/pkg/schema/tracker.go @@ -126,6 +126,7 @@ func NewTracker(ctx context.Context, task string, sessionCfg map[string]string, conf.TiKVClient.AsyncCommit.AllowedClockDrift = 0 // explicitly disable new-collation for better compatibility as tidb only support a subset of all mysql collations. conf.NewCollationsEnabledOnFirstBootstrap = false + conf.Performance.RunAutoAnalyze = false }) if len(sessionCfg) == 0 { @@ -178,7 +179,6 @@ func NewTracker(ctx context.Context, task string, sessionCfg map[string]string, }}) // avoid data race and of course no use in DM - domain.RunAutoAnalyze = false session.DisableStats4Test() dom, err = session.BootstrapSession(store) diff --git a/dm/relay/relay.go b/dm/relay/relay.go index 19d7a67082b..d88c35a0a6a 100644 --- a/dm/relay/relay.go +++ b/dm/relay/relay.go @@ -27,8 +27,8 @@ import ( "github.com/go-mysql-org/go-mysql/replication" "github.com/pingcap/errors" "github.com/pingcap/failpoint" - toolutils "github.com/pingcap/tidb-tools/pkg/utils" "github.com/pingcap/tidb/parser" + "github.com/pingcap/tidb/util" "go.uber.org/atomic" "go.uber.org/zap" @@ -1123,7 +1123,7 @@ func (r *Relay) setSyncConfig() error { if loadErr := r.cfg.From.Security.LoadTLSContent(); loadErr != nil { return terror.ErrCtlLoadTLSCfg.Delegate(loadErr) } - tlsConfig, err = toolutils.ToTLSConfigWithVerifyByRawbytes(r.cfg.From.Security.SSLCABytes, + tlsConfig, err = util.ToTLSConfigWithVerifyByRawbytes(r.cfg.From.Security.SSLCABytes, r.cfg.From.Security.SSLCertBytes, r.cfg.From.Security.SSLKEYBytes, r.cfg.From.Security.CertAllowedCN) if err != nil { return terror.ErrConnInvalidTLSConfig.Delegate(err) diff --git a/dm/syncer/util.go b/dm/syncer/util.go index 2940c526136..f8c54d1a4b6 100644 --- a/dm/syncer/util.go +++ b/dm/syncer/util.go @@ -19,11 +19,11 @@ import ( "time" "github.com/go-mysql-org/go-mysql/replication" - toolutils "github.com/pingcap/tidb-tools/pkg/utils" "github.com/pingcap/tidb/br/pkg/version" "github.com/pingcap/tidb/dumpling/export" dlog "github.com/pingcap/tidb/dumpling/log" "github.com/pingcap/tidb/parser/ast" + "github.com/pingcap/tidb/util" "github.com/pingcap/tidb/util/filter" "go.uber.org/zap" @@ -150,7 +150,7 @@ func subtaskCfg2BinlogSyncerCfg(cfg *config.SubTaskConfig, timezone *time.Locati if loadErr := cfg.From.Security.LoadTLSContent(); loadErr != nil { return replication.BinlogSyncerConfig{}, terror.ErrCtlLoadTLSCfg.Delegate(loadErr) } - tlsConfig, err = toolutils.ToTLSConfigWithVerifyByRawbytes(cfg.From.Security.SSLCABytes, + tlsConfig, err = util.ToTLSConfigWithVerifyByRawbytes(cfg.From.Security.SSLCABytes, cfg.From.Security.SSLCertBytes, cfg.From.Security.SSLKEYBytes, cfg.From.Security.CertAllowedCN) if err != nil { return replication.BinlogSyncerConfig{}, terror.ErrConnInvalidTLSConfig.Delegate(err) diff --git a/dm/tests/tls/conf/source-only-ca.yaml b/dm/tests/tls/conf/source-only-ca.yaml new file mode 100644 index 00000000000..41526f418f5 --- /dev/null +++ b/dm/tests/tls/conf/source-only-ca.yaml @@ -0,0 +1,13 @@ +source-id: mysql-replica-01 +flavor: "" +enable-gtid: true +enable-relay: true +relay-binlog-name: "" +relay-binlog-gtid: "" +from: + host: 127.0.0.1 + user: dm_tls_test + password: /Q7B9DizNLLTTfiZHv9WoEAKamfpIUs= + port: 3306 + security: + ssl-ca: "dir-placeholerca.pem" diff --git a/dm/tests/tls/run.sh b/dm/tests/tls/run.sh index 7818b5430ad..962dd90c1ae 100644 --- a/dm/tests/tls/run.sh +++ b/dm/tests/tls/run.sh @@ -70,6 +70,9 @@ function setup_mysql_tls() { cp $cur/conf/source1.yaml $WORK_DIR/source1.yaml sed -i "s%dir-placeholer%$mysql_data_path%g" $WORK_DIR/source1.yaml + # add a tls source with only ca + cp $cur/conf/source-only-ca.yaml $WORK_DIR/source-only-ca.yaml + sed -i "s%dir-placeholer%$mysql_data_path%g" $WORK_DIR/source-only-ca.yaml echo "add dm_tls_test user done $mysql_data_path" } @@ -84,6 +87,7 @@ function prepare_test() { pkill -hup tidb-server 2>/dev/null || true wait_process_exit tidb-server + run_sql 'SHOW GLOBAL VARIABLES LIKE "tls_version";' $MYSQL_PORT1 $MYSQL_PASSWORD1 setup_mysql_tls setup_tidb_with_tls prepare_data @@ -120,7 +124,7 @@ function test_worker_handle_multi_tls_tasks() { # operate mysql config to worker run_dm_ctl_with_tls_and_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" $cur/conf/ca.pem $cur/conf/dm.pem $cur/conf/dm.key \ - "operate-source create $WORK_DIR/source1.yaml" \ + "operate-source create $WORK_DIR/source-only-ca.yaml" \ "\"result\": true" 2 \ "\"source\": \"$SOURCE_ID1\"" 1 @@ -308,7 +312,7 @@ function test_worker_ha_when_enable_source_tls() { echo "============================== test_worker_ha_when_enable_source_tls success ==================================" } -function test_master_ha_when_enable_tidb_tls() { +function test_master_ha_when_enable_tidb_and_only_ca_source_tls() { prepare_test cp $cur/conf/dm-master1.toml $WORK_DIR/ @@ -377,14 +381,15 @@ function test_master_ha_when_enable_tidb_tls() { # check the log is not repeatedly printed check_log_contains $WORK_DIR/master1/log/dm-master.log "remote error: tls: bad certificate" 1 - echo "============================== test_master_ha_when_enable_tidb_tls success ==================================" + echo "============================== test_master_ha_when_enable_tidb_and_only_ca_source_tls success ==================================" } function run() { + test_master_ha_when_enable_tidb_and_only_ca_source_tls + test_worker_handle_multi_tls_tasks test_worker_download_certs_from_master test_worker_ha_when_enable_source_tls - test_master_ha_when_enable_tidb_tls } cleanup_data tls diff --git a/go.mod b/go.mod index 5253209ae85..71f3e2c06b2 100644 --- a/go.mod +++ b/go.mod @@ -50,11 +50,11 @@ require ( github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0 github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c github.com/pingcap/failpoint v0.0.0-20220423142525-ae43b7f4e5c3 - github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453 + github.com/pingcap/kvproto v0.0.0-20220517085838-12e2f5a9d167 github.com/pingcap/log v1.1.0 - github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607 + github.com/pingcap/tidb v1.1.0-beta.0.20220528045048-5495dc6c4360 github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible - github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607 + github.com/pingcap/tidb/parser v0.0.0-20220528045048-5495dc6c4360 github.com/prometheus/client_golang v1.12.2 github.com/prometheus/client_model v0.2.0 github.com/r3labs/diff v1.1.0 @@ -68,7 +68,7 @@ require ( github.com/swaggo/gin-swagger v1.2.0 github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476 github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 - github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101 + github.com/tikv/client-go/v2 v2.0.1-0.20220518162527-de7ca289ac77 github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710 github.com/tinylib/msgp v1.1.6 @@ -116,6 +116,7 @@ require ( github.com/DataDog/zstd v1.4.6-0.20210211175136-c6db21d202f4 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/VividCortex/ewma v1.1.1 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.61.1581 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/apache/pulsar-client-go/oauth2 v0.0.0-20201120111947-b8bd55bc02bd // indirect github.com/apache/thrift v0.13.1-0.20201008052519-daf620915714 // indirect diff --git a/go.sum b/go.sum index e53e06f100d..59d67302907 100644 --- a/go.sum +++ b/go.sum @@ -112,6 +112,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1581 h1:Q/yk4z/cHUVZfgTqtD09qeYBxHwshQAjVRX73qs8UH0= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1581/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= @@ -444,6 +446,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= @@ -684,6 +687,7 @@ github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -958,8 +962,8 @@ github.com/pingcap/kvproto v0.0.0-20220302110454-c696585a961b/go.mod h1:IOdRDPLy github.com/pingcap/kvproto v0.0.0-20220304032058-ccd676426a27/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220328072018-6e75c12dbd73/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI= github.com/pingcap/kvproto v0.0.0-20220429093005-2839fa5a1ed6/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= -github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453 h1:Zm7MOLXFWsxLORJu2euSTQhfpnwTwsJKb7E8F6ukRCo= -github.com/pingcap/kvproto v0.0.0-20220516091657-dabb3eea5453/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= +github.com/pingcap/kvproto v0.0.0-20220517085838-12e2f5a9d167 h1:dsMpneacHyuVslSVndgUfJKrXFNG7VPdXip2ulG6glo= +github.com/pingcap/kvproto v0.0.0-20220517085838-12e2f5a9d167/go.mod h1:OYtxs0786qojVTmkVeufx93xe+jUgm56GUYRIKnmaGI= github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= @@ -973,15 +977,15 @@ github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d/go.mod h1:7j18ezaW github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4 h1:HYbcxtnkN3s5tqrZ/z3eJS4j3Db8wMphEm1q10lY/TM= github.com/pingcap/sysutil v0.0.0-20220114020952-ea68d2dbf5b4/go.mod h1:sDCsM39cGiv2vwunZkaFA917vVkqDTGSPbbV7z4Oops= github.com/pingcap/tidb v1.1.0-beta.0.20220511160835-98c31070d958/go.mod h1:luW4sIZoLHY3bCWuKqyqk2QgMvF+/M7nWOXf/me0+fY= -github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607 h1:/0sO//UefHNz+aUSwuh2FyBz/TVka6Wg3EoIpqk7qbo= -github.com/pingcap/tidb v1.1.0-beta.0.20220517022637-e2557396f607/go.mod h1:D8sZJ0Dy+My380Rq8FXgOk+B1tvekM2QbTNlxnb4wNs= +github.com/pingcap/tidb v1.1.0-beta.0.20220528045048-5495dc6c4360 h1:hYgMkIXcsZ2MzkOkyotPMgP/XfAIN1/0g5DkMvUA6vY= +github.com/pingcap/tidb v1.1.0-beta.0.20220528045048-5495dc6c4360/go.mod h1:RhUMmhKGlWdMTUjnZVs0ci67tQhaEjf4j1yKeHu9L5k= github.com/pingcap/tidb-dashboard v0.0.0-20220117082709-e8076b5c79ba/go.mod h1:4hk/3owVGWdvI9Kx6yCqqvM1T5PVgwyQNyMQxD3rwfc= github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible h1:dAfZKHR4Wu3bdFDNDsH2c4fWrkqbkgVlwY5pC4Nmp6Q= github.com/pingcap/tidb-tools v6.0.1-0.20220516050036-b3ea358e374a+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tidb/parser v0.0.0-20211011031125-9b13dc409c5e/go.mod h1:e1MGCA9Sg3T8jid8PKAEq5eYVuMMCq4n8gJ+Kqp4Plg= github.com/pingcap/tidb/parser v0.0.0-20220511160835-98c31070d958/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= -github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607 h1:wtjxwH1O/WdvmVojeP5jbhzymDc8iNktT3Lu5r729YE= -github.com/pingcap/tidb/parser v0.0.0-20220517022637-e2557396f607/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= +github.com/pingcap/tidb/parser v0.0.0-20220528045048-5495dc6c4360 h1:r4HI1dCcNMehOBbWAnAeLsYeP2i3QoJvySvVFLA6Z+U= +github.com/pingcap/tidb/parser v0.0.0-20220528045048-5495dc6c4360/go.mod h1:ElJiub4lRy6UZDb+0JHDkGEdr6aOli+ykhyej7VCLoI= github.com/pingcap/tipb v0.0.0-20220215045658-d12dec7a7609/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188 h1:+46isFI9fR9R+nJVDMI55tCC/TCwp+bvVA4HLGEv1rY= github.com/pingcap/tipb v0.0.0-20220314125451-bfb5c2c55188/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= @@ -1152,8 +1156,8 @@ github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJH github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tikv/client-go/v2 v2.0.1-0.20220510032238-ff5e35ac2869/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= -github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101 h1:LEdgY/R6ir0V7mSuNW2m7ZgS0hbmBhsnnrLOxoBoC74= -github.com/tikv/client-go/v2 v2.0.1-0.20220516035221-e007187e5101/go.mod h1:0scaG+seu7L56apm+Gjz9vckyO7ABIzM6T7n00mrIXs= +github.com/tikv/client-go/v2 v2.0.1-0.20220518162527-de7ca289ac77 h1:baRGhZtEp4wY3qh/0bscTCZ+97MVTZekBg5rOdgopQc= +github.com/tikv/client-go/v2 v2.0.1-0.20220518162527-de7ca289ac77/go.mod h1:VTlli8fRRpcpISj9I2IqroQmcAFfaTyBquiRhofOcDs= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800 h1:lIfIwqe1HPa0suhMpiI200nYxau+rXWXTqZxSGg1HS4= github.com/tikv/pd v1.1.0-beta.0.20220303060546-3695d8164800/go.mod h1:J/dj1zpEE9b7idgONGFttnXM+ncl88LmnkD/xDbq0hA= github.com/tikv/pd/client v0.0.0-20220307081149-841fa61e9710 h1:jxgmKOscXSjaFEKQGRyY5qOpK8hLqxs2irb/uDJMtwk= @@ -1916,6 +1920,7 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8 gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= From 5c4f38d8b988abddec277faece00eae769247fda Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Sat, 28 May 2022 16:13:10 +0800 Subject: [PATCH 21/21] incr wait process exit --- dm/tests/_utils/wait_process_exit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dm/tests/_utils/wait_process_exit b/dm/tests/_utils/wait_process_exit index 96f5da0911d..dd92d0905df 100755 --- a/dm/tests/_utils/wait_process_exit +++ b/dm/tests/_utils/wait_process_exit @@ -4,7 +4,7 @@ process=$1 WAIT_COUNT=0 -while [ $WAIT_COUNT -lt 30 ]; do +while [ $WAIT_COUNT -lt 120 ]; do pgrep $process >/dev/null 2>&1 ret=$? if [ "$ret" != "0" ]; then @@ -16,5 +16,5 @@ while [ $WAIT_COUNT -lt 30 ]; do ((WAIT_COUNT++)) done -echo "process $process didn't exit after 30 seconds, current processlist: $(pgrep $process)" +echo "process $process didn't exit after 120 seconds, current processlist: $(pgrep $process)" exit 1