Concurrency between processes
Posted in 1996
I'm perhaps wrong so i'm ready to get any corrections. Our problem is the high concurrency between processes and the application has a big amount of update (several updates or insert per second). First we didn't use the mechanism of 'CURSOR FOR UPDATE' when updating or deleting rows. So an update was directly performed throw prepare/execute statments. Also we are working with a committed read isolation and a locking level to row, and a lock mode wait 90. The informix release is 5.03. When 2 processes are trying to update the same table (and it's never the same row !!!), the second process failed with one of the following errors 244, 245, 246, 346. And this process that failed NEVER wait for the 90 seconds. Is it a normal comportment, normal feature ???? Then we change to work with 'CURSOR FOR UPDATE' since we thought that this allows building a queue of updates (i don't know if it's true). BUT also with this method of update, we get the error 346 and some others. My question is very simple, but i fear that the response is more complex than the question. How can I allow several processes updating the same tables (or adjacent rows) without problems ? Thanks a lot for any response since it's very critical. -- <Yakov Berkovitch - berko@tx1.elex.co.il>