On a high-concurrency MySQL server, transactions will recursively detect deadlocks. When the depth is exceeded, the performance decline will become unacceptable. FACEBOOK has long proposed to prohibit deadlocks.
On a high-concurrency MySQL server, transactions will recursively detect deadlocks. When the depth is exceeded, the performance decline will become unacceptable. FACEBOOK has long proposed to prohibit deadlocks.
On a high-concurrency MySQL server, transactions recursively detect deadlocks. When the depth is exceeded, the performance decline will become unacceptable. FACEBOOK has long proposed a deadlock prevention test.
We conducted an experiment to greatly improve the TPS after deadlock prevention detection, as shown in:
After Deadlock Detection is prohibited, transactions will not be rolled back even if a deadlock occurs, but all transactions will wait until timeout.
Patch is relatively simple. You can directly add a layer of judgment before the Deadlock Detection:
If (innobase_deadlock_check & UNIV_UNLIKELY (lock_deadlock_occurs (lock, trx )))
....
Innobase_deadlock_check is a newly added system variable in innodb to control whether to enable Deadlock Detection.