Hi, > I have an in-memory database with a single table and multiple threads > reading and writing to this table. Occasionally I get lock timeouts > when attempting to insert. Is there any method to see who is holding > the lock when the timeout occurs?
The session is not included in the error message. It could be multiple sessions. To get the current locks, use SELECT * FROM INFORMATION_SCHEMA.LOCKS > Also, the inserts are batched 50 at a time, but when there is a lock > timeout, the BatchUpdateException.getUpdateCounts() indicates that 49 > of the 50 inserts completed. I would think that none of the inserts > completed if the lock could not be acquired. A batch update is not a transaction. For H2, batch updates are "just another API", internally they are not much different or faster than using regular prepared statements. Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
