Hi,

If h2 detects a deadlock it tries to rollback the transaction where deadlock was first encountered. Does it try to run that transaction once the conflicting transaction has finished (in the confines of the timeout period)?
This way it could automatically fix most deadlocks.

The reason why I am pondering this is that when a deadlock is encountered in a trigger, h2 tries to do the rollback but because rollback is not allowed within a trigger it throws an exception telling user that rollback is not allowed within a trigger.

The clear problem here is that the real issue (deadlock) is lost in the exception handling.

In Command.executeUpdate() method on line 233 the session is rolled back which does not work inside a trigger.

H2 could check first from Session whether rollback is allowed before trying to do it. And if it ain't then throw a specific Exception eg. RollbackRequestedException that could be recognized at top level and the transaction could be rolled back there and retried once the conflicting transaction
has finished.

Am I on the right track?
Are rolled back transactions retried?

- rami

--
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.

Reply via email to