Re: Are there MySQL versions which are more robust and suitable for a multi-threaded Java EE, Hibernate and Ehcache application?
Posted by: Todd Farmer
Date: August 30, 2012 11:08AM

Hi Lars,

Yeah, you won't have lock contention (no matter how long locks are held) with a single-threaded application. Adding the second instance will expose any bad behavior in the application code that holds locks too long. There are tools to identify which transactions hold locks for excessive periods, or are blocking other connections:

http://mysqlblog.fivefarmers.com/2012/08/28/identifying-and-killing-blocking-transactions-in-innodb/

Ultimately, this is an application issue. If the application makes changes to row A (requiring a lock) but doesn't commit changes for a long period of time, it should not surprise that another connection cannot acquire that lock while the connection is outstanding.

Hope that helps,

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.