Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Transactions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ben Ford  
View profile  
 More options Nov 2, 11:27 am
From: Ben Ford <ben.for...@gmail.com>
Date: Mon, 2 Nov 2009 16:27:00 +0000
Subject: Transactions
Hi All,

I'm looking into the transaction module due to an app that I'm working
on doing something very odd (and mostly indefensible) with long
running transactions.

It would seem that the docs are totally off base WRT to transactions -
specifically the DISABLE_TRANSACTION_MANAGEMENT setting. I'm extremely
confused looking through the code as I can find no reference to this
setting anywhere in the code... ever. When magic removal branch was
merged (at revision 2809) the TRANSACTIONS_MANAGED setting appears in
global_settings.py, but I've followed back further than that.
Transactions seem to have first appeared in
http://code.djangoproject.com/changeset/2457 when the
TRANSACTIONS_MANAGED setting and a load of other transaction related
stuff was committed.

Ticket http://code.djangoproject.com/ticket/2304 (from July 06!)
refers to this so I'm posting here and reopening rather than opening
another similar ticket. I would suggest the best fix being changing
the transaction documentation to replace
DISABLE_TRANSACTION_MANAGEMENT with TRANSACTIONS_MANAGED.

My problem has come as the app isn't using the transaction middleware
and therefore _rollback_on_exception (in django.db.__init__) is being
fired by the got_request_exception signal, despite
DISABLE_TRANSACTION_MANAGEMENT being set. As expected from reading the
code when I replace it with TRANSACTIONS_MANAGED, the app behaves as
per the documentation

I'm really curious though -- can anyone remember far back enough to
know where this came from? I haven't been able to find a single
mention of DISABLE_TRANSACTION_MANAGEMENT  anywhere in django's
history!

Cheers,
Ben

P.S. I'm fully aware that the way our app is working is causing our
problems, and that it should probably should be changed forthwith -
however it's being put into an existing infrastructure and there isn't
the freedom at this point to change it. Even with this being the case,
I think this could quite easily bite others, and it's pretty trivial
to fix.

--
Regards,
Ben Ford
ben.for...@gmail.com
+447540722690
Joan Crawford  - "I, Joan Crawford, I believe in the dollar.
Everything I earn, I spend." -
http://www.brainyquote.com/quotes/authors/j/joan_crawford.html


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Kaplan-Moss  
View profile  
 More options Nov 2, 12:19 pm
From: Jacob Kaplan-Moss <ja...@jacobian.org>
Date: Mon, 2 Nov 2009 12:19:54 -0500
Local: Mon, Nov 2 2009 12:19 pm
Subject: Re: Transactions

On Mon, Nov 2, 2009 at 11:27 AM, Ben Ford <ben.for...@gmail.com> wrote:
> I'm really curious though -- can anyone remember far back enough to
> know where this came from? I haven't been able to find a single
> mention of DISABLE_TRANSACTION_MANAGEMENT  anywhere in django's
> history!

I'm pretty sure this is a documentation issue -- I think
`DISABLE_TRANSACTION_MANAGEMENT = True` in the docs should just be
`TRANSACTIONS_MANAGED = False`.

Jacob


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ben  
View profile  
 More options Nov 2, 12:27 pm
From: ben <ben.for...@gmail.com>
Date: Mon, 2 Nov 2009 09:27:08 -0800 (PST)
Local: Mon, Nov 2 2009 12:27 pm
Subject: Re: Transactions
Isn't it TRANSACTION_MANAGE = True?

Ben

On 2 Nov, 17:19, Jacob Kaplan-Moss <ja...@jacobian.org> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google