Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25309 closed Cleanup/optimization (fixed)

Docs: ATOMIC_REQUESTS is for **view** not http request

Reported by: Thomas Güttler Owned by: nobody
Component: Documentation Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Current docs: https://docs.djangoproject.com/en/1.8/ref/settings/#atomic-requests

ATOMIC_REQUESTS
Default: False

Set this to True to wrap each HTTP request in a transaction on this database. See Tying transactions to HTTP requests.

According to my understanding (and the person sitting beside me) this is not correct.

ATOMIC_REQUESTS ties the transaction to the view, not the http request.

The middleware is part of the request. It is not inside the transaction.

I think it should be:

Set this to True to wrap each view in a transaction on this database.

Change History (5)

comment:1 by Tim Graham, 9 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

Yes, that looks correct to me.

  • docs/ref/settings.txt

    diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
    index 7c569fe..331e117 100644
    a b ATOMIC_REQUESTS  
    478478
    479479Default: ``False``
    480480
    481 Set this to ``True`` to wrap each HTTP request in a transaction on this
    482 database. See :ref:`tying-transactions-to-http-requests`.
     481Set this to ``True`` to wrap each view in a transaction on this database. See
     482:ref:`tying-transactions-to-http-requests`.
    483483
    484484.. setting:: DATABASE-AUTOCOMMIT

comment:2 by Aymeric Augustin, 9 years ago

Yes, that's correct.

comment:3 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 2a1a085b:

Fixed #25309 -- Corrected that ATOMIC_REQUESTS applies per view not per request.

comment:4 by Tim Graham <timograham@…>, 9 years ago

In 2065348:

[1.8.x] Fixed #25309 -- Corrected that ATOMIC_REQUESTS applies per view not per request.

Backport of 2a1a085bf1355370205dd44fa60c6aab91ed0976 from master

comment:5 by Thomas Güttler, 9 years ago

Wow, that was fast. Thank you :-)

Note: See TracTickets for help on using tickets.
Back to Top