[Zope-DB] ZOracleDA/SP.py: non volatile error variable
Willi Langenberger
wlang at wu-wien.ac.at
Tue Nov 4 08:13:04 EST 2003
Hi Chris and all!
We found out, that every call to a Z Oracle Procedure is a write
operation wrt the object store (seems harmless, but killed us big
time[1]).
With the following patch (change self._errors to the volatile
self._v_errors), a procedure call triggers no ZODB write any more (and
our application worked fine):
zope at bach-s3:~/DCOracle2-20031104$ diff -u SP.py.ori SP.py
--- SP.py.ori 2002-12-21 21:29:06.000000000 +0100
+++ SP.py 2003-11-04 14:08:55.000000000 +0100
@@ -192,14 +192,14 @@
def _connect(self):
db = self._v_db = getattr(self,self.connection)() # Get connection
c = db.cursor # Get cursor
- self._errors = 0
+ self._v_errors = 0
if self.procname:
try:
p = c.findproc(self.procname) # Get procedure
self._v_proc = p
except DCOracle2.DatabaseError:
- self._errors = self._errors + 1
- if self._errors > 3: raise
+ self._v_errors = self._v_errors + 1
+ if self._v_errors > 3: raise
def _finish(self, *ignored):
Thanks,
\wlang{}
[1]: We have a zeo cluster with 5 Zope Instances to handle
registration at our university. Each request (and there are many)
calls an Oracle procedure. These ZODB write operations brought the
system down :-(
--
Willi.Langenberger at wu-wien.ac.at Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria
More information about the Zope-DB
mailing list