As a follow-up to https://groups.google.com/forum/?fromgroups#!topic/h2-database/8bVWdZmGAPI is it possible for H2 to provide more information in case of a deadlock? For example, today I get one exception per thread involved in the deadlocks. For example:
Session #6 (user: SA) is waiting to lock PUBLIC.CONNECTIONS while locking PUBLIC.DEPARTMENTS (shared), PUBLIC.CALLS (shared), PUBLIC.PARTICIPANTS (shared), PUBLIC.COMPANIES (shared). Session #5 (user: SA) is waiting to lock PUBLIC.PARTICIPANTS while locking PUBLIC.COMPANIES (shared), PUBLIC.DEPARTMENTS (shared), PUBLIC.CALLS (shared), PUBLIC.PARTICIPANTS (shared), PUBLIC.CONNECTIONS (shared)."; SQL statement: update PARTICIPANTS set LAST_SEEN_TIME = ? where PARTICIPANTS.ID = ? [40001-172] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2-1.3.172.jar:1.3.172] at org.h2.message.DbException.get(DbException.java:169) ~[h2-1.3.172.jar:1.3.172] at org.h2.message.DbException.get(DbException.java:146) ~[h2-1.3.172.jar:1.3.172] at org.h2.table.RegularTable.doLock(RegularTable.java:504) ~[h2-1.3.172.jar:1.3.172] at org.h2.table.RegularTable.lock(RegularTable.java:450) ~[h2-1.3.172.jar:1.3.172] at org.h2.command.dml.Update.update(Update.java:89) ~[h2-1.3.172.jar:1.3.172] at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[h2-1.3.172.jar:1.3.172] at org.h2.command.Command.executeUpdate(Command.java:235) ~[h2-1.3.172.jar:1.3.172] at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:154) ~[h2-1.3.172.jar:1.3.172] at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:140) ~[h2-1.3.172.jar:1.3.172] at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) ~[bonecp-0.7.1.RELEASE.jar:0.7.1.RELEASE] at com.mysema.query.sql.dml.SQLUpdateClause.execute(SQLUpdateClause.java:156) ~[querydsl-sql-3.2.0.jar:na] at com.foo.sql.row.Participant.update(Participant.java:411) ~[classes/:na] In the above case, would it be possible for H2 to provide the actual values (e.g. participants.id) used in the SQL statement that triggered a deadlock? If you're feeling extra generous, would it be possible for it to provide a list of all locked rows for the other tables (connections, departments, calls and companies)? This information would enable me to understand why/how a deadlock occurred and even reproduce it on demand if I needed to. Thanks, Gili -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
