Changes between Version 4 and Version 5 of Ticket #29203
- Timestamp:
- Mar 8, 2018, 11:52:55 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29203 – Description
v4 v5 26 26 # First check if we need to delete this cookie. 27 27 # The session should be deleted only if the session is entirely empty 28 if settings.SESSION_COOKIE_NAME in request.COOKIES and empty: 28 if settings.SESSION_COOKIE_NAME in request.COOKIES and empty: # NEED TO UPDATE! 29 29 response.delete_cookie( 30 30 settings.SESSION_COOKIE_NAME, … … 35 35 }}} 36 36 37 I guess the initial intention was to delete a session if there is no values in it. However, it happens that code execution reaches at that code without exception, even if cache nodes are unavailable. The reason is, I already explained above, they just work that way even if the cache backend failed.37 I guess the initial intention was to delete a session if there is no values in it. However, it happens that code execution reaches at :37 that code without exception, even if cache nodes are unavailable. The reason is, I already explained above, they just work that way even if the cache backend failed. 38 38 39 39 I first met this bug while I was testing failover of AWS Elasticache (Redis). I was in testing of failover scenario, but Django application got me logged out repeatedly, even though session data itself is remaining in the cache replica. (it should, because it was doing failover, not reboot)