All Forums Connectivity
Duri83 17 posts Joined 01/12
17 Jul 2012
Query retry on deadlock in JDBC

Hello,

I have gone through JDBC documentation, but I have not found a property or any other way, how to tell jdbc to retry a query that was aborted due to a deadlock.

We are running a lot of concurrent jobs and we get sometimes a deadlock - not because of actual deadlock, but because of lock table being full on an AMP.

Is there a way how to set JDBC to retry the failed query without aborting?

Thanks GLHF,

Yuri

tomnolan 594 posts Joined 01/08
17 Jul 2012

Regarding the aborting...

When you receive Error 2631 "Transaction ABORTed due to deadlock", that is an error from the Teradata Database, and it indicates that the Teradata Database has aborted your transaction. The Teradata Database choosing to abort a transaction is outside the control of the Teradata JDBC Driver.

Regarding automatic retry...

No, the Teradata JDBC Driver does not provide any feature to retry a query. That is the responsibility of your application.

Please keep in mind that a transaction may consist of many SQL requests. It would be incorrect for the Teradata JDBC Driver to simply retry the most recent SQL request.

Duri83 17 posts Joined 01/12
17 Jul 2012

Hello Tomnolan,

Thanks for the answer.

You must sign in to leave a comment.