-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
bugSomething isn't workingSomething isn't workingdatabase-backendIssues relating to the database backendIssues relating to the database backend
Milestone
Description
SQLite doesn't support select_for_update, which is a key component of the database worker to ensure that a task is only picked up by a single database worker.
In Django 5.1, it's possible to change how the transactions are created. If transactions are created using EXCLUSIVE, this solves the concurrency issues, although increases the risk of locking errors (something we already work around with a retry, but it can reduce throughput). Therefore, without EXCLUSIVE, the task semantic changes from "at most once" to non-deterministic "zero or more times", which is at best unhelpful and at most a great source of confusion and complexity.
I see 2 possible solutions for this:
- Require that
EXCLUSIVEtransactions be used if SQLite is in a system check, and prevent usage without it - Backport the functionality into
django-tasks. This is far more complex, but it allows users of Django 4.2 and 5.0 to use SQLite.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdatabase-backendIssues relating to the database backendIssues relating to the database backend