#8616: File-based sessions dropped with SESSION_SAVE_EVERY_REQUEST = True
----------------------------------------------+-----------------------------
Reporter: [EMAIL PROTECTED] | Owner: mtredinnick
Status: assigned | 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 mtredinnick):
It's tempting to engage in a bikeshed painting operation here just because
I thought of a different way, but since you've tested this and have a
failing case to work against, I'm going with your patch.
In case this does give problems down the track, though, here's an
alternate solution: we write the new session to a different filename, so
the only contention is on the write side (which blocks due to the
exclusive write lock). Then we rename it to the original name upon
completion. Renaming is atomic (in the sense that nobody will read only
part of a renamed file) across platforms.
--
Ticket URL: <http://code.djangoproject.com/ticket/8616#comment:9>
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
-~----------~----~----~----~------~----~------~--~---