batch dml 有概率出现 主键重复

应该还是遗留数据的问题,从切分上看,没问题。batch.txt 这个子任务前后有没有别的错误。因为执行多次,可以检查一下,truncate 前是不是上一个任务是不是确认结束了。

[2023/02/23 11:57:16.391 +08:00] [INFO] [nontransactional.go:423] [“start a Non-transactional DML”] [conn=4581018440105527369] [job=“job id: 17031, estimated size: 5000, sql: INSERT INTO sbtest.sbtestbak SELECT * FROM sbtest.sbtest1 WHERE sbtest1.id BETWEEN 85820988 AND 85825987”] [totalJobCount=20000]
[2023/02/23 11:57:16.501 +08:00] [INFO] [nontransactional.go:445] [“Non-transactional DML SQL finished successfully”] [conn=4581018440105527369] [jobID=17031] [jobSize=5000] [dmlSQL=“INSERT INTO sbtest.sbtestbak SELECT * FROM sbtest.sbtest1 WHERE sbtest1.id BETWEEN 85820988 AND 85825987”]