Issues with Dumpling Export

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: dumpling导出的问题

| username: tidb狂热爱好者

【TiDB Usage Environment】Production Environment / Testing / Poc
【TiDB Version】5.4
After exporting with dumping, I found that database queries were restricted and reported errors.
Can this problem be solved by setting parameters separately?
To prevent slow SQL from causing an avalanche online, execution time limits were added.

【Encountered Problem】
[2022/10/27 12:40:19.049 +08:00] [INFO] [dump.go:708] [“fallback to sequential dump due to no proper field. This won’t influence the whole dump process”] [database=exchange] [table=bank]
[2022/10/27 12:40:19.104 +08:00] [INFO] [dump.go:708] [“fallback to sequential dump due to no proper field. This won’t influence the whole dump process”] [database=exchange] [table=borrow_order]
[2022/10/27 12:40:19.119 +08:00] [INFO] [dump.go:708] [“fallback to sequential dump due to no proper field. This won’t influence the whole dump process”] [database=exchange] [table=borrow_rule]
[2022/10/27 12:40:21.052 +08:00] [WARN] [writer_util.go:194] [“fail to dumping table(chunk), will revert some metrics and start a retry if possible”] [database=exchange] [table=balance_snapshot] [“finished rows”=5088] [“finished size”=5543459] [error=“Error 1317: Query execution was interrupted”]
[2022/10/27 12:40:21.052 +08:00] [WARN] [writer_util.go:194] [“fail to dumping table(chunk), will revert some metrics and start a retry if possible”] [database=exchange] [table=balance_snapshot] [“finished rows”=2234] [“finished size”=2433893] [error=“context canceled”]
[2022/10/27 12:40:21.053 +08:00] [WARN] [writer_util.go:194] [“fail to dumping table(chunk), will revert some metrics and start a retry if possible”] [database=exchange] [table=balance_snapshot] [“finished rows”=49675] [“finished size”=54083260] [error=“context canceled”]
[2022/10/27 12:40:21.053 +08:00] [WARN] [writer_util.go:194] [“fail to dumping table(chunk), will revert some metrics and start a retry if possible”] [database=exchange] [table=balance_snapshot] [“finished rows”=6673] [“finished size”=7265449] [error=“context canceled”]
[2022/10/27 12:40:21.053 +08:00] [INFO] [collector.go:204] [“units canceled”] [cancel-unit=0]
[2022/10/27 12:40:21.053 +08:00] [INFO] [collector.go:205] [“backup failed summary”] [total-ranges=1] [ranges-succeed=0] [ranges-failed=1] [unit-name=“dump table data”] [error=“Error 1317: Query execution was interrupted”] [errorVerbose=“Error 1317: Query execution was interrupted\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174\ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/juju_adaptor.go:15\ngithub.com/pingcap/tidb/dumpling/export.(*rowIter).Error\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:41\ngithub.com/pingcap/tidb/dumpling/export.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:284\ngithub.com/pingcap/tidb/dumpling/export.FileFormat.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:655\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).tryToWriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:238\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData.func1\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:223\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:52\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:192\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).handleTask\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:115\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).run\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:93\ngithub.com/pingcap/tidb/dumpling/export.(*Dumper).startWriters.func4\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:329\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220722155255-886fb9371eb4/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594”]
[2022/10/27 12:40:21.053 +08:00] [ERROR] [main.go:77] [“dump failed error stack info”] [error=“Error 1317: Query execution was interrupted”] [errorVerbose=“Error 1317: Query execution was interrupted\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174\ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/juju_adaptor.go:15\ngithub.com/pingcap/tidb/dumpling/export.(*rowIter).Error\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:41\ngithub.com/pingcap/tidb/dumpling/export.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:284\ngithub.com/pingcap/tidb/dumpling/export.FileFormat.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:655\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).tryToWriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:238\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData.func1\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:223\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:52\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:192\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).handleTask\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:115\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).run\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:93\ngithub.com/pingcap/tidb/dumpling/export.(*Dumper).startWriters.func4\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:329\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220722155255-886fb9371eb4/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594”]

【Reproduction Path】What operations were performed to cause the problem
【Problem Phenomenon and Impact】

【Attachments】

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: 啦啦啦啦啦 | Original post link

Try using the --params parameter to set session-level variables.

| username: tidb狂热爱好者 | Original post link

It should be resolved. Thank you, expert.

| username: 近墨者zyl | Original post link

How did you solve it? Boss.

| username: Kongdom | Original post link

The solution has already been posted.