profcomff / profcomff/auth-api
Управление транзакциями: явный commit/rollback
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
connection закрывать с помощью rollback или commit и не обращаться к бд (ОРМ) после этого
Делать только в нагруженных местах, везде не надо
Пример от Тимура: https://github.com/Western-CSUS-2025-2026/CSUS-Project-25-26/blob/0d555aaf4c864d1c955b98784d9ddd41f4720d30/interviewer_backend/api/routes/user.py#L324https://github.com/Western-CSUS-2025-2026/CSUS-Project-25-26/blob/0d555aaf4c864d1c955b98784d9ddd41f4720d30/interviewer_backend/api/routes/user.py#L324
Проблема сейчас с возможным превышение лимита подключений к бд в высоконагруженных местах, подробнее https://docs.sqlalchemy.org/en/21/errors.html#connections-and-transactions
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
Review the SQLAlchemy connections and transactions guidance and the linked interviewer_backend/api/routes/user.py example first. Then locate high-load paths in auth-api and define which connection lifecycle changes are in scope; completion should demonstrate explicit commit or rollback without ORM use afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100