#27982: Possible race condition related to queryset union
-------------------------------------+-------------------------------------
Reporter: gigelu | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by gigelu):
Digging deeper, I found something interesting here:
https://github.com/django/django/blob/master/django/core/paginator.py#L69
http://i.imgur.com/W3AwbEQ.png
If I change the `@cached_property` to `@property`, it is called 5 times
and only the first time it shows `[1, 5]`, the other 4 times it shows `[5,
5]`.
Nonetheless, if I remove the breakpoint it returns only one notification.
If I change the order in the list, `[len(self.object_list),
self.object_list.count()]` it shows every time `[5, 5]`.
--
Ticket URL: <https://code.djangoproject.com/ticket/27982#comment:9>
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 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.c18a3aa89276f307637c4885f5864c1f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.