Skip to content

Commit

Permalink
Add description about PessimisticLockNotFound relating to lazy unique…
Browse files Browse the repository at this point in the history
…ness check area/transaction Indicates that the Issue or PR belongs to the area of transaction (pingcap#10982)
  • Loading branch information
ekexium authored May 5, 2023
1 parent 8f9c34c commit 9cf3aef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ To achieve better performance of pessimistic transactions, you can set the [`tid
ERROR 9007 (HY000): Write conflict, txnStartTS=435688780611190794, conflictStartTS=435688783311536129, conflictCommitTS=435688783311536130, key={tableID=74, indexID=1, indexValues={bill, }} primary={tableID=74, indexID=1, indexValues={bill, }}, reason=LazyUniquenessCheck [try again later]
```

- When this variable is disabled, if there is a write conflict among multiple pessimistic transactions, the pessimistic lock might be forced to roll back when other pessimistic transactions are committed, thus resulting in a `Pessimistic lock not found` error. When this error occurs, it means that deferring the unique constraint check of the pessimistic transaction is not suitable for your application scenario. In this case, consider adjusting the application logic to avoid the conflict or retrying the transaction after an error occurs.

- When this variable is disabled, executing a DML statement in a pessimistic transaction might return an error `8147: LazyUniquenessCheckFailure`.

> **Note:**
Expand Down

0 comments on commit 9cf3aef

Please sign in to comment.