Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM task pause with Specified key was too long #5315

Closed
Christophe-4567 opened this issue Apr 29, 2022 · 1 comment · Fixed by #6661
Closed

DM task pause with Specified key was too long #5315

Christophe-4567 opened this issue Apr 29, 2022 · 1 comment · Fixed by #6661

Comments

@Christophe-4567
Copy link

What did you do?

followed the documentation: https://docs.pingcap.com/tidb/stable/migrate-large-mysql-to-tidb
everything went fine until the DM part.
v540_1.zip

What did you expect to see?

the task running and keeping the tidb cluster sync with the maria db

What did you see instead?

query-status return: "RawCause": "[ddl:1071]Specified key was too long; max key length is 3072 bytes"

Versions of the cluster

DM version (run dmctl -V or dm-worker -V or dm-master -V):

dm-master -V: Release Version: v5.4.0
dm-worker -V: Release Version: v5.4.0
dmctl : v5.4.0

Upstream MySQL/MariaDB server version:

10.4.18-MariaDB

Downstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

5.4.0

How did you deploy DM: tiup or manually?

TiUP

Other interesting information (system version, hardware config, etc):

- set max-index-lengh to 12288 
- Try to use DM 5.3.1 (as Daniël on asktug on slack did ask)

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

Starting component `dmctl`: /root/.tiup/components/dmctl/v5.3.1/dmctl/dmctl /root/.tiup/components/dmctl/v5.3.1/dmctl/dmctl --master-addr xxx:8261 query-status task-xxx
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "sourceStatus": {
                "source": "mysql-dc3-master",
                "worker": "dm-xxx-8262",
                "result": null,
                "relayStatus": null
            },
            "subTaskStatus": [
                {
                    "name": "task-xxx",
                    "stage": "Paused",
                    "unit": "Sync",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "ErrCode": 44003,
                                "ErrClass": "schema-tracker",
                                "ErrScope": "downstream",
                                "ErrLevel": "high",
                                "Message": "startLocation: [position: (, 0), gtid-set: ], endLocation: [position: (mariadb-bin.048312, 96376516), gtid-set: 0-1856393171-6399440815]: failed to create table for `ringover`.`cdn_storage` in schema tracker",
                                "RawCause": "[ddl:1071]Specified key was too long; max key length is 3072 bytes",
                                "Workaround": ""
                            }
                        ],
                        "detail": null
                    },
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "52",
                        "totalTps": "0",
                        "recentTps": "0",
                        "masterBinlog": "(mariadb-bin.048944, 34179712)",
                        "masterBinlogGtid": "0-1856393171-6452464976",
                        "syncerBinlog": "(mariadb-bin.048312, 96375851)",
                        "syncerBinlogGtid": "0-1856393171-6399440815",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                        ],
                        "synced": false,
                        "binlogType": "remote",
                        "secondsBehindMaster": "0"
                    }
                }
            ]
        }
    ]
}
@Christophe-4567 Christophe-4567 added area/dm Issues or PRs related to DM. type/bug The issue is confirmed as a bug. labels Apr 29, 2022
@lance6716
Copy link
Contributor

I think we should let DM's schema tracker (embedded TiDB) always uses the configuration with max compatibility. Will check it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants