Opened 10 years ago

Last modified 10 years ago

#23292 closed Bug

ATOMIC_REQUESTS creates unnecessary database connections and transactions — at Version 1

Reported by: ijl Owned by: nobody
Component: Uncategorized Version: 1.6
Severity: Normal Keywords: atomic_requests, database, transactions
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by ijl)

When specifying ATOMIC_REQUESTS on a database, a connection is made to the database whether or not it is used. This is due to BaseHandler.make_view_atomic wrapping the view in a transaction.atomic for each database. Each call to transaction.atomic results in opening a database connection and then opening a transaction.

Is there any interest in modifying this to acquire connections and transactions only when the ORM attempts to use that database?

Change History (1)

comment:1 by ijl, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top