On Jan 15, 2010, at 9:16 PM, Ergo wrote: > I wanted to conftrm that if we run multiple instances of web > application. then sessions in those applications are not aware of > commits that are issued by other instances sessions, right? > > So expire_on_commit=True does not ensure coherency of data and just > adds overhead, am i correct ?
Assuming these multiple instances are all talking to the same database, then they certainly are aware of commits, not in the sense that they receive an "event", but when process A commits data, process B will then see that data as it enters a new transaction subsequent to that of A. expire_on_commit is essential to this process, for an application that calls commit() on single session and then continues to use that same session without closing or otherwise expiring it, as it allows that session to re-fetch data from the database which may have been changed subsequent to its commit. > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > 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. > >
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
