WeblateOrg / WeblateOrg/weblate
Consider PostgreSQL advisory locks instead of redis + file locking
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
https://github.com/WeblateOrg/weblate/pull/21445 introduces usage of PostgreSQL advisory locks (because it needed shared locks that the current Redis implementation doesn't offer). This might be actually a good fit for the existing locks as it allows scoping them to transaction without need for artificial timeouts and refreshes.
### Solution brainstorm
Revisit WeblateLock implementation and make it PostgreSQL only and scoped to transaction. No file-based fallback, no refreshes, no timeouts.
### Describe alternatives you have considered
_No response_
### Screenshots
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start by reading the WeblateLock implementation and pull request #21445, focusing on how Redis and file-based locking currently handle shared locks, refreshes, and timeouts. Done means WeblateLock uses PostgreSQL advisory locks scoped to a transaction, with no file fallback, refreshes, or artificial timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python, redis
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100