This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
relay can't continue after upstream turn off GTID #1460
Labels
affected-v2.0.2
this issue/BUG affects v2.0.2
affected-v2.0.3
this issue/BUG affects v2.0.3
affected-v2.0.4
this issue/BUG affects v2.0.4
affected-v2.0.5
this issue/BUG affects v2.0.5
affected-v2.0.6
this issue/BUG affects v2.0.6
affected-v2.0.7
this issue/BUG affects v2.0.7
severity/minor
type/bug
This issue is a bug report
Bug Report
Please answer these questions before submitting your issue. Thanks!
What did you do? If possible, provide a recipe for reproducing the error.
I. Create upstream MYSQL with GTID enabled, create db "enableall_21_1".
II. Create upstream source (enable-gtid: true) and start task, data migration finished successful.
III. Change mysql configuration to GTID disabled
IIII. Create new upstream source(enable-gtid: false enable-relay: true), new database "relay_31", start task to migrate the new db.
What did you expect to see?
the new migration task can be finished successfully.
What did you see instead?
Downstream TiDB QPS is 0.
tiup dmctl --master-addr 172.16.4.214:8261 query-status relay-sync-31
Starting component
dmctl
: /root/.tiup/components/dmctl/v2.0.1/dmctl/dmctl --master-addr 172.16.4.214:8261 query-status relay-sync-31{
"result": true,
"msg": "",
"sources": [
{
"result": true,
"msg": "",
"sourceStatus": {
"source": "mysql-replica31",
"worker": "dm-172.16.5.108-8262",
"result": null,
"relayStatus": {
"masterBinlog": "(mysql-bin.000136, 1034613034)",
"masterBinlogGtid": "c67e83ef-75a0-11eb-9d7e-0242ac110002:1-253095075",
"relaySubDir": "c67e83ef-75a0-11eb-9d7e-0242ac110002.000001",
"relayBinlog": "(mysql-bin.000085, 147762084)",
"relayBinlogGtid": "c67e83ef-75a0-11eb-9d7e-0242ac110002:1-153065071",
"relayCatchUpMaster": false,
"stage": "Paused",
"result": {
"isCanceled": false,
"errors": [
{
"ErrCode": 30015,
"ErrClass": "relay-unit",
"ErrScope": "upstream",
"ErrLevel": "high",
"Message": "TCPReader get relay event with error",
"RawCause": "ERROR 1236 (HY000): Cannot replicate GTID-transaction when @@GLOBAL.GTID_MODE = OFF, at file ./mysql-bin.000085, position 147762084.; the first event 'mysql-bin.000085' at 147762084, the last event read from './mysql-bin.000085' at 147762149, the last byte read from './mysql-bin.000085' at 147762149.",
"Workaround": ""
}
],
"detail": null
}
}
},
"subTaskStatus": [
{
"name": "relay-sync-31",
"stage": "Running",
"unit": "Load",
"result": null,
"unresolvedDDLLockID": "",
"load": {
"finishedBytes": "2207738142",
"totalBytes": "2210916342",
"progress": "99.86 %",
"metaBinlog": "(mysql-bin.000135, 776111422)",
"metaBinlogGTID": "c67e83ef-75a0-11eb-9d7e-0242ac110002:1-253095075"
}
}
]
}
]
}
MySQL [mysql]> show binlog events in 'mysql-bin.000085' limit 10;
+------------------+-----+----------------+-----------+-------------+---------------------------------------------------------------------------+
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+------------------+-----+----------------+-----------+-------------+---------------------------------------------------------------------------+
| mysql-bin.000085 | 4 | Format_desc | 1 | 123 | Server ver: 5.7.31-log, Binlog ver: 4 |
| mysql-bin.000085 | 123 | Previous_gtids | 1 | 194 | c67e83ef-75a0-11eb-9d7e-0242ac110002:1-152750684 |
| mysql-bin.000085 | 194 | Gtid | 1 | 259 | SET @@SESSION.GTID_NEXT= 'c67e83ef-75a0-11eb-9d7e-0242ac110002:152750685' |
| mysql-bin.000085 | 259 | Query | 1 | 341 | BEGIN |
| mysql-bin.000085 | 341 | Table_map | 1 | 408 | table_id: 1083 (enableall_21_1.sbtest4) |
| mysql-bin.000085 | 408 | Write_rows | 1 | 633 | table_id: 1083 flags: STMT_END_F |
| mysql-bin.000085 | 633 | Xid | 1 | 664 | COMMIT /* xid=152796446 */ |
| mysql-bin.000085 | 664 | Gtid | 1 | 729 | SET @@SESSION.GTID_NEXT= 'c67e83ef-75a0-11eb-9d7e-0242ac110002:152750686' |
| mysql-bin.000085 | 729 | Query | 1 | 811 | BEGIN |
| mysql-bin.000085 | 811 | Table_map | 1 | 878 | table_id: 1080 (enableall_21_1.sbtest3) |
+------------------+-----+----------------+-----------+-------------+---------------------------------------------------------------------------+
10 rows in set (0.00 sec)
The new task fail to migrate db "relay_31", while error log is about other db "enableall_21_1".
As dev saids, the reason is relaydir is not changed(default dir) in both source configuration file, so the new task still will to migrate the previous relaydir.
4. Versions of the cluster
Git Commit Hash: 2fa864f
Git Branch: master
UTC Build Time: 2021-02-20 09:51:04
Go Version: go version go1.15.5 linux/amd64
current status of DM cluster (execute
query-status
in dmctl)Operation logs
dm-worker.log
for every DM-worker instance if possibledm-master.log
if possibleConfiguration of the cluster and the task
dm-worker.toml
for every DM-worker instance if possibledm-master.toml
for DM-master if possibletask.yaml
if possibleinventory.ini
if deployed by DM-AnsibleScreenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus for DM if possible
The text was updated successfully, but these errors were encountered: