Re: [Zope] subtransactions

2001-01-28 Thread Chris McDonough

Maybe.  I wouldn't bother submitting a patch... we just need
to figure out the "right thing to do".  What you suggest may
be it.

On Sun, 28 Jan 2001 16:34:44 +
 Chris Withers <[EMAIL PROTECTED]> wrote:
> > - Original Message -
> > From: "Dieter Maurer" <[EMAIL PROTECTED]>
> > > If this is the case, then objects that do not need
> > > such hackery, simply provide empty "commit_sub" and
> > > "abort_sub" and do all their work in "commit".
> 
> Chris McDonough wrote:
> > 
> > This is about right.
> 
> In that case, would putting try: .. except
> AttributeError's around the calls to
> abort_sub and commit_sub in transaction.py be a safe adn
> sensible thing to do?
> 
> Should I submit a patch to the collector?
> 
> cheers,
> 
> Chris


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Chris McDonough

This is about right.

- Original Message -
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>
Cc: "Chris Withers" <[EMAIL PROTECTED]>; "Ian Sealy"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 3:04 PM
Subject: Re: [Zope] subtransactions


> Chris McDonough writes:
>  > Currently, yes.  This is arguably wrong.
> Can you tell us, what the semantics of subtransactions is?
>
> It has been my impression that subtransactions are a kludge,
> essentially implemented for ZCatalog, to reduce the amount
> of main memory for large transactions.
> Rather than keep all modified objects in memory,
> they are flushed onto a file to be copied from there
> when the transaction is finally commited.
>
> If this is the case, then objects that do not need
> such hackery, simply provide empty "commit_sub" and
> "abort_sub" and do all their work in "commit".
>
> Dieter
>  >
>  > - Original Message -
>  > From: "Chris Withers" <[EMAIL PROTECTED]>
>  > To: "Chris McDonough" <[EMAIL PROTECTED]>
>  > Cc: "Ian Sealy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>  > Sent: Friday, January 26, 2001 10:35 AM
>  > Subject: Re: [Zope] subtransactions
>  >
>  >
>  > > Chris McDonough wrote:
>  > > >
>  > > > Because most databases don't have the notion of a subtransaction.
>  > >
>  > > Hang on... how come, if a file upload needs to commit a
subtransaction,
>  > that
>  > > means that an SQL method you call while processing the same request
also
>  > needs
>  > > to support sub-transactions?
>  > >
>  > > confusedly,
>  > >
>  > > Chris
>  > >
>  >
>  >
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Dieter Maurer

Chris McDonough writes:
 > Currently, yes.  This is arguably wrong.
Can you tell us, what the semantics of subtransactions is?

It has been my impression that subtransactions are a kludge,
essentially implemented for ZCatalog, to reduce the amount
of main memory for large transactions.
Rather than keep all modified objects in memory,
they are flushed onto a file to be copied from there
when the transaction is finally commited.

If this is the case, then objects that do not need
such hackery, simply provide empty "commit_sub" and
"abort_sub" and do all their work in "commit".

Dieter
 > 
 > - Original Message -
 > From: "Chris Withers" <[EMAIL PROTECTED]>
 > To: "Chris McDonough" <[EMAIL PROTECTED]>
 > Cc: "Ian Sealy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
 > Sent: Friday, January 26, 2001 10:35 AM
 > Subject: Re: [Zope] subtransactions
 > 
 > 
 > > Chris McDonough wrote:
 > > >
 > > > Because most databases don't have the notion of a subtransaction.
 > >
 > > Hang on... how come, if a file upload needs to commit a subtransaction,
 > that
 > > means that an SQL method you call while processing the same request also
 > needs
 > > to support sub-transactions?
 > >
 > > confusedly,
 > >
 > > Chris
 > >
 > 
 > 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Phil Harris

Now that's a good question ;)
- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>
Cc: "Ian Sealy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 3:35 PM
Subject: Re: [Zope] subtransactions


> Chris McDonough wrote:
> >
> > Because most databases don't have the notion of a subtransaction.
>
> Hang on... how come, if a file upload needs to commit a subtransaction,
that
> means that an SQL method you call while processing the same request also
needs
> to support sub-transactions?
>
> confusedly,
>
> Chris
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Chris Withers

Chris McDonough wrote:
> 
> Because most databases don't have the notion of a subtransaction.

Hang on... how come, if a file upload needs to commit a subtransaction, that
means that an SQL method you call while processing the same request also needs
to support sub-transactions?

confusedly,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Chris McDonough

Currently, yes.  This is arguably wrong.

- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>
Cc: "Ian Sealy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:35 AM
Subject: Re: [Zope] subtransactions


> Chris McDonough wrote:
> >
> > Because most databases don't have the notion of a subtransaction.
>
> Hang on... how come, if a file upload needs to commit a subtransaction,
that
> means that an SQL method you call while processing the same request also
needs
> to support sub-transactions?
>
> confusedly,
>
> Chris
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Chris McDonough

Because most databases don't have the notion of a subtransaction.

- Original Message - 
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>
Cc: "Ian Sealy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:10 AM
Subject: Re: [Zope] subtransactions


> Chris McDonough wrote:
> > 
> > Subtransactions aren't compatible with most database adapters.
> 
> How come?
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions

2001-01-26 Thread Chris Withers

Chris McDonough wrote:
> 
> Subtransactions aren't compatible with most database adapters.

How come?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] subtransactions (was Can't reproduce)

2001-01-26 Thread Chris McDonough

Subtransactions aren't compatible with most database adapters.

I'm not sure what to do about this one.

- Original Message -
From: "Ian Sealy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 7:55 AM
Subject: Re: [Zope] Can't reproduce :-(


> Dear all,
>
> > > > > We need to get this fixed ASAP so my boss has told me to send this
> > > > > message to the list and offer 400 pounds (sterling) to anyone who
can
> > > > > fix this bug. Any takers?
> > > >
> > > > What version of Zope are you using?
> > >
> > > 2.2.5 on Red Hat 6.2.
> > >
> > > Zope version: Zope 2.2.5 (source release, python 1.5.2, linux2)
> > > Python version: 1.5.2 (#1, Nov 18 2000, 20:03:24) [GCC egcs-2.91.66
19990314/Linux (egcs-
> > > System Platform: linux2
> >
> > Well, sorry to say, on Zope 2.2.4 and 2.2.5 under Linux and WinNT using
files
> > between 1kb and 110Mb (Boy, did Netscape like that ;-), I can't
reproduce this
> > :-(
> >
> > If anyone comes up with a fail safe way of reproducing the bug, I'd love
to nail
> > it, 'cos it sounds like fun :-)
>
> I've finally managed to replicate the bug consistently, so I've just
> submitted it to the Collector:
>
> http://classic.zope.org:8080/Collector/1895/view
>
> I now know what causes it so I'm able to work around it, which means
> that I'm afraid the offer of 400 quid to fix the bug is now
> withdrawn. Sorry.
>
> The bug only occurs if the DTML Method that adds the large file tries to
> call a Z SQL Method that uses the ZPyGreSQLDA. Here's the description I
> just submitted to the Collector:
>
> Occurs on Zope 2.2.5 with ZPyGreSQLDA-0-0-3 installed. If you have a
> form like this:
>
> 
> 
> Filename: 
> 
> 
>
> and a DTML Method called addfile:
>
> 
> 
> OK
>
> where sql is a Z SQL Method that uses a PyGreSQL database connection.
> Trying to upload a file larger than about 128 kb gives:
>
> Error Type: AttributeError
> Error Value: abort_sub
>
> Traceback (innermost last):
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in
publish
>   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
> (Object: Traversable)
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in
publish
>   File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
>   File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
> AttributeError: (see above)
>
> Cheers,
> Ian
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )