Loader导入问题 TiKV server timeout

  • 【TiDB 版本】:v3.0.12
  • 【问题描述】:loader 过程中经常出现

1、[fatal] Error 9005: Region is unavailable

2、[fatal] Error 9002: TiKV server timeout

/usr/local/tidb-enterprise-tools-latest-linux-amd64/bin/loader -t 32 -u root -h 10.1.0.5 -P 4000 -d /data2/mydumper/export-20200403-035911

您好: 看起来是导入过程中太繁忙了,导致TiKV报错,请尝试降低并发导致,先尝试默认的16,也有问题的话,降低到8

但是我们数据量很大,800G ,线程开小的话很慢,我开了32个线程,一天只能导20%,线程开低的话会降低导入速度,导入需要1周的时间,而且我尝试多次了,这块对于我们来说太浪费时间了

可以尝试使用lightning导入吗?
https://pingcap.com/docs-cn/v3.0/reference/tools/tidb-lightning/overview/

我后期需要做同步的

你好,

目前 loader 已经不维护了,建议使用 tidb lighting 快速导入之后可以通过 dm 进行增量同步的,使用 tidb lighting 导入并不影响增量同步。

https://pingcap.com/docs-cn/stable/reference/tools/user-guide/