[Zope-CMF] Subtransactions

hazmat hazmat@objectrealms.net
Wed, 2 Oct 2002 03:44:49 -0700


On Friday 23 August 2002 07:15 am, Tres Seaver wrote:
> On Thu, 2002-08-22 at 12:21, Jim Pharis wrote:
> > I am curious about subtransactions under the advanced tab inside of
> > portal_catalog. Could somebody clarify the following statement made.
> >
> > If you are using ZCatalog and ZSQL Methods in the same transaction, you
> > must disable subtransactions, they are not compatible with ZSQL Methods.
> >
> > I am not exactly what they mean by ZSQL methods in the same transaction.
> > In my portal I call ZSQL methods whenever a member creates a new content
> > type. I call the ZSQL methods inside of the pscripts when the meta_data
> > is created for the content type.
> >
> > Does this imply that I need to disable subtransactions? I don't seem to
> > be having any problems thus far; I could either be overlooking the
> > problem or maybe problems will pop up sometime down the road.
>
> Subtransactions really only come into play when doing "batch" operations
> (reindexing, for instance, or creating hundreds of objects via
> scripting).  If *those* operations also touch SQL, then you need to
> disable subtransactions.

this should no longer be the case, as of 2.5.1 if i recall correctly. sql 
operations will commit at the end of the transaction, regardless of what sub 
transaction they were committed in.

i don't recall if the abort behavior was also consistent, ie they abort if the 
subtrans aborts, but the overall txn commits. 

cheers

-haz