[Zope] ZODB Conflict, Thunked_TM and transaction hoseups

Brad Clements bkc@murkworks.com
Fri, 12 Jul 2002 15:20:07 -0400


I have an irritated customer whose data driven zope website is screwing up, seemingly 
due to ZODB Conflicts on StyleSheet.

Description:

Zope 2.5.1 binary on linux

Interbase, gvibDA 

Page Templates

Use PageTemplates and lots of javascript with xml-rpc requests to pythonscripts to 
interace through ZSQL methods to talk to interbase via gvibDA.

I also use SQLDict, maintaining a pool of SQLDict instances (they're expensive to 
create) in a Queue (stored in an external method)

After pulling an SQLDict from the queue, I attach a gvibDA connection to sqldict by 
calling the Interbase DA object (to get a db instance), then (from an external method) I 
call db._register() and then use the connection object from that thread.

This works rather well.

However, as soon as I get a ZODB conflict, all subsequent transactions fail. That is, I 
am unable to alter the back-end (interbase) database at all. It's as if every single 
transaction after that point gets a permanent _rollback().

I have no idea why I'm getting conflicts on ZStyleSheet. I even tried creating a cached 
DTML method that caches the stylesheet, then serving that. But now I get conflicts on 
that object as well.

2002-07-12T18:45:38 INFO(0) ZODB conflict error at /Smoking/CachedStyleSheet (1 conflicts since startup at 2002-07-12T18:42:15) 
------
2002-07-12T18:47:02 INFO(0) ZODB conflict error at /Smoking/CachedStyleSheet (2 conflicts since startup at 2002-07-12T18:42:15) 

So .. it seems that my method of hooking into gvibDA/db.py, calling _register on it (it 
subclasses THUNKED_TM) is not entirely proper, because once a transaction error 
occurs, I seem to be blocking some proper rollback.

But, why am I getting a conflict error in the first place? It makes no sense. . Just like 
getting conflicts on helpsys.




Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
AOL-IM: BKClements