logo       

Re: ROLLBACK seems to be skipped on 0.08: msg#00136

Subject: Re: ROLLBACK seems to be skipped on 0.08
At 4:04 PM -0500 10/22/07, Brandon Black wrote:
On 10/22/07, Darren Duncan <darren@xxxxxxxxxxxxxxxx> wrote:
 Muldis DB also has separate start|commit|rollback_trans() methods
 that the Perl application can invoke (but Muldis D stored routines
 can't) whose purpose is to support wider-scope parent-most
 transactions in the application where it isn't practical to put all
 parts of it into a stored routine, such as because interaction with
 non-database systems or users needs to be done between stages.

 Based on my understanding, DBIx-Class' separate
 txn_begin|commit|rollback() routines correspond to this, assuming
 they aren't invoked by user code in a txn_do().

 To summarize, I recommend for DBIx-Class an emphasis on txn_do() for
 any situation where it would work, which includes executing just
 single operations, and that autocommit=1 should be constant.  An
 autocommit=0 can be simulated by just having explicit
 begin/commit/rollback where appropriate.


I think ideally we'd like to deprecate and/or eliminate
->txn_{begin,commit,rollback} as well, and basically stick users with
AutoCommit=>1 and txn_do.  If we could find some concrete examples of
sane things that can't be done with just txn_do, that would be a good
reason to keep the others around, but I don't think such an example
exists (if you know of one, please speak up).  txn_do closures and the
magic of $self->next::can covers just about everything I can think of.

Using just txn_do() for everything in DBIx-Class may very well be feasible, more so than with using just call_proc() would be with Muldis DB, so you may be able to do the deprecation you mentioned.

A key difference I see is that the Muldis DB framework presents an isolated system (which is more effective for safety and portability). A Perl application can call Muldis D routines, but Muldis D routines can't call back out into the application environment (all closures within Muldis DB are also, from the users viewpoint, written in Muldis D rather than Perl).

As a result, since DBIx-Class' txn_do() can take an arbitrary Perl closure as input, it can conceivably do more, since Perl closures aren't so isolated.

In other words, I support your proposal.

-- Darren Duncan



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe