#29202: KeyError in django-sites caching (race condition?)
------------------------------------------+------------------------
               Reporter:  Dominik George  |          Owner:  nobody
                   Type:  Bug             |         Status:  new
              Component:  contrib.sites   |        Version:  1.10
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 Django Version: 1.10.8
 Python Version: 3.5.3

 Relevant backtrace:

 {{{
 File
 "/srv/www/teckids-website/venv/lib/python3.5/site-
 packages/django/contrib/sites/models.py"
 in _get_site_by_id
   37.         return SITE_CACHE[site_id]

 File "/srv/www/teckids-website/venv/lib/python3.5/site-
 packages/multisite/hacks.py" in
 __getitem__
   124.             raise KeyError(key)
 }}}

 In theory, there cannot be a KeyError there, unless the cache is cleared
 while the method is running. The code does not seem to be thread-safe.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29202>
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/055.c52bb260cb200bedbf571c13eb462e32%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to