![]() |
|
P is for Practical | |
PerlMonks |
Re: Is it possible to implement Deadlock Retry Mechanism with Sybase::CTlib in BLK Copy Mode ?by mpeppler (Vicar) |
on Jul 23, 2011 at 14:20 UTC ( #916314=note: print w/replies, xml ) | Need Help?? |
a deadlock retry mechanism is essentially down to checking for a deadlock having occurred in a transaction, and resubmitting that transaction if that's the case. In Sybase::CTlib this means setting up a server message callback with some code that checks for error 1205 (deadlock), and re-sends the transaction that failed if that error code is detected. For blk_xxx() calls this means that you'll need to "remember" the rows that you sent between blk_done() calls so that you can re-send those rows in case a deadlock is detected. All of this can be written in perl and in your own code - no real need to subclass Sybase::CTlib (although you could do so) or delve into its C code. Michael
In Section
Seekers of Perl Wisdom
|
|