#31253 closed Bug (fixed)
Possible data loss when using caching from async code.
| Reported by: | Mariusz Felisiak | Owned by: | Jon Dufresne |
|---|---|---|---|
| Component: | Core (Cache system) | Version: | 3.0 |
| Severity: | Release blocker | Keywords: | asgi async |
| Cc: | Andrew Godwin, Carlton Gibson | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
CacheHandler use threading.local instead of asgiref.local.Local, hence it's a chance of data corruption if someone tries to use caching from async code. There is a potential race condition if two coroutines touch the same cache object at exactly the same time.
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
| Needs documentation: | unset |
|---|---|
| Needs tests: | unset |
| Triage Stage: | Accepted → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
PR