Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cdc/entry/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestAllTables(t *testing.T) {
require.Equal(t, model.TableName{
Schema: "test",
Table: "t1",
TableID: 116,
TableID: 118,
}, tableName)
// add ineligible table
job = helper.DDL2Job("create table test.t2(id int)")
Expand All @@ -150,7 +150,7 @@ func TestAllTables(t *testing.T) {
require.Equal(t, model.TableName{
Schema: "test",
Table: "t1",
TableID: 116,
TableID: 118,
}, tableName)
}

Expand Down
15 changes: 8 additions & 7 deletions dm/checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ import (

_ "github.com/go-sql-driver/mysql" // for mysql
"github.com/pingcap/tidb/dumpling/export"
"github.com/pingcap/tidb/lightning/pkg/checkpoints"
"github.com/pingcap/tidb/lightning/pkg/importer"
"github.com/pingcap/tidb/lightning/pkg/importer/opts"
"github.com/pingcap/tidb/lightning/pkg/precheck"
"github.com/pingcap/tidb/pkg/lightning/checkpoints"
"github.com/pingcap/tidb/pkg/lightning/common"
"github.com/pingcap/tidb/pkg/lightning/importdef"
"github.com/pingcap/tidb/pkg/lightning/mydump"
"github.com/pingcap/tidb/pkg/parser/mysql"
"github.com/pingcap/tidb/pkg/types"
Expand Down Expand Up @@ -878,7 +879,7 @@ func sameTableNameDetection(tables map[filter.Table][]filter.Table) error {
// lightningPrecheckAdaptor implements the importer.PreRestoreInfoGetter interface.
type lightningPrecheckAdaptor struct {
importer.TargetInfoGetter
allTables map[string]*checkpoints.TidbDBInfo
allTables map[string]*importdef.DBInfo
sourceDataResult importer.EstimateSourceDataSizeResult
}

Expand All @@ -888,18 +889,18 @@ func newLightningPrecheckAdaptor(
) *lightningPrecheckAdaptor {
var (
sourceDataResult importer.EstimateSourceDataSizeResult
allTables = make(map[string]*checkpoints.TidbDBInfo)
allTables = make(map[string]*importdef.DBInfo)
)
if info != nil {
sourceDataResult.SizeWithIndex = info.totalDataSize.Load()
}
for db, tables := range info.db2TargetTables {
allTables[db] = &checkpoints.TidbDBInfo{
allTables[db] = &importdef.DBInfo{
Name: db,
Tables: make(map[string]*checkpoints.TidbTableInfo),
Tables: make(map[string]*importdef.TableInfo),
}
for _, table := range tables {
allTables[db].Tables[table.Name] = &checkpoints.TidbTableInfo{
allTables[db].Tables[table.Name] = &importdef.TableInfo{
DB: db,
Name: table.Name,
}
Expand All @@ -912,7 +913,7 @@ func newLightningPrecheckAdaptor(
}
}

func (l *lightningPrecheckAdaptor) GetAllTableStructures(ctx context.Context, opts ...opts.GetPreInfoOption) (map[string]*checkpoints.TidbDBInfo, error) {
func (l *lightningPrecheckAdaptor) GetAllTableStructures(ctx context.Context, opts ...opts.GetPreInfoOption) (map[string]*importdef.DBInfo, error) {
// re-use with other checker? or in fact we only use other information than structure?
return l.allTables, nil
}
Expand Down
4 changes: 2 additions & 2 deletions dm/loader/lightning.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/failpoint"
"github.com/pingcap/tidb/dumpling/export"
"github.com/pingcap/tidb/lightning/pkg/checkpoints"
"github.com/pingcap/tidb/lightning/pkg/errormanager"
"github.com/pingcap/tidb/lightning/pkg/importinto"
lserver "github.com/pingcap/tidb/lightning/pkg/server"
"github.com/pingcap/tidb/pkg/lightning/checkpoints"
"github.com/pingcap/tidb/pkg/lightning/common"
lcfg "github.com/pingcap/tidb/pkg/lightning/config"
"github.com/pingcap/tidb/pkg/lightning/errormanager"
"github.com/pingcap/tidb/pkg/parser/mysql"
tidbpromutil "github.com/pingcap/tidb/pkg/util/promutil"
"github.com/pingcap/tiflow/dm/config"
Expand Down
4 changes: 2 additions & 2 deletions dm/tests/shardddl2/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ function DM_040_CASE() {
else
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status test" \
'ALTER TABLE `shardddl`.`tb` ADD COLUMN `col1` VARCHAR(10) CHARACTER SET UTF8' 1 \
"\`${shardddl1}\`.\`${tb1}\`\"" 1
"\"result\": true" 3
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml
fi
}

Expand Down
8 changes: 4 additions & 4 deletions engine/jobmaster/dm/ddl_coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,19 +511,19 @@ func TestJoinTables(t *testing.T) {
// no conflict
joined, err := g.joinTables(normal)
require.NoError(t, err)
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) CHARSET UTF8MB4 COLLATE UTF8MB4_BIN", joined.String())
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) COLLATE utf8mb4_bin", joined.String())
joined, err = g.joinTables(final)
require.NoError(t, err)
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) CHARSET UTF8MB4 COLLATE UTF8MB4_BIN", joined.String())
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) COLLATE utf8mb4_bin", joined.String())

// has conflict
g.conflictTables[tb3] = genCreateStmt("col1 varchar(255)", "col2 int")
joined, err = g.joinTables(normal)
require.NoError(t, err)
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) CHARSET UTF8MB4 COLLATE UTF8MB4_BIN", joined.String())
require.Equal(t, "CREATE TABLE `tbl`(`col1` INT(11), `col2` INT(11)) COLLATE utf8mb4_bin", joined.String())
joined, err = g.joinTables(conflict)
require.NoError(t, err)
require.Equal(t, "CREATE TABLE `tbl`(`col1` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE utf8mb4_bin, `col2` INT(11)) CHARSET UTF8MB4 COLLATE UTF8MB4_BIN", joined.String())
require.Equal(t, "CREATE TABLE `tbl`(`col1` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE utf8mb4_bin, `col2` INT(11)) COLLATE utf8mb4_bin", joined.String())
_, err = g.joinTables(final)
require.Error(t, err)
}
Expand Down
59 changes: 29 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/pingcap/tiflow

go 1.25.8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why bump this ?

go 1.25.10

require (
cloud.google.com/go/storage v1.52.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3
github.com/BurntSushi/toml v1.6.0
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/IBM/sarama v1.41.2
Expand Down Expand Up @@ -70,13 +70,13 @@ require (
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pierrec/lz4/v4 v4.1.26
github.com/pingcap/check v0.0.0-20211026125417-57bd13f7b5f0
github.com/pingcap/errors v0.11.5-0.20260310054046-9c8b3586e4b2
github.com/pingcap/errors v0.11.5-0.20260508054701-306e305bcf41
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
github.com/pingcap/kvproto v0.0.0-20260320060847-534bbfabf736
github.com/pingcap/kvproto v0.0.0-20260601035955-b2b3bb492278
github.com/pingcap/log v1.1.1-0.20250917021125-19901e015dc9
github.com/pingcap/tidb v1.1.0-beta.0.20260325043212-0c4df2e19ecc
github.com/pingcap/tidb v1.1.0-beta.0.20260604031706-f9faeaf4828f
github.com/pingcap/tidb-dashboard v0.0.0-20240326110213-9768844ff5d7
github.com/pingcap/tidb/pkg/parser v0.0.0-20260325043212-0c4df2e19ecc
github.com/pingcap/tidb/pkg/parser v0.0.0-20260604031706-f9faeaf4828f
github.com/prometheus/client_golang v1.23.0
github.com/prometheus/client_model v0.6.2
github.com/r3labs/diff v1.1.0
Expand All @@ -86,14 +86,14 @@ require (
github.com/shirou/gopsutil/v3 v3.24.5
github.com/shopspring/decimal v1.3.0
github.com/soheilhy/cmux v0.1.5
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.7
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954
github.com/thanhpk/randstr v1.0.6
github.com/tikv/client-go/v2 v2.0.8-0.20260319090224-0569333efa49
github.com/tikv/client-go/v2 v2.0.8-0.20260602013621-8804d7c60a7e
github.com/tikv/pd v1.1.0-beta.0.20240407022249-7179657d129b
github.com/tikv/pd/client v0.0.0-20260323032024-d7b638033a14
github.com/tikv/pd/client v0.0.0-20260601035915-3ef6a3b10c84
github.com/tinylib/msgp v1.5.0
github.com/uber-go/atomic v1.4.0
github.com/vmihailenco/msgpack/v5 v5.3.5
Expand All @@ -112,12 +112,12 @@ require (
go.uber.org/multierr v1.11.0
go.uber.org/ratelimit v0.2.0
go.uber.org/zap v1.27.1
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
golang.org/x/net v0.53.0
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
golang.org/x/net v0.54.0
golang.org/x/oauth2 v0.33.0
golang.org/x/sync v0.20.0
golang.org/x/sys v0.43.0
golang.org/x/text v0.36.0
golang.org/x/sys v0.44.0
golang.org/x/text v0.37.0
golang.org/x/time v0.14.0
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8
Expand All @@ -138,7 +138,7 @@ require (
cloud.google.com/go/monitoring v1.24.0 // indirect
filippo.io/edwards25519 v1.1.1 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect
Expand Down Expand Up @@ -216,7 +216,7 @@ require (
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pingcap/metering_sdk v0.0.0-20251110022152-dac449ac5389 // indirect
github.com/pingcap/metering_sdk v0.0.0-20260324055927-14fead745f1d // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/qri-io/jsonpointer v0.1.1 // indirect
github.com/qri-io/jsonschema v0.2.1 // indirect
Expand Down Expand Up @@ -245,7 +245,7 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 // indirect
golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -265,9 +265,9 @@ require (
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/AthenZ/athenz v1.10.39 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
Expand Down Expand Up @@ -373,11 +373,11 @@ require (
github.com/pingcap/fn v1.0.0 // indirect
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect
github.com/pingcap/sysutil v1.0.1-0.20240311050922-ae81ee01f3a5
github.com/pingcap/tipb v0.0.0-20260210113932-1447c9d7e9fe // indirect
github.com/pingcap/tipb v0.0.0-20260515142222-a4d204a193b4 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
Expand All @@ -387,16 +387,15 @@ require (
github.com/sasha-s/go-deadlock v0.3.6 // indirect
github.com/shoenig/go-m1cpu v0.1.7 // indirect
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spkg/bom v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 // indirect
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
github.com/tklauser/numcpus v0.10.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
Expand All @@ -422,10 +421,10 @@ require (
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/term v0.42.0
golang.org/x/tools v0.42.0 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/term v0.43.0
golang.org/x/tools v0.44.0 // indirect
google.golang.org/api v0.230.0 // indirect
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
Expand Down
Loading
Loading