What Are the Impacts on Applications from Locks, Timeouts, and DeadLocks

Q

What Are the Impacts on Applications from Locks, Timeouts, and DeadLocks? - MySQL FAQs - Transaction Management: Commit or Rollback

✍: FYIcenter.com

A

If you are using transactions with REPEATABLE READ isolation level and transaction safe storage engines in your applications, data locks, lock timeouts, and dead lock detections will impact your application in a concurrent multi-user environment like Web sites in several ways:

  • Data Locks - Helping your application to maintain data integrity and keep each user session consistent. But data locks also slows down your applications, since one user session may need to wait for other sessions to release locks before continuing some data operations.

  • Lock Timeouts - Helping your application to avoid long waits and improve response time to user actions. But your application code must catch the lock timeout errors, and deal with them properly, like asking your user to cancel and restart the process.

  • Dead Lock Detections - Helping your application to avoid dead user sessions and improve response time to user actions. But your application code must catch the dead lock errors, and deal with them properly, like asking your user to cancel and restart the process.

2007-05-08, 4758👍, 0💬