|Pathologically Eclectic Rubbish Lister|
Re^2: avoiding a race (read locks)by westy032001 (Novice)
|on Sep 28, 2010 at 15:31 UTC||Need Help??|
Thanks for the reply.
If I understand you correctly, isnt there still a potential for a race condition ?If the database goes down and all 300 procs get a db error.
process 123 open file and places a shared lock
process 321 opens file and places a shared lock
process 123 decides it is going to modify the file and so waits for 123 to unlock then places an exclusive lock modifies file and closes
process 321 decides it is going to modify the file and so places an exclusive lock modifies file and closes.
If both are changing the file as a result of the same error (i.e database is down) you will get 2 of the same error codes recorded. and 2 emails sent to admins .thanks.