On Dec 10, 2008, at 6:56 AM, chingi wrote:

>
> hi all,
>        i am building a multi threaded  web server which do lot of
> save and update to database. sqlalchemy version that i am using is
> "0.4.4" python version 2.5 and mysql server 4.1.
>
>        The problem is when i save or update and do flush then it is
> not reflected in database immediately and due which the select query
> done by another thread gets the old data.
>          i don't want to give row level lock.so can anyone suggest me
> some other way


you should make sure the transaction is committed after the flush()  
(i.e. session.commit()).    in the 0.4 series it depends on if you are  
using transactional=True or not how this would play out.

in general any web request should be doing a full commit of whatever  
data has changed by the end of its lifecycle, race conditions between  
individual requests should not be an issue since we're not dealing  
with long-running transactions.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to