What is the issue when there is only one connection updating a single table, but a lock timeout occurs?

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

Original topic: 单表只有一个链接在更新此表,出现获取锁超时的情况,是什么问题

| username: Running

The image you uploaded is not visible. Please provide the text you need translated.

| username: 裤衩儿飞上天 | Original post link

The previous DML was not completed, which locked the subsequent update records.

| username: tidb菜鸟一只 | Original post link

Let’s see if there are any locks.

| username: Running | Original post link

No DML operations

| username: Running | Original post link

No locks were found. This issue occurs occasionally, possibly because the lock was already released by the time the query was made.

| username: TiDBer_pkQ5q1l0 | Original post link

Is the table large? This looks like a full table update. Could it be that the update time is too long?

| username: tidb菜鸟一只 | Original post link

How big is this table? Don’t update it all at once, try updating it in batches.