Error Executing Update Statement: Transaction Expired Upon Commit

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

Original topic: update语句执行报错, 事务提交时过期

| username: Hacker_0LElpqkb

【TiDB Usage Environment】Production Environment / Testing / Poc
【TiDB Version】6.5
【Reproduction Path】Error occurs when executing update statement again after failure
【Encountered Problem: Problem Phenomenon and Impact】
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachment: Screenshot/Log/Monitoring】

[2024/03/07 22:26:11.931 +08:00] [ERROR] [lock_resolver.go:1103] [“resolveLock error”] [error=“unexpected resolve err: commit_ts_expired:<start_ts:443481858696045745 attempted_commit_ts:443481858696070679 key:"t\200\000\000\000\000\000\002j_r\200\000\000\000\003\314Q\264" min_commit_ts:443481864372486146 > , lock: key: 74800000000000026a5f728000000003cc51b4, primary: 74800000000000021d5f698000000000000001013838373434303432ff3039373535303535ff3938000000000000f9, txnStartTS: 443481858696045745, lockForUpdateTS:443481858696054340, minCommitTs:443481864372486146, ttl: 44600, type: Put, UseAsyncCommit: true, txnSize: 1”]

| username: 哈喽沃德 | Original post link

The transaction was neither committed nor rolled back, right?

| username: Hacker_0LElpqkb | Original post link

When executing the update, the transaction was not opened. Then an error occurred, and after modifying the SQL and re-executing it, it didn’t work anymore. :upside_down_face:

| username: FutureDB | Original post link

It looks like there is a lock.

| username: zhang_2023 | Original post link

Why is there a lock? I don’t see it.

| username: Hacker_0LElpqkb | Original post link

select * from information_schema.data_lock_waits
I didn’t see any locks related to this update through the query, so it’s very strange :upside_down_face:

| username: Hacker_0LElpqkb | Original post link

I checked these two tables:
information_schema.deadlocks
information_schema.CLUSTER_TIDB_TRX

I didn’t see any related locks. How is this kind of issue generally handled? This part of the data still can’t be updated.

| username: 小于同学 | Original post link

The transaction hasn’t been committed, right?

| username: redgame | Original post link

Check the time on several machines.

| username: TiDBer_aaO4sU46 | Original post link

Did it report a bunch of locks?