Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Effective deadlock handling
On Mon, 05 Jan 2004, damorgan_at_x.washington.edu wrote:
> Galen Boyer wrote:
>
>> On Sun, 04 Jan 2004, damorgan_at_x.washington.edu wrote: >> >>>I always code it with SKIP LOCKED and trap the PK of any >>>missed records for later processing. >> So, the application can have logic producing deadlock >> conditions but you put a little bit of dressing on the code so >> the application doesn't experience the deadlock error. >>
This analogy makes no sense. Here we are catching unexpected errors. Purposefully ignoring deadlock issues is bad programming.
> Just a matter of perspective. From my experience ... at least
> 50% of good code is defensive in nature.
But, your analysis of how to handle deadlocks wasn't "fix the logic of the application". Your analysis of how to handle deadlocks was to "SELECT FOR UPDATE SKIP LOCK" and then fix any errors afterwards. Thats akin to removing RI and then, after processing is done, run a query which finds orphaned children and fix them. I guess one could consider it defensive programming...
-- Galen BoyerReceived on Mon Jan 05 2004 - 15:02:16 CST
![]() |
![]() |