openedx / openedx/edx-django-utils
Investigate and possibly replace _ReadReplicaRouterStorage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 28
- Forks
- 31
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 1
Description
_ReadReplicaRouterStorage is a thread local, and may need to be replaced with a contextvar to make things async-friendly. It's possible that built-in Django functionality now exists to do the same thing, and we can replace this altogether.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in edx_django_utils/db/read_replica.py, especially the _ReadReplicaRouterStorage definition around lines 107-113. Investigate how the thread-local state is used and compare contextvars with any relevant built-in Django functionality for async compatibility. Done means documenting a justified replacement decision or confirming why the current implementation should remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, database
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100