[Zope-CVS] CVS: Products/DBTab - CHANGES.txt:1.10 Mount.py:1.8 MountedObject.py:1.7
Wed, 11 Jun 2003 17:54:28 -0400
Update of /cvs-repository/Products/DBTab
In directory cvs.zope.org:/tmp/cvs-serv28232
CHANGES.txt Mount.py MountedObject.py
Fixed a race condition on connection close.
The root connection was returned to the pool before the mounted
connections were closed. If another thread pulled the root connection
out of the pool before the original thread finished closing mounted
connections, when the original thread got control back it closed the
mounted connections even though the new thread was using them. The
symptom was spurious "Should not load state when connection closed"
errors under high load.
Also began unit tests.
=== Products/DBTab/CHANGES.txt 1.9 => 1.10 ===
--- Products/DBTab/CHANGES.txt:1.9 Fri Apr 18 22:15:29 2003
+++ Products/DBTab/CHANGES.txt Wed Jun 11 17:53:58 2003
@@ -1,4 +1,14 @@
+ - Fixed a race condition on connection close. The symptom was
+ spurious "Should not load state when connection closed" errors under
+ high load.
+ - DemoStorage configurations can now include a base_type option,
+ taking advantage of DemoStorage's layering feature.
- Fixed activity monitoring for mounted databases.
=== Products/DBTab/Mount.py 1.7 => 1.8 ===
--- Products/DBTab/Mount.py:1.7 Fri Apr 18 22:27:12 2003
+++ Products/DBTab/Mount.py Wed Jun 11 17:53:58 2003
@@ -180,7 +180,8 @@
+ if self._root_connection is not None:
+ raise RuntimeError("Should not close mounted connections directly")
conns = self._mounted_connections
for conn in conns.values():
@@ -197,6 +198,16 @@
conn._debug_info = ()
# The mounted connection keeps a reference to
# its database, but nothing else.
+ # Note that mounted connections can not operate
+ # independently, so don't use _closeConnection() to
+ # return them to the pool. Only the root connection
+ # should be returned.
+ # Close this connection only after the mounted connections
+ # have been closed. Otherwise, this connection gets returned
+ # to the pool too early and another thread might use this
+ # connection before the mounted connections have all been
+ # closed.
# patch Connection.py.
=== Products/DBTab/MountedObject.py 1.6 => 1.7 ===
--- Products/DBTab/MountedObject.py:1.6 Fri Apr 18 22:15:29 2003
+++ Products/DBTab/MountedObject.py Wed Jun 11 17:53:58 2003
@@ -39,6 +39,10 @@
from MainConfiguration import configuration
+ global configuration
+ configuration = c
"""Follows Zope paths. If a path is not found, creates a Folder.