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" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com> Cc: "Ian Sealy" <Ian.Sealy@bristol.ac.uk>; <zope@zope.org> 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
This is about right. ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Chris McDonough" <chrism@digicool.com> Cc: "Chris Withers" <chrisw@nipltd.com>; "Ian Sealy" <Ian.Sealy@bristol.ac.uk>; <zope@zope.org> 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" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com> Cc: "Ian Sealy" <Ian.Sealy@bristol.ac.uk>; <zope@zope.org> 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 - Zope@zope.org 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 )
----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de>
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
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 +0000 Chris Withers <chrisw@nipltd.com> wrote:
----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de>
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
participants (3)
-
Chris McDonough -
Chris Withers -
Dieter Maurer