Thursday, March 12, 2015

Re: Django 1.8b2: m2m signal raising ProtectedError now affects unrelated queries inside tests

Thanks Florian.


On Friday, March 13, 2015 at 2:34:46 AM UTC+11, Florian Apolloner wrote:
Hi Peter,

On Thursday, March 12, 2015 at 11:26:21 AM UTC+1, Peter Schmidt wrote:

Exactly
 
We can fix it by catching the known instance of ProtectedError explicitly which we probably should be doing in our signal anyway.

Yes, you should
 
But it's not clear if we can always catch ProtectedError for all possible protected relationships, and whether that could be a symptom of something that might affect more downstream code (like possibly different future requests to a Django app server with persistent DB connections... just a hypothesis?). Django's deep ORM internals are well out of my depth so if anyone can shed light on this (e.g. hopefully I'm completely wrong with my hypothesis), that would be appreciated.

At the end of requests, the transactions are reset anyways, leakage into other requests (persistent connection or not) cannot happen.
 
Cheers,
Florian

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/df71a889-0874-4adc-8483-4ebee4b6d591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment