IvanCai
(Ivan Cai)
1
dumping版本: v4.0.2
tidb版本:v4.0.0
[2021/02/25 04:00:01.794 +08:00] [INFO] [config.go:139] ["detect server type"] [type=TiDB]
[2021/02/25 04:00:01.794 +08:00] [INFO] [config.go:157] ["detect server version"] [version=4.0.0]
[2021/02/25 04:00:01.813 +08:00] [INFO] [client.go:147] ["[pd] create pd client with endpoints"] [pd-address="[172.18.52.177:2379,172.18.52.185:2379]"]
[2021/02/25 04:00:01.815 +08:00] [INFO] [base_client.go:242] ["[pd] switch leader"] [new-leader=http://172.18.52.177:2379] [old-leader=]
[2021/02/25 04:00:01.816 +08:00] [INFO] [base_client.go:92] ["[pd] init cluster id"] [cluster-id=6894132624390410896]
[2021/02/25 04:02:11.271 +08:00] [ERROR] [main.go:191] ["dump failed error stack info"] [error="Error 1105: number of enum overflow enum boundary"] [stack="github.com/pingcap/log.Error\
\t/go/pkg/mod/github.com/pingcap/log@v0.0.0-20200511115504-543df19646ad/global.go:42\
main.main\
\t/home/jenkins/agent/workspace/build-linux-amd64-4.0/go/src/github.com/pingcap/dumpling/cmd/dumpling/main.go:191\
runtime.main\
\t/usr/local/go/src/runtime/proc.go:203"]
IvanCai
(Ivan Cai)
3
没有用配置文件,以下是导出命令
./dumpling \
-u root \
-P 4000 \
-p xxxx \
-h 172.18.52.176 \
--filetype sql \
--threads 10 \
-o /tmp/fresh_v4 \
-F 256MiB \
-B fresh_v4
yilong
(yi888long)
4
-B 是指的database吧?
试试 dumpling -u root -P xx -p xx --host 172.xxxx --filetype sql --threads 10 -o /tmp/fresh_v4 -F 256MiB --database fresh_v4 我这边可以成功
IvanCai
(Ivan Cai)
5
是的,之前这个库一直是可以导出的,是突然这两天就报错了
写到磁盘的日志,看看有么有报错的那条 SQL,然后手动到 TiDB 中执行下,看看是不是一样的报错。
IvanCai
(Ivan Cai)
16
[root@TIDB-Monitor bin]# ./dumpling \
> -u root \
> -P 4000 \
> -p xxx \
> -h 172.18.52.176 \
> --filetype sql \
> --threads 10 \
> -o /tmp/fresh_v4_2021_0226 \
> -F 256MiB \
> -B fresh_v4
Release version: v4.0.10
Git commit hash: 5e6981efa173ff525abb31c6e62a50ecd6da6a09
Git branch: heads/refs/tags/v4.0.10
Build timestamp: 2021-01-14 12:39:07Z
Go version: go version go1.13 linux/amd64
[2021/02/26 00:08:56.994 +08:00] [INFO] [config.go:596] ["detect server type"] [type=TiDB]
[2021/02/26 00:08:56.994 +08:00] [INFO] [config.go:615] ["detect server version"] [version=4.0.0]
[2021/02/26 00:08:56.999 +08:00] [INFO] [client.go:166] ["[pd] create pd client with endpoints"] [pd-address="[172.18.52.177:2379,172.18.52.185:2379]"]
[2021/02/26 00:08:57.001 +08:00] [INFO] [base_client.go:252] ["[pd] switch leader"] [new-leader=http://172.18.52.177:2379] [old-leader=]
[2021/02/26 00:08:57.001 +08:00] [INFO] [base_client.go:102] ["[pd] init cluster id"] [cluster-id=6894132624390410896]
[2021/02/26 00:10:26.951 +08:00] [INFO] [collector.go:188] ["backup Failed summary : total backup ranges: 1, total success: 0, total failed: 1"] [unitName="dump table data"] [error="Error 1105: number of enum overflow enum boundary"] [errorVerbose="Error 1105: number of enum overflow enum boundary\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/errors.go:174\
github.com/pingcap/errors.Trace\
\tgithub.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/juju_adaptor.go:15\
github.com/pingcap/dumpling/v4/export.WriteInsert\
\tgithub.com/pingcap/dumpling@/v4/export/writer_util.go:259\
github.com/pingcap/dumpling/v4/export.FileFormat.WriteInsert\
\tgithub.com/pingcap/dumpling@/v4/export/writer_util.go:593\
github.com/pingcap/dumpling/v4/export.(*Writer).tryToWriteTableData\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:204\
github.com/pingcap/dumpling/v4/export.(*Writer).WriteTableData.func1\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:190\
github.com/pingcap/br/pkg/utils.WithRetry\
\tgithub.com/pingcap/br@v0.0.0-20201119111016-600102357a27/pkg/utils/retry.go:34\
github.com/pingcap/dumpling/v4/export.(*Writer).WriteTableData\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:161\
github.com/pingcap/dumpling/v4/export.(*Writer).handleTask\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:104\
github.com/pingcap/dumpling/v4/export.(*Writer).run\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:86\
github.com/pingcap/dumpling/v4/export.(*Dumper).startWriters.func4\
\tgithub.com/pingcap/dumpling@/v4/export/dump.go:253\
golang.org/x/sync/errgroup.(*Group).Go.func1\
\tgolang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57\
runtime.goexit\
\truntime/asm_amd64.s:1357"]
[2021/02/26 00:10:26.952 +08:00] [ERROR] [main.go:78] ["dump failed error stack info"] [error="Error 1105: number of enum overflow enum boundary"] [errorVerbose="Error 1105: number of enum overflow enum boundary\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/errors.go:174\
github.com/pingcap/errors.Trace\
\tgithub.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/juju_adaptor.go:15\
github.com/pingcap/dumpling/v4/export.WriteInsert\
\tgithub.com/pingcap/dumpling@/v4/export/writer_util.go:259\
github.com/pingcap/dumpling/v4/export.FileFormat.WriteInsert\
\tgithub.com/pingcap/dumpling@/v4/export/writer_util.go:593\
github.com/pingcap/dumpling/v4/export.(*Writer).tryToWriteTableData\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:204\
github.com/pingcap/dumpling/v4/export.(*Writer).WriteTableData.func1\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:190\
github.com/pingcap/br/pkg/utils.WithRetry\
\tgithub.com/pingcap/br@v0.0.0-20201119111016-600102357a27/pkg/utils/retry.go:34\
github.com/pingcap/dumpling/v4/export.(*Writer).WriteTableData\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:161\
github.com/pingcap/dumpling/v4/export.(*Writer).handleTask\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:104\
github.com/pingcap/dumpling/v4/export.(*Writer).run\
\tgithub.com/pingcap/dumpling@/v4/export/writer.go:86\
github.com/pingcap/dumpling/v4/export.(*Dumper).startWriters.func4\
\tgithub.com/pingcap/dumpling@/v4/export/dump.go:253\
golang.org/x/sync/errgroup.(*Group).Go.func1\
\tgolang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57\
runtime.goexit\
\truntime/asm_amd64.s:1357"] [stack="main.main\
\tgithub.com/pingcap/dumpling@/cmd/dumpling/main.go:78\
runtime.main\
\truntime/proc.go:203"]
dump failed: Error 1105: number of enum overflow enum boundary
IvanCai
(Ivan Cai)
18
1.有使用enum
tidb.log (7.5 MB)
2.你看一下10:36分左右的,有报错
IvanCai
(Ivan Cai)
20
CREATE TABLE `partner_message` (
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`type` enum('remind','cancel_order','after_sale','level_up','three_remind','withdraw','upgrade','remind_grow','remind_opend','set_type','replenishment','material_message','wait_level_up','ground_product_change','ground_apply_accept','ground_apply_refuse','downgrade_warn','demotion','big_demotion','invite_user_demotion','community_level_up','balance_refund') COLLATE utf8mb4_unicode_ci DEFAULT 'remind' COMMENT '未开团提醒',
`title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '标题',
`content` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '消息详情',
`partner_id` int(11) DEFAULT 0 COMMENT '团长uuid',
`community_id` int(11) DEFAULT 0 COMMENT '小区ID',
`customer_id` int(11) DEFAULT NULL COMMENT '用户id',
`other_id` int(11) DEFAULT NULL COMMENT '对应操作id',
`order_num` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_read` tinyint(1) DEFAULT 0 COMMENT '1已读',
`create_time` int(11) DEFAULT NULL,
`update_time` int(11) DEFAULT NULL,
`is_delete` tinyint(1) DEFAULT 0 COMMENT '1删除 0未删除',
`sub_title` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '副标题',
PRIMARY KEY (`message_id`),
KEY `partner_id` (`partner_id`),
KEY `customer_id` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=8088385 COMMENT='消息表';;
大概是8百万的数据量,刚刚确定应该是这个表的问题了.