John Flynn
2008-09-29 21:32:31 UTC
Hi.
In reading up about ASE deadlocks I have seen advice on some websites that
says, if you choose to have the 1205 victim recover by resubmitting its
transaction, you should first "back off" some period of time. I don't
understand this advice. I understand how you theoretically could deadlock
again when you retry, but it seems to me that's just as likely whether you
retry immediately or wait a little while (or a year). For best throughput
you should immediately retry the transaction without delay. Maybe the "other
guy" is still in his transaction and still has one of your tables locked,
but in that case you will experience an ordinary block (that will clear
according to ASE's normal lock handling) but you won't DEADlock with him
again. [For the same basic reason, there's no benefit in counting up how
many times you've retried a transaction due to 1205, and giving up after
some number of retries.]
Is my logic right? I couldn't find any info about this in any Sybase doc
(other than the general advice to "resubmit the transaction").
Thanks.
- John.
In reading up about ASE deadlocks I have seen advice on some websites that
says, if you choose to have the 1205 victim recover by resubmitting its
transaction, you should first "back off" some period of time. I don't
understand this advice. I understand how you theoretically could deadlock
again when you retry, but it seems to me that's just as likely whether you
retry immediately or wait a little while (or a year). For best throughput
you should immediately retry the transaction without delay. Maybe the "other
guy" is still in his transaction and still has one of your tables locked,
but in that case you will experience an ordinary block (that will clear
according to ASE's normal lock handling) but you won't DEADlock with him
again. [For the same basic reason, there's no benefit in counting up how
many times you've retried a transaction due to 1205, and giving up after
some number of retries.]
Is my logic right? I couldn't find any info about this in any Sybase doc
(other than the general advice to "resubmit the transaction").
Thanks.
- John.