concurrency and locking isolation levels

Posts   
 
    
tvoss avatar
tvoss
User
Posts: 192
Joined: 07-Dec-2003
# Posted on: 16-Dec-2003 20:39:38   

With the concurrency actions that you have built into your system is the isolation level readcommitted safe?

I am working with an asynchronous read, tcp/ip system where when I select the next task to be processed I need to lock before that selection and then keep lock until I can set the Out property to true so that no other client will try to get that record.

There are lots of clients so this has to be solid since the system is designed for the clients to be stressing the server's capabilites as much as possible.

Performance is important, but the solidity of the locking is more important.

Any suggestions?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 16-Dec-2003 21:13:51   

In SqlServer, Writers block readers and with the ReadCommitted transaction method, locks will be placed on the rows which are affected by SqlServer. Readers using OTHER connections will block. The SqlServer DQE doesn't add hints like 'NOLOCK' to the selects, so selects will block until the write lock is lifted by a commit or rollback.

Frans Bouma | Lead developer LLBLGen Pro