The code tries to handle a scenario like the following (of course, the
statements can be relatively ordered in different ways). Can you describe
how the scenario which fails for you looks like? I am assuming you are
using READ COMMITTED, and that the lookup fields are unique together.
THREAD1 THREAD2
SELECT => not found
SELECT => not found
BEGIN
INSERT => success
COMMIT
BEGIN
INSERT => integrity error
ROLLBACK
(enter except IntegrityError)
SELECT => ??? (should be success)
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CANeXs%3D3BGYGNX-U1oURCZy5e4VYG%2BNjOdQcPCDjc6CHgAt0faw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.