Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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??


in reply to Is it possible to implement Deadlock Retry Mechanism with Sybase::CTlib in BLK Copy Mode ?

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


Comment on Re: Is it possible to implement Deadlock Retry Mechanism with Sybase::CTlib in BLK Copy Mode ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://916314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2015-07-04 14:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls