It is not possible to know in advance all the locks you may wish to set.
That's the problem.



-----Original Message-----
From: Charles Stevenson <[email protected]>
To: U2 Users List <[email protected]>
Sent: Tue, Oct 25, 2011 5:22 pm
Subject: Re: [U2] [UV] LIST.READU EVERY's "waiters" when there are writes w/o 
explicit readu.


While Will's articledoes give a good, clear example of a deadly embrace, 
nd remediating faulty code is not trivial, the solution is conceptually 
rivial and it is exactly the LOCKED clause that saves us.
If you write new code, deadlocks are easy to prevent.
Testing is non-trivial. It generally requires load or stress testing 
here mutiple processes vie for the same locks.
In a nutshell: you shouldn't begin writing ANY part of a logical 
ransaction until you own ALL necessary locks.  LOCKED clauses help you 
rap cases where you can't get one of those needed locks, allowing you 
o release all other related locks, (freeing up everything so the 
ompeting process can finish its work), then you try again.   No 
eadlocks.  QED.
My problem posed at the start of this thread represents a conceptually 
rivial project but it will include retrofitting this anti-deadlock 
ogic.  Non-trivial hours.  Opportunity costs.  More consistent data!
All MV platforms support this same solution.
If someone else wants to explain it in further detail for the newbies, 
lease, be my guest.
cds
On 10/25/2011 12:27 PM, Wjhonson wrote:
 This is deadly embrace

 
http://knol.google.com/k/will-johnson/deadly-embrace-on-pick-systems/4hmquk6fx4gu/816#view

 The Locked clause does not save us from it.  There is no known trivial 
olution to the problem, which troubles all multi-table, multi-user database 
nvironments.

 Perhaps we should start a new thread to discuss various approaches to the 
ssue.
 _______________________________________________
 U2-Users mailing list
 [email protected]
 http://listserver.u2ug.org/mailman/listinfo/u2-users


______________________________________________
2-Users mailing list
[email protected]
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to