Locking Issues in TiDB Dumpling

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

Original topic: tidb dumpling 加锁问题

| username: TiDBer_eIQDQW2z

When using dumpling, the following error occurred:
[2023/05/05 12:22:59.315 +00:00] [WARN] [dump.go:1421] [“error when use FLUSH TABLE WITH READ LOCK, fallback to LOCK TABLES”] [error=“sql: FLUSH TABLES WITH READ LOCK: Error 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation”] [errorVerbose=“Error 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation\nsql: FLUSH TABLES WITH READ LOCK\ngithub.com/pingcap/tidb/dumpling/export.FlushTableWithReadLock\n\tgithub.com/pingcap/tidb/dumpling/export/sql.go:619\ngithub.com/pingcap/tidb/dumpling/export.resolveAutoConsistency\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:1416\ngithub.com/pingcap/tidb/dumpling/export.runSteps\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:1290\ngithub.com/pingcap/tidb/dumpling/export.NewDumper\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:124\nmain.main\n\t./main.go:69\nruntime.main\n\truntime/proc.go:250\nruntime.goexit\n\truntime/asm_amd64.s:1598”]

I am quite curious about the granularity of this locking operation. Does the lock exist for the entire synchronization period?

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

Refer to this link:

| username: TiDBer_eIQDQW2z | Original post link

Thanks! I didn’t notice when reading the documentation.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.