#8616: File-based sessions dropped with SESSION_SAVE_EVERY_REQUEST = True
----------------------------------------------+-----------------------------
          Reporter:  [EMAIL PROTECTED]    |         Owner:  nobody             
            Status:  new                      |     Milestone:  1.0             
   
         Component:  django.contrib.sessions  |       Version:  SVN             
   
        Resolution:                           |      Keywords:  session, file, 
race
             Stage:  Accepted                 |     Has_patch:  1               
   
        Needs_docs:  0                        |   Needs_tests:  0               
   
Needs_better_patch:  0                        |  
----------------------------------------------+-----------------------------
Comment (by [EMAIL PROTECTED]):

 I have resolved the issue with using django.core.files.locks to lock the
 session file for reading and writing.

 The solution is to separate the locking semantics into a separate lock
 file that is opened and locked before opening the session file and closed
 after closing the session file.  This allows the non-atomicity of opening
 and locking a file to become irrelevant, since no I/O operations are
 actually performed on the lock file.

 I am submitting a second patch that implements this alternate locking
 method.  This patch should work cross-platform, though I have only tested
 it on Mac OSX.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8616#comment:7>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to