tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

DM will report error when upstream MySQL has no data change

Open lance6716 opened this issue 2 years ago • 2 comments

What did you do?

When upstream has no data and enables GTID, its binlog position is at (mysql-bin.000001, 154) and has empty GTID set.

Then if user starts an all mode task...

[2022/09/09 06:17:52.285 +00:00] [INFO] [subtask.go:371] ["unit process returned"] [subtask=test-infra] [unit=Load] [stage=Finished] [status="{\"progress\":\"100.00 %\",\"metaBinlog\":\"(mysql-bin.000001, 154)\"}"]
[2022/09/09 06:17:52.285 +00:00] [INFO] [subtask.go:382] ["switching to next unit"] [subtask=test-infra] [unit=Load]
...
[2022/09/09 06:17:52.734 +00:00] [WARN] [syncer.go:3811] ["fail to get gtids for global location"] [task=test-infra] [unit="binlog replication"] [pos="position: (mysql-bin.000001, 154), gtid-set: "] [error="invalid position (mysql-bin.000001, 154) or GTID not enabled in upstream"] [errorVerbose="invalid position (mysql-bin.000001, 154) or GTID not enabled in upstream\ngithub.com/pingcap/tiflow/dm/pkg/binlog/reader.GetGTIDsForPosFromStreamer\n\tgithub.com/pingcap/tiflow/dm/pkg/binlog/reader/util.go:129\ngithub.com/pingcap/tiflow/dm/syncer.(*Syncer).adjustGlobalPointGTID\n\tgithub.com/pingcap/tiflow/dm/syncer/syncer.go:3809\ngithub.com/pingcap/tiflow/dm/syncer.(*Syncer).Run\n\tgithub.com/pingcap/tiflow/dm/syncer/syncer.go:1612\ngithub.com/pingcap/tiflow/dm/syncer.(*Syncer).Process\n\tgithub.com/pingcap/tiflow/dm/syncer/syncer.go:697\nruntime.goexit\n\truntime/asm_amd64.s:1571"]
[2022/09/09 06:17:52.736 +00:00] [INFO] [syncer.go:1501] ["received ungraceful exit ctx, exit now"] [task=test-infra] [unit="binlog replication"]
[2022/09/09 06:17:52.737 +00:00] [INFO] [subtask.go:371] ["unit process returned"] [subtask=test-infra] [unit=Sync] [stage=Paused] [status="{\"syncerBinlog\":\"(mysql-bin.000001, 154)\",\"binlogType\":\"remote\"}"]
[2022/09/09 06:17:52.737 +00:00] [ERROR] [subtask.go:392] ["unit process error"] [subtask=test-infra] [unit=Sync] ["error information"="ErrCode:50000 ErrClass:\"not-set\" ErrScope:\"not-set\" ErrLevel:\"high\" Message:\"invalid position (mysql-bin.000001, 154) or GTID not enabled in upstream\" "]

What did you expect to see?

No response

What did you see instead?

No response

Versions of the cluster

master

current status of DM cluster (execute query-status <task-name> in dmctl)

(paste current status of DM cluster here)

lance6716 avatar Sep 09 '22 13:09 lance6716

workaround: insert some data to upstream before starting dm task.

fubinzh avatar Sep 28 '22 03:09 fubinzh

/found automation

fubinzh avatar Sep 30 '22 06:09 fubinzh