#16484: Duplicate entry sessions error
--------------------------------------+----------------------------------
Reporter: hash.3g@… | Owner: nobody
Type: Bug | Status: closed
Milestone: | Component: contrib.sessions
Version: 1.3 | Severity: Normal
Resolution: needsinfo | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+----------------------------------
Changes (by aaugustin):
* status: new => closed
* needs_better_patch: => 0
* resolution: => needsinfo
* needs_tests: => 0
* needs_docs: => 0
Comment:
From code inspection, I don't see how this can happen: it the call to
`obj.save(force_insert=must_create, using=using)`, `must_create` is
`False`, so the session should just be updated if it already exists. Here,
you're hitting a naked `raise`, which means that the original author
thought this should never happen.
I can only imagine one cause for a race condition: if two requests running
in two separate processes open a transaction, then commit: under some
isolation levels, this may fail.
Could you provide more information about your database setup so we can try
to reproduce this?
--
Ticket URL: <https://code.djangoproject.com/ticket/16484#comment:1>
Django <https://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.