Brad Clements wrote at 2004-7-23 09:53 -0400:
>On 23 Jul 2004 at 10:58, Chris Withers wrote:
>> Dieter Maurer wrote:
>> > 
>> > All DA's I saw up to now, do a reconnect.
>> ZOracleDA didn't...
>> > But this is *WRONG" -- as part of a transaction may have been lost.
>> > After "reconnecting", they should raise an exception
>> > derived from "ConflictError" and let the complete request retry.
>Perhaps I don't understand, but how could their be a missing transaction?
>Zope starts, connects to database
>Zero or more transactions occur
>Zope is idle for some period of time

The bad sequence can look as follows:

 * Zope starts a request (and thereby a transaction)

 * The request sends a modifying request to a relational database

 * The connection is lost; the former modification is discarded
   as the database performs an automatic abort on connection close

 * The request sends another modifying requst to the database
   The DA detects the lost connection, reconnects and
   sends the SQL

 * The request ends and commits the transaction

In this case, you get only one of two changes in the database
while you should have got either none or both -- an inconsistency.

Raising an exception derived from "ConflictError" will
let "ZPublisher" abort the transaction and then restart
the complete request. You have a chance to get both changes...

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to