Re: [Django] #34359: Add setting to disable global thread_sensitive flag for Async ORM and Async cache

15 views
Skip to first unread message

Django

unread,
Feb 21, 2023, 4:01:11 AM2/21/23
to django-...@googlegroups.com
#34359: Add setting to disable global thread_sensitive flag for Async ORM and Async
cache
-------------------------------------+-------------------------------------
Reporter: Jameel A. | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: new => closed
* resolution: => wontfix
* component: Uncategorized => Database layer (models, ORM)
* type: Uncategorized => New feature


Comment:

> For example, when using Postgres, the psycopg database driver is thread-
safe and appears to work fine with the thread_sensitive flag disabled.
>
> The issue here is not whether thread_sensitive should be True by
default, but rather there should be a way to disable it when the user
knows it's safe to do so. In particular, for the async ORM and async cache
interfaces, it would be wonderful to configure thread sensitivity via a
setting.

Define "appears" :) — I think this needs a **proof-of-concept**, and
discussion on the [https://forum.djangoproject.com/c/internals/async/8
Internals > Async category of the forum] to be able to move forward.
(AFAICS there are a number of issues, from connections, to model
instances, to signals, to... that mean we can't just toggle this off.
**Showing** that it's safe in circumstance X or Y or Z is prerequisite to
change here.) Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/34359#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages