[Zope-DB] Dynamically generate sql-query in ZSQL Method
ianb at colorstudy.com
Thu Apr 8 12:22:12 EDT 2004
Matthew T. Kromer wrote:
> On Apr 7, 2004, at 6:29 PM, Ian Bicking wrote:
>> Well, in one case I was commiting a credit card transaction after
>> sending it to the processor, but before rendering the result page, so
>> that an error in the result page can't keep me from saving the
>> transaction to the database. And in general I'm not putting
>> persistent data into the ZODB, so I don't have to worry about
>> integrity across the two systems.
>> And Zope won't really retry a transaction, will it? That's just...
>> well, way to clever for anyone's good. Plus I do get actual conflict
>> errors from the database, which would imply it isn't retrying them.
>> And with some RDBMS's you can't do that at all, like MySQL. Do I
>> really have to worry about rerunning transactions?
> Yes, if you have any doubts write an external method which prints to the
> console or something... watch it get reexecuted on ConflictErrors.
> ConflictErrors are retried 3 times before the conflict is allowed to
> pass out in an error page.
> You really do have to worry about re-running transactions.
I had bad dreams last night -- literally -- thinking about what this
means to all the code I've written or maintained in Zope, and anything
that involves a side-effect.
Just when you think you've found a pattern of application development in
Zope that works okay -- even if it's not the Right Way or a
sophisticated Zope way of managing things -- Zope turns around and
punches you in the gut. Damn.
Well, thank's for correcting me, even if you are the bringer of bad news ;)
More information about the Zope-DB