[Zope] FSSession atomicity?

Pavlos Christoforou pavlos@gaaros.com
Tue, 11 Apr 2000 14:02:51 -0400 (EDT)


On Tue, 11 Apr 2000, Curtis Maloney wrote:

> 
> In fact, the logic of it only holds because it's happening.  
> Otherwise I would have thought the session details would be written as
> the FSSession dtml-calls occurred.
> 

FSSession stores session data in a volatile attribute and only commits
them on disk if the transaction successfully commits. It would be
innefficient to access the disk everytime there is an update to the
FSSession object not to mention that rolling back transactions would be a
nightmare.

A consequence of this is that if a user with the same Session UID tries to
access his session info from a different thread before the first commits
(as it would happen if a user points two browsers on Zope at the same
time.... darn I suppose it could happen with frames too) then the second
thread will not see the additions. I considered this possibility
'unnatural' but then again I did not think about frames then. 

What does your log in code look like?

Pavlos